/* =========================================================
   Neoworkx Kassa – opmaak
   Touch-first (min. 48px doelen), werkt ook met muis/toetsenbord.
   ========================================================= */
:root{
  --ink:#191919; --ink2:#2a2a2a; --bg:#f3f1ec; --panel:#fff; --line:#e4e0d7; --line2:#efece6;
  --muted:#6f6b64; --text:#1d1d1d;
  --gold1:#f6c650; --gold2:#eda722; --orange:#ec8b2a;
  --grad:linear-gradient(135deg,var(--gold1),var(--gold2) 55%,var(--orange));
  --green:#17924a; --green-d:#11793c; --red:#d43d3d; --red-bg:#fdecec; --blue:#2563eb;
  --sel:#fff6dc;
  --r:14px; --r-sm:10px;
  --top:60px; --bonw:400px; --catw:150px;
  --shadow:0 1px 2px rgba(0,0,0,.06),0 4px 14px rgba(0,0,0,.06);
  font-family:Montserrat,"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);overflow:hidden}
body{font-size:15px;-webkit-tap-highlight-color:transparent;touch-action:manipulation;user-select:none;-webkit-user-select:none}
input,textarea{user-select:text;-webkit-user-select:text}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:not-allowed;opacity:.45}
[hidden]{display:none!important}
kbd{font-family:inherit;font-weight:600;font-size:10px;line-height:1;padding:2px 4px;border-radius:4px;border:1px solid currentColor;opacity:.55;margin-left:6px;vertical-align:middle}
.ico{display:inline-flex;width:20px;height:20px;flex:none}
.ico svg,.ico-btn svg{width:100%;height:100%}
svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (pointer:coarse){kbd{display:none}}

/* ---------- Bovenbalk ---------- */
#app{height:100%;display:flex;flex-direction:column}
.top{height:var(--top);flex:none;background:var(--ink);color:#fff;display:flex;align-items:center;gap:12px;padding:0 12px;padding-left:max(12px,env(safe-area-inset-left))}
.ico-btn{width:44px;height:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;padding:11px;flex:none}
.top .ico-btn:active{background:#333}
.ico-btn.sm{width:36px;height:36px;padding:9px}
.logo{font-weight:500;font-size:19px;letter-spacing:-.3px;white-space:nowrap}
.logo b{font-weight:800;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.logo span{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;margin-left:8px;padding:3px 7px;border-radius:6px;background:#2f2f2f;color:#cfcfcf;vertical-align:3px}
.viewtabs{display:flex;background:#2b2b2b;border-radius:12px;padding:4px;margin-left:12px}
.viewtabs button{padding:0 18px;height:38px;border-radius:9px;font-weight:600;color:#bdbdbd}
.viewtabs button.on{background:var(--grad);color:var(--ink)}
.top-right{margin-left:auto;display:flex;align-items:center;gap:14px}
.net{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#9be3b5}
.net i{width:8px;height:8px;border-radius:50%;background:#34d27a}
.net.off{color:#ffb4b4}.net.off i{background:var(--red)}
.clock{font-weight:600;font-variant-numeric:tabular-nums;color:#ddd}
.user{display:flex;align-items:center;gap:9px;height:44px;padding:0 12px 0 6px;border-radius:12px;background:#2b2b2b;font-weight:600}
.user:active{background:#3a3a3a}
.user .ico{width:16px;height:16px;opacity:.6}
.av{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:800;color:#fff;font-size:14px;background:#555}

/* ---------- Hoofdindeling ---------- */
.main{flex:1;min-height:0;display:grid;grid-template-columns:var(--catw) 1fr var(--bonw)}
.main.tafelview{grid-template-columns:1fr var(--bonw)}
.main.tafelview .cats,.main.tafelview .products{display:none}

/* Categorieën */
.cats{background:var(--panel);border-right:1px solid var(--line);overflow-y:auto;padding:10px 8px;display:flex;flex-direction:column;gap:6px}
.cat{position:relative;text-align:left;min-height:56px;padding:10px 12px 10px 16px;border-radius:var(--r-sm);font-weight:600;font-size:14px;line-height:1.2;background:var(--bg);display:flex;align-items:center}
.cat::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:5px;border-radius:0 4px 4px 0;background:var(--c,#999)}
.cat.on{background:var(--ink);color:#fff}
.cat:active{transform:scale(.98)}

/* Producten */
.products{display:flex;flex-direction:column;min-width:0;min-height:0}
.searchbar{flex:none;margin:12px 12px 0;display:flex;align-items:center;gap:8px;background:var(--panel);border:2px solid var(--line);border-radius:var(--r);padding:0 6px 0 14px;height:52px}
.searchbar:focus-within{border-color:var(--gold2)}
.searchbar .ico{color:var(--muted)}
.searchbar input{flex:1;border:0;outline:0;background:none;font:inherit;font-size:16px;height:100%;min-width:0}
.searchbar input::-webkit-search-cancel-button{display:none}
.grid{flex:1;overflow-y:auto;padding:12px;display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));grid-auto-rows:110px;gap:10px;align-content:start}
.tile{position:relative;background:var(--panel);border-radius:var(--r);box-shadow:var(--shadow);text-align:left;padding:14px 12px 12px 16px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;border:2px solid transparent;transition:transform .06s}
.tile::before{content:"";position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--c,#999)}
.tile:active{transform:scale(.96);border-color:var(--gold2)}
.tile .n{font-weight:700;font-size:15px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tile .p{white-space:nowrap;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums}
.tile .badge{position:absolute;top:8px;right:8px;font-size:11px;font-weight:800;padding:3px 6px;border-radius:6px;background:#fdecec;color:var(--red)}
.tile .cnt{position:absolute;bottom:10px;right:10px;min-width:28px;height:28px;padding:0 6px;border-radius:14px;background:var(--ink);color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center}
.tile.flash{animation:flash .35s}
@keyframes flash{0%{border-color:var(--gold2);background:var(--sel)}100%{}}
.leeg{grid-column:1/-1;text-align:center;color:var(--muted);padding:60px 20px;font-weight:500}
.leeg b{display:block;color:var(--text);font-size:17px;margin-bottom:6px}

/* ---------- Bon ---------- */
.bon{background:var(--panel);border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
.bon-head{flex:none;display:flex;align-items:center;gap:8px;padding:10px 10px 10px 16px;border-bottom:1px solid var(--line);min-height:64px}
.bon-head .t{flex:1;min-width:0}
.bon-head .t b{display:block;font-size:17px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bon-head .t small{color:var(--muted);font-weight:500;font-size:12px}
.hbtn{position:relative;height:44px;min-width:44px;padding:0 10px;border-radius:12px;background:var(--bg);display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;font-size:13px}
.hbtn:active{background:var(--line)}
.hbtn .ico{width:19px;height:19px}
.hbtn.danger{color:var(--red)}
.hbtn .bdg{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;border-radius:10px;background:var(--orange);color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 5px}
.bon-close{display:none}

.bon-regels{flex:1;overflow-y:auto;overscroll-behavior:contain}
.regel{border-bottom:1px solid var(--line2)}
.regel-main{width:100%;display:grid;grid-template-columns:40px 1fr auto;gap:10px;align-items:center;padding:12px 14px;text-align:left;min-height:58px}
.regel .q{height:32px;border-radius:9px;background:var(--bg);font-weight:800;display:flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums}
.regel .nm{font-weight:600;line-height:1.25;min-width:0}
.regel .nm small{display:block;font-weight:500;color:var(--muted);font-size:12px;margin-top:2px}
.regel .nm .note{color:var(--orange);font-style:italic}
.regel .nm .sent{color:var(--green);font-weight:600}
.regel .nm .disc{color:var(--red);font-weight:600}
.regel .tot{font-weight:700;font-variant-numeric:tabular-nums;text-align:right}
.regel .tot s{display:block;font-size:12px;color:var(--muted);font-weight:500}
.regel.sel{background:var(--sel)}
.regel.sel .q{background:var(--ink);color:#fff}
.regel.new{animation:flash .5s}
.regel-acts{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;padding:0 10px 12px}
.ract{height:48px;border-radius:10px;background:#fff;border:1px solid var(--line);font-size:11px;font-weight:600;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.ract .ico{width:18px;height:18px}
.ract:active{background:var(--line2)}
.ract.big .ico{width:22px;height:22px}
.ract.del{color:var(--red);border-color:#f3c9c9}
.bon-leeg{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);padding:30px;gap:10px}
.bon-leeg .ico{width:54px;height:54px;color:#d6d1c6}
.bon-leeg b{color:var(--text);font-size:16px}

.bon-foot{flex:none;border-top:1px solid var(--line);padding:12px 14px calc(14px + env(safe-area-inset-bottom));background:#fbfaf7}
.som{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);font-weight:500;padding:1px 0;font-variant-numeric:tabular-nums}
.som.k{color:var(--red);font-weight:600}
.som.tot{color:var(--text);font-size:26px;font-weight:800;margin:6px 0 10px;align-items:baseline}
.som.tot span:first-child{font-size:16px;font-weight:700}
.foot-btns{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.fbtn{height:50px;border-radius:12px;background:var(--bg);font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px}
.fbtn:active{background:var(--line)}
.fbtn.keuken{grid-column:1/-1;background:var(--ink);color:#fff}
.fbtn.keuken .bdg{background:var(--gold2);color:var(--ink);border-radius:8px;padding:2px 7px;font-size:12px}
.paybtn{width:100%;height:68px;border-radius:14px;background:var(--green);color:#fff;font-weight:800;font-size:20px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;box-shadow:0 4px 12px rgba(23,146,74,.3)}
.paybtn:active{background:var(--green-d);transform:scale(.99)}
.paybtn:disabled{background:#b9c7bf;box-shadow:none;opacity:1}
.paybtn small{font-size:12px;font-weight:600;opacity:.8;display:block}

/* ---------- Tafels ---------- */
.tafels{overflow-y:auto;padding:16px 18px}
.tafels-top{display:flex;align-items:center;gap:10px;margin-bottom:6px;flex-wrap:wrap}
.tafels-top h2{margin:0;font-size:20px;flex:1}
.legenda{display:flex;gap:14px;font-size:12px;color:var(--muted);font-weight:600}
.legenda i{display:inline-block;width:12px;height:12px;border-radius:4px;vertical-align:-2px;margin-right:5px;background:#fff;border:2px solid var(--line)}
.legenda i.b{background:var(--sel);border-color:var(--gold2)}
.zone h3{font-size:13px;text-transform:uppercase;letter-spacing:1px;color:var(--muted);margin:18px 0 8px}
.tgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.tafel{height:110px;border-radius:var(--r);background:var(--panel);border:2px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-shadow:var(--shadow)}
.tafel .tn{font-size:24px;font-weight:800}
.tafel .ti{font-size:12px;color:var(--muted);font-weight:600}
.tafel .tb{font-weight:800;font-variant-numeric:tabular-nums}
.tafel.bezet{background:var(--sel);border-color:var(--gold2)}
.tafel.actief{outline:3px solid var(--ink);outline-offset:2px}
.tafel:active{transform:scale(.97)}
.direct{height:50px;padding:0 18px;border-radius:12px;background:var(--ink);color:#fff;font-weight:700}

/* ---------- Onderbalk (smal) ---------- */
.mbar{display:none}

/* ---------- Modals ---------- */
.modal-wrap,.drawer-wrap{position:fixed;inset:0;background:rgba(15,15,15,.55);z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;animation:fade .15s}
@keyframes fade{from{opacity:0}}
.modal{background:var(--panel);border-radius:20px;width:100%;max-width:440px;max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.35);animation:pop .18s ease-out}
.modal.wide{max-width:860px}
/* geen animatie bij het verversen van een open venster */
.modal-wrap.stil,.modal-wrap.stil .modal{animation:none}
@keyframes pop{from{transform:scale(.96);opacity:0}}
.m-head{display:flex;align-items:center;gap:10px;padding:16px 16px 0 22px}
.m-head h2{flex:1;margin:0;font-size:20px}
.m-head .ico-btn{background:var(--bg)}
.m-body{padding:16px 22px 22px}
.m-sub{color:var(--muted);margin:-4px 0 14px;font-weight:500}
.m-btns{display:flex;gap:10px;margin-top:16px}
.btn{flex:1;height:56px;border-radius:14px;font-weight:700;font-size:16px;background:var(--bg);display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 14px}
.btn:active{filter:brightness(.95)}
.btn.pri{background:var(--green);color:#fff}
.btn.gold{background:var(--grad);color:var(--ink)}
.btn.dark{background:var(--ink);color:#fff}
.btn.red{background:var(--red);color:#fff}
.btn.blue{background:var(--blue);color:#fff}
.btn .ico{width:22px;height:22px}

/* Numpad */
.display{background:var(--bg);border-radius:14px;padding:12px 16px;text-align:right;font-size:34px;font-weight:800;font-variant-numeric:tabular-nums;min-height:66px;margin-bottom:12px;border:2px solid transparent}
.display.leeg{color:#b3ada2}
.display small{display:block;font-size:12px;font-weight:600;color:var(--muted);text-align:left}
.pad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.pad button{height:62px;border-radius:12px;background:var(--bg);font-size:24px;font-weight:700}
.pad button:active{background:var(--line)}
.pad button.fn{font-size:16px;color:var(--muted)}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.chip{height:46px;padding:0 16px;border-radius:12px;background:var(--bg);font-weight:700;border:2px solid transparent}
.chip.on{border-color:var(--ink);background:#fff}
.chip.hint{border-color:var(--gold2);background:var(--sel)}
textarea.inp,input.inp{width:100%;border:2px solid var(--line);border-radius:12px;padding:12px 14px;font:inherit;font-size:16px;outline:0;resize:none}
textarea.inp:focus,input.inp:focus{border-color:var(--gold2)}

/* Betalen */
.pay{display:grid;grid-template-columns:300px 1fr;min-height:480px}
.pay-l{background:var(--ink);color:#fff;padding:22px;border-radius:20px 0 0 20px;display:flex;flex-direction:column}
.pay-l .lbl{font-size:13px;font-weight:600;color:#aaa;text-transform:uppercase;letter-spacing:1px}
.pay-l .big{font-size:42px;font-weight:800;font-variant-numeric:tabular-nums;margin:4px 0 16px;line-height:1.1}
.pay-l .big.gold{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.pay-l .bet{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-top:1px solid #333;font-weight:600;font-variant-numeric:tabular-nums;gap:8px}
.pay-l .bet .x{width:32px;height:32px;border-radius:8px;background:#333;padding:7px;display:inline-flex}
.pay-l .regels{margin-top:auto;font-size:12px;color:#999;font-weight:500}
.pay-r{padding:18px 22px 22px;display:flex;flex-direction:column;min-width:0}
.pay-r .m-head{padding:0 0 12px}
.methods{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.method{height:130px;border-radius:18px;color:#fff;font-weight:800;font-size:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.method .ico{width:38px;height:38px}
.method small{font-size:12px;font-weight:600;opacity:.85}
.method.pin{background:var(--blue)}
.method.cash{background:var(--green)}
.method.other{background:#5b5b5b;grid-column:1/-1;height:70px;flex-direction:row;font-size:16px}
.method.other .ico{width:24px;height:24px}
.deel{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border:2px dashed var(--line);border-radius:14px;font-weight:600}
.deel b{font-size:18px;font-variant-numeric:tabular-nums}
.linkbtn{color:var(--blue);font-weight:700;padding:8px 4px}
.cash-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.wissel{background:#eaf7ef;border-radius:14px;padding:12px 16px;margin-bottom:12px;color:var(--green-d);font-weight:700}
.wissel b{display:block;font-size:30px;font-variant-numeric:tabular-nums}
.wissel.tekort{background:var(--red-bg);color:var(--red)}
.quick{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start}
.quick button{height:56px;border-radius:12px;background:var(--bg);font-weight:800;font-size:17px;font-variant-numeric:tabular-nums}
.quick button.exact{grid-column:1/-1;background:var(--ink);color:#fff}
.quick button:disabled{opacity:.3}
.wacht{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px;padding:20px}
.wacht h3{margin:0;font-size:22px}
.wacht p{margin:0;color:var(--muted);font-weight:500;max-width:340px}
.spin{width:64px;height:64px;border-radius:50%;border:6px solid #dbe5fb;border-top-color:var(--blue);animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.okrond,.foutrond{width:96px;height:96px;border-radius:50%;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;padding:22px;animation:pop .3s}
.foutrond{background:var(--red)}
.klaar-wissel{background:#eaf7ef;color:var(--green-d);border-radius:18px;padding:16px 28px;font-weight:700}
.klaar-wissel b{display:block;font-size:44px;font-variant-numeric:tabular-nums}
.demo{font-size:12px;color:var(--muted)}
.demo button{color:var(--blue);font-weight:700;font-size:12px;text-decoration:underline}

/* Gekoppelde pinautomaat */
.pin-status{font-weight:700;color:var(--blue);min-height:20px}
.pin-status.fout{color:var(--red)}
.pin-test{font-size:12px;font-weight:800;color:#b25e00;background:#fff3d6;border-radius:8px;padding:4px 10px}
.pin-hulp{background:var(--bg);border-radius:14px;padding:12px 14px;max-width:440px;font-weight:500}
.pin-hulp .m-btns{margin-top:10px}

/* Lijsten (drawer) */
.drawer-wrap{justify-content:flex-start;padding:0}
.drawer{width:340px;max-width:88vw;height:100%;background:var(--panel);display:flex;flex-direction:column;animation:slide .2s ease-out}
@keyframes slide{from{transform:translateX(-100%)}}
.drawer-h{background:var(--ink);color:#fff;padding:14px 14px 14px 20px;display:flex;align-items:center;height:var(--top)}
.drawer-h .logo{flex:1}
.drawer nav{padding:10px;overflow-y:auto;flex:1}
.mi{width:100%;display:flex;align-items:center;gap:14px;padding:0 14px;height:56px;border-radius:12px;font-weight:600;text-align:left}
.mi:active{background:var(--bg)}
.mi .ico{color:var(--muted)}
.mi .r{margin-left:auto;color:var(--muted);font-size:13px}
.mi-sep{height:1px;background:var(--line);margin:8px 6px}
.seg{display:flex;background:var(--bg);border-radius:12px;padding:4px;margin:4px 6px 8px}
.seg button{flex:1;height:44px;border-radius:9px;font-weight:700;color:var(--muted)}
.seg button.on{background:var(--ink);color:#fff}
.mi-lbl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--muted);padding:8px 12px 2px}
.lijst{display:flex;flex-direction:column;gap:8px}
.li{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;background:var(--bg);text-align:left;width:100%}
.li .t{flex:1;min-width:0}
.li .t b{display:block}
.li .t small{color:var(--muted);font-weight:500}
.li .b{font-weight:800;font-variant-numeric:tabular-nums}
.rap{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.rap td{padding:9px 0;border-bottom:1px solid var(--line2);font-weight:500}
.rap td:last-child{text-align:right;font-weight:700}
.rap tr.t td{font-size:18px;font-weight:800;border-bottom:0}

/* Vergrendelscherm */
.lock{position:fixed;inset:0;z-index:80;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto}
.lock-in{width:100%;max-width:520px;text-align:center}
.lock .logo{font-size:30px;margin-bottom:6px}
.lock p{color:#aaa;font-weight:500;margin:0 0 26px}
.mw-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:12px}
.mw{background:#262626;border-radius:18px;padding:18px 10px;display:flex;flex-direction:column;align-items:center;gap:10px;font-weight:700}
.mw:active{background:#333}
.mw .av{width:56px;height:56px;font-size:22px}
.pinbox{max-width:320px;margin:0 auto}
.dots{display:flex;justify-content:center;gap:16px;margin:16px 0 22px}
.dots i{width:16px;height:16px;border-radius:50%;border:2px solid #777}
.dots i.f{background:var(--gold1);border-color:var(--gold1)}
.dots.shake{animation:shake .35s}
@keyframes shake{25%{transform:translateX(-10px)}75%{transform:translateX(10px)}}
.lock .pad button{background:#262626;color:#fff;height:68px}
.lock .pad button:active{background:#3a3a3a}
.lock .pad button.fn{color:#aaa}
.pinfout{color:#ff9b9b;font-weight:600;min-height:22px;margin-top:-10px}
.lock .terug{color:#aaa;font-weight:600;margin-top:18px;padding:10px}
.hint{font-size:12px;color:#777;margin-top:16px}

/* Koppelen, pin-bevestigen, afsluiten */
.koppel-uitleg{background:#262626;border-radius:14px;padding:14px 16px;color:#cfcfcf;font-weight:500;line-height:1.5;font-size:14px;margin:6px 0 14px}
.koppel-uitleg b{color:#fff}
.kcode{width:100%;height:64px;border-radius:14px;border:2px solid #444;background:#111;color:#fff;font:800 28px/1 ui-monospace,Menlo,Consolas,monospace;letter-spacing:4px;text-align:center;text-transform:uppercase;outline:0}
.kcode:focus{border-color:var(--gold2)}
.lock .btn.gold:disabled{opacity:.4}
.lock .pad button.ok{background:var(--green);color:#fff;font-size:26px}
.drawer-f{padding:12px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);font-size:12px;color:var(--muted);font-weight:500;line-height:1.5}
.net.wacht{color:#ffd88a}.net.wacht i{background:var(--gold2)}
button.display{width:100%;display:block;font-family:inherit;cursor:pointer}
.display.afs{font-size:28px;min-height:60px;padding:8px 14px;margin-bottom:8px}
.display.afs.on{border-color:var(--gold2);background:#fff}

/* Toasts */
.toasts{position:fixed;left:50%;top:calc(var(--top) + 12px);transform:translateX(-50%);z-index:90;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;width:max-content;max-width:calc(100vw - 24px)}
.toast{pointer-events:auto;background:var(--ink);color:#fff;border-radius:14px;padding:0 8px 0 18px;min-height:54px;display:flex;align-items:center;gap:14px;font-weight:600;box-shadow:0 10px 30px rgba(0,0,0,.3);animation:up .2s ease-out}
.toast.fout{background:var(--red)}
.toast.ok{background:var(--green)}
.toast button{height:40px;padding:0 14px;border-radius:10px;background:rgba(255,255,255,.16);font-weight:700;color:#fff}
.toast:not(:has(button)){padding-right:18px}
@keyframes up{from{transform:translateY(-14px);opacity:0}}

/* Printbon */
#print{display:none}
@media print{
  body *{visibility:hidden}
  #print,#print *{visibility:visible}
  #print{display:block;position:absolute;left:0;top:0;width:72mm;font:12px/1.35 monospace;color:#000}
  #print .c{text-align:center}#print .r{display:flex;justify-content:space-between}#print hr{border:0;border-top:1px dashed #000}
}

/* ============ Responsive ============ */
/* Kleinere landscape-schermen / compacte pc */
@media (max-width:1180px){
  :root{--bonw:360px;--catw:130px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(122px,1fr));grid-auto-rows:100px}
}
/* Pc met muis: iets compacter */
@media (pointer:fine) and (min-width:1181px){
  .grid{grid-auto-rows:96px}
  .tile:hover{border-color:var(--line)}
  .cat:hover:not(.on),.hbtn:hover,.fbtn:hover,.ract:hover,.mi:hover,.li:hover{filter:brightness(.97)}
}
/* Tablet staand / telefoon: bon wordt een uitschuifpaneel */
@media (max-width:900px){
  .main,.main.tafelview{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .main.tafelview{grid-template-rows:1fr}
  .cats{flex-direction:row;border-right:0;border-bottom:1px solid var(--line);overflow-x:auto;overflow-y:hidden;padding:8px;scrollbar-width:none}
  .cats::-webkit-scrollbar{display:none}
  .cat{flex:none;min-height:46px;white-space:nowrap}
  .bon{position:fixed;inset:var(--top) 0 0 0;z-index:40;transform:translateY(100%);transition:transform .22s ease-out;border-left:0}
  .bon.open{transform:none}
  .bon-close{display:inline-flex}
  .mbar{display:flex;flex:none;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--panel);border-top:1px solid var(--line)}
  .mbar .mb-bon{flex:1;height:60px;border-radius:14px;background:var(--bg);display:flex;align-items:center;gap:12px;padding:0 14px;font-weight:700;text-align:left}
  .mbar .mb-bon .q{min-width:32px;height:32px;border-radius:16px;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;padding:0 8px}
  .mbar .mb-bon small{display:block;color:var(--muted);font-weight:500;font-size:12px}
  .mbar .paybtn{width:auto;flex:1;height:60px;font-size:17px}
  .logo span{display:none}
  .clock{display:none}
  .pay{grid-template-columns:1fr}
  .pay-l{border-radius:20px 20px 0 0;padding:16px 20px}
  .pay-l .big{font-size:34px;margin-bottom:6px}
  .pay-l .regels{display:none}
  .modal.wide{max-width:560px}
}
@media (max-width:560px){
  .top{gap:6px}
  .viewtabs{margin-left:0}.viewtabs button{padding:0 12px}.viewtabs kbd{display:none}
  .net span,#userNaam{display:none}
  .grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:92px;gap:8px;padding:10px}
  .tile .n{font-size:14px}
  .cash-grid{grid-template-columns:1fr}
  .mbar .paybtn small{display:none}
  .regel-acts{grid-template-columns:repeat(3,1fr)}
  .mbar .mb-bon{flex:0 0 auto;padding:0 12px;white-space:nowrap}
  .mbar .mb-bon small{display:none}
  .mbar .paybtn{padding:0 16px;gap:10px}
}
