/* Rolovio POS theme - Marula Oase colours. One stylesheet for the back office and the tills.
   Fonts are self-hosted so the system looks right even with no internet. */
@font-face{font-family:Nunito;font-weight:400;font-display:swap;src:url(fonts/nunito-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Nunito;font-weight:600;font-display:swap;src:url(fonts/nunito-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:Nunito;font-weight:700;font-display:swap;src:url(fonts/nunito-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:Nunito;font-weight:800;font-display:swap;src:url(fonts/nunito-latin-800-normal.woff2) format("woff2")}
@font-face{font-family:"Baloo 2";font-weight:700;font-display:swap;src:url(fonts/baloo-2-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"Baloo 2";font-weight:800;font-display:swap;src:url(fonts/baloo-2-latin-800-normal.woff2) format("woff2")}

:root{
  color-scheme:light;
  --navy:#0D2B3E;--navy2:#143B54;--navy-line:#1E4560;--navy-text:#E6F1F6;--navy-mute:#8FB0C2;
  --ink:#12303F;--mute:#5B7180;--bg:#F2F7F9;--card:#fff;--line:#DCE7EC;--line2:#C9D9E1;
  --blue:#1F9BD7;--blue-t:#D6EEFA;--blue-d:#0B5F8A;--blue-l:#4DB8EA;
  --lime:#8DC63F;--lime-t:#E5F3D2;--lime-d:#33520C;--lime-l:#A6D95C;
  --orange:#F0851F;--orange-t:#FDE6CC;--orange-d:#8A4300;--orange-l:#FFA046;
  --teal:#22B8A5;--teal-t:#D3F1EC;--teal-d:#0A6B5F;--teal-l:#3CD0BD;
  --purple-t:#E8E0FA;--purple-d:#4B3494;--purple-l:#B196F0;
  --aqua:#A9DCE9;--bad:#B3261E;--bad-t:#FBE3E1;--bad-line:#F3C4C0;
  --r:16px;--font:Nunito,system-ui,-apple-system,"Segoe UI",sans-serif;--display:"Baloo 2",Nunito,system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:400 16px/1.4 var(--font);-webkit-tap-highlight-color:transparent}
#app{height:100%}
h1,h2,h3{font-family:var(--display);font-weight:800;line-height:1.15;margin:0}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
.muted{color:var(--mute)}.right{text-align:right}.mono{font-variant-numeric:tabular-nums}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 20px;border-radius:14px;border:2px solid var(--line2);background:#fff;font-weight:800;text-decoration:none;color:var(--ink)}
.btn:active{transform:scale(.98)}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.primary{background:var(--navy);border-color:var(--navy);color:#fff}
.btn.lime,.btn.ok{background:var(--lime);border-color:var(--lime);color:var(--navy)}
.btn.blue{background:var(--blue);border-color:var(--blue);color:var(--navy)}
.btn.soft{background:var(--blue-t);border-color:var(--blue-t);color:var(--blue-d)}
.btn.bad{background:#fff;border-color:var(--bad-line);color:var(--bad)}
.btn.sm{min-height:44px;padding:0 16px;border-radius:12px;font-size:15px}
.btn svg,.ico{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
input,select{width:100%;min-height:52px;padding:0 16px;border-radius:14px;border:2px solid var(--line2);background:#fff;font-weight:600}
input[type=checkbox]{width:auto;min-height:0}
input::placeholder{color:var(--mute)}

/* ---------- toast + dialog ---------- */
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--navy);color:#fff;padding:14px 22px;border-radius:999px;font-weight:800;box-shadow:0 10px 30px #0004;z-index:50}
.toast.err{background:var(--bad-t);color:var(--bad);border:2px solid var(--bad-line)}
dialog{border:0;border-radius:22px;background:#fff;color:var(--ink);padding:24px;width:min(440px,94vw);box-shadow:0 20px 60px #0006}
dialog::backdrop{background:#0D2B3E99}
dialog h2{font-size:26px;margin-bottom:8px}
.keys{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.keys .btn{min-height:56px;padding:0 4px}

/* ---------- brand bits ---------- */
.logo-tile{background:#fff;border-radius:16px;height:76px;display:flex;align-items:center;justify-content:center;padding:6px 12px}
.logo-tile img{height:62px;width:auto}
.sw{display:inline-flex;align-items:center;gap:8px;height:28px;padding:0 12px;border-radius:999px;background:var(--navy);font-size:12px;font-weight:700;color:#A9C6D6;white-space:nowrap}
.sw img{height:14px;width:auto}

/* ---------- PIN login ---------- */
.login{min-height:100%;display:grid;place-items:center;padding:16px;background:var(--navy)}
.login .card{width:min(380px,100%);background:#fff;border-radius:26px;padding:22px;display:flex;flex-direction:column;gap:6px}
.login .card h1{font-size:26px;text-align:center}
.login .logo-tile{background:var(--bg);height:96px}.login .logo-tile img{height:80px}
.pinbox{font-size:34px;letter-spacing:.5em;text-align:center;min-height:60px;padding:8px;border-radius:14px;background:var(--bg);margin:8px 0}
.pad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.pad .btn{font-size:24px;min-height:66px}
.login .sw{align-self:center;margin-top:10px}

/* ---------- back office shell ---------- */
.app{display:flex;height:100%}
.side{width:288px;flex:none;background:var(--navy);color:var(--navy-text);display:flex;flex-direction:column;gap:3px;padding:16px;overflow-y:auto}
.nav-label{padding:12px 12px 3px;font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--navy-mute)}
.nav-item{display:flex;align-items:center;gap:12px;padding:4px 12px 4px 6px;border-radius:14px;border:0;background:transparent;color:var(--navy-text);font-size:16px;font-weight:800;text-align:left;width:100%;min-height:42px}
.nav-item:hover{background:var(--navy2)}
.nav-item.on{background:var(--lime);color:var(--navy)}
.nav-item .t{flex:1}
.chip{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;flex:none}
.chip svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chip.blue{background:#4DB8EA2E;color:var(--blue-l)}.chip.lime{background:#A6D95C2E;color:var(--lime-l)}
.chip.orange{background:#FFA0462E;color:var(--orange-l)}.chip.teal{background:#3CD0BD2E;color:var(--teal-l)}.chip.purple{background:#B196F02E;color:var(--purple-l)}
.nav-item.on .chip{background:#0D2B3E24;color:var(--navy)}
.nav-sub{display:flex;align-items:center;gap:10px;margin-left:30px;padding:4px 12px;min-height:34px;border-radius:10px;border:0;background:transparent;color:var(--navy-mute);font-size:14px;font-weight:700;width:calc(100% - 30px);text-align:left}
.nav-sub:hover{background:var(--navy2)}
.nav-sub.on{background:#8DC63F38;color:var(--navy-text)}
.nav-sub i{width:9px;height:9px;border-radius:50%;flex:none}
.nav-sub .t{flex:1}.nav-sub b{font-weight:700}
.side .me{margin-top:auto;display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:14px;background:var(--navy2);width:100%;border:0;text-align:left;color:var(--navy-text)}
.avatar{width:38px;height:38px;border-radius:50%;background:var(--lime);color:var(--navy);display:grid;place-items:center;font:800 18px var(--display);flex:none}
.me small{display:block;color:var(--navy-mute);font-weight:600;font-size:13px}
.side .sw{align-self:center;margin-top:8px;background:var(--navy)}
.main{flex:1;min-width:0;overflow-y:auto;padding:32px 40px}
.pagehead{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:20px}
.pagehead h1{font-size:38px}
.pagehead .sub{font-size:15px;font-weight:700;color:var(--mute)}
.pagehead .lead{display:flex;align-items:center;gap:16px}
.areaicon{width:60px;height:60px;border-radius:18px;display:grid;place-items:center;flex:none}
.areaicon svg{width:32px;height:32px;fill:none;stroke:var(--navy);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.actions{display:flex;gap:12px;flex-wrap:wrap}

.tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.tab{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 18px;border-radius:999px;border:2px solid var(--line2);background:#fff;font-weight:800;font-size:16px}
.tab small{font-size:14px;font-weight:700;opacity:.8}
.tab.on{background:var(--navy);border-color:var(--navy);color:#fff}

.card2{background:#fff;border:1px solid var(--line);border-radius:20px;padding:20px 22px;margin-bottom:16px}
.card2 h2,.card2 h3{margin-bottom:8px}
.qgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-bottom:16px}
.qtile{display:flex;align-items:center;gap:16px;padding:18px 20px;min-height:92px;border-radius:20px;background:#fff;border:2px solid var(--line);text-decoration:none;text-align:left;width:100%}
.qtile .chip{width:56px;height:56px;border-radius:16px}.qtile .chip svg{width:30px;height:30px}
.qtile b{display:block;font-size:18px;font-weight:800}.qtile span{font-size:14px;font-weight:600;color:var(--mute)}
.qtile .chip.blue{background:var(--blue-t);color:var(--blue-d)}.qtile .chip.lime{background:var(--lime-t);color:var(--lime-d)}
.qtile .chip.orange{background:var(--orange-t);color:var(--orange-d)}.qtile .chip.teal{background:var(--teal-t);color:var(--teal-d)}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:16px}
.kpi{padding:18px 20px;border-radius:20px;background:#fff;border:1px solid var(--line)}
.kpi .n{display:flex;align-items:center;gap:8px;font-weight:800;color:var(--mute)}
.kpi .n i{width:11px;height:11px;border-radius:50%}
.kpi .v{font:800 34px/1.15 var(--display)}
.kpi .s{font-size:14px;font-weight:600;color:var(--mute)}
.kpi.dark{background:var(--navy);border-color:var(--navy);color:#fff}.kpi.dark .n,.kpi.dark .s{color:#A9C6D6}

.pill{display:inline-block;padding:1px 10px;border-radius:999px;font-size:13px;font-weight:800;background:var(--blue-t);color:var(--blue-d)}
.pill.lime{background:var(--lime-t);color:var(--lime-d)}.pill.orange{background:var(--orange-t);color:var(--orange-d)}
.pill.purple{background:var(--purple-t);color:var(--purple-d)}.pill.teal{background:var(--teal-t);color:var(--teal-d)}.pill.bad{background:var(--bad-t);color:var(--bad)}

table{width:100%;border-collapse:collapse}
th,td{padding:10px 8px;border-top:1px solid #E6EEF2;text-align:left;font-size:15px;vertical-align:middle}
th{border-top:0;color:var(--mute);font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
td.right,th.right{text-align:right}
.tablewrap{overflow:auto}
.pimg{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;flex:none;background:var(--blue-t);color:var(--blue-d)}
.pimg svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pimg img{width:100%;height:100%;object-fit:cover;border-radius:14px}
.pname{font-weight:800;font-size:16px}.pcode{font-size:13px;font-weight:600;color:var(--mute)}
.meter{display:flex;align-items:center;gap:10px}.meter b{width:44px;font-size:19px}
.meter span{flex:1;height:10px;border-radius:6px;background:#E6EEF2;overflow:hidden;min-width:60px}.meter span i{display:block;height:10px;border-radius:6px;background:var(--blue)}
.meter.low span i{background:var(--orange)}
.low{color:var(--bad);font-weight:800}
.maprow{display:grid;grid-template-columns:170px 1fr;gap:10px;align-items:center;margin:8px 0}
.warn{color:var(--orange-d)}.errtxt{color:var(--bad)}

/* ---------- till ---------- */
.till{display:grid;grid-template-columns:minmax(0,1fr) 400px;height:100%}
.left{display:flex;flex-direction:column;min-width:0;min-height:0;padding:16px 16px 12px;gap:12px}
.topbar{display:flex;gap:12px;align-items:center}
.topbar .logo-tile{height:56px;padding:0 10px;border:1px solid var(--line);border-radius:14px}.topbar .logo-tile img{height:42px}
.scanbox{flex:1;display:flex;align-items:center;gap:12px;min-height:56px;padding:0 18px;border-radius:14px;background:#fff;border:3px solid var(--lime)}
.scanbox input{border:0;outline:0;min-height:0;padding:0;font-size:20px;font-weight:700;background:transparent}
.scanbox svg{width:26px;height:26px;fill:none;stroke:var(--lime-d);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.who{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 16px;border-radius:14px;background:var(--navy);color:#fff;font-weight:800;white-space:nowrap}
.who .avatar{width:32px;height:32px;font-size:15px}
.who a{color:#A9C6D6;font-size:13px;font-weight:700}
.cats{display:flex;gap:10px;overflow-x:auto;padding-bottom:2px}
.cat{flex:1 0 auto;min-width:96px;min-height:64px;padding:0 16px;border-radius:16px;border:3px solid var(--line2);background:#fff;font-weight:800;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}
.cat svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.cat.on{outline:3px solid var(--navy);outline-offset:1px}
.hue-navy{background:var(--navy);border-color:var(--navy);color:#fff}
.hue-blue{background:var(--blue-t);border-color:#BFE3F5;color:var(--blue-d)}.hue-orange{background:var(--orange-t);border-color:#F8D3AC;color:var(--orange-d)}
.hue-lime{background:var(--lime-t);border-color:#D2E8B0;color:var(--lime-d)}.hue-teal{background:var(--teal-t);border-color:#B4E5DD;color:var(--teal-d)}
.hue-purple{background:var(--purple-t);border-color:#D5C9F4;color:var(--purple-d)}
.grid{flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;align-content:start}
.tile{display:flex;flex-direction:column;padding:0;border-radius:18px;border:2px solid var(--line);background:#fff;overflow:hidden;text-align:left;min-height:176px}
.tile:active{transform:scale(.98)}
.tile .timg{height:84px;width:100%;display:grid;place-items:center}
.tile .timg svg{width:48px;height:48px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tile .timg img{width:100%;height:100%;object-fit:cover}
.tile .tbody{flex:1;display:flex;flex-direction:column;justify-content:space-between;gap:6px;padding:8px 12px 10px;width:100%}
.tile b{font-size:17px;font-weight:800;line-height:1.2}
.tile .tp{display:flex;align-items:baseline;justify-content:space-between}
.tile .tp span{font:800 22px var(--display)}.tile .tp small{font-size:13px;font-weight:700;color:var(--mute)}
.scanhint{display:inline-flex;align-items:center;gap:8px;padding:4px 14px;border-radius:999px;background:var(--lime-t);color:var(--lime-d);font-size:14px;font-weight:800}
.scanhint::before{content:"";width:9px;height:9px;border-radius:50%;background:#5E8F1A}
.scanhint.warn{background:var(--orange-t);color:var(--orange-d)}.scanhint.warn::before{background:var(--orange)}
.footrow{display:flex;align-items:center;justify-content:space-between;gap:12px}
.right-pane{background:#fff;border-left:1px solid var(--line);display:flex;flex-direction:column;height:100%;min-height:0}
.right-pane .head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px 10px}
.right-pane .head h2{font-size:26px}
.cart{flex:1;overflow:auto;padding:0 22px}
.empty{color:var(--mute);text-align:center;padding:40px 10px;font-weight:700}
.line{display:flex;flex-direction:column;gap:8px;padding:12px 0;border-top:1px solid #E6EEF2}
.line .top{display:flex;justify-content:space-between;gap:12px;font-size:17px;font-weight:800}
.qtyrow{display:flex;gap:10px;align-items:center}
.qtyrow .btn{min-height:48px;min-width:48px;padding:0;border-radius:14px}
.qtyrow .q{min-width:36px;text-align:center;font-size:22px;font-weight:800}
.qtyrow .each{font-size:14px;font-weight:700;color:var(--mute)}
.qtyrow .rm{margin-left:auto}
.totals{padding:14px 22px 12px;background:var(--bg);border-top:1px solid var(--line)}
.totals .big{display:flex;align-items:baseline;justify-content:space-between}
.totals .big span:first-child{font-size:20px;font-weight:800}
.totals .big span:last-child{font:800 46px/1.1 var(--display)}
.totals .vat{font-size:14px;font-weight:700;color:var(--mute);text-align:right;min-height:20px}
.pay{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px 22px 10px}
.pay .btn{flex-direction:column;height:88px;border-radius:18px;font-size:19px;gap:4px}
.pay .btn svg{width:30px;height:30px}
.pay .btn.aqua{background:var(--aqua);border-color:var(--aqua);color:var(--navy)}
.paycancel{padding:0 22px 16px}.paycancel .btn{width:100%}
.slip{font:13px/1.35 ui-monospace,Menlo,Consolas,monospace;background:#fff;color:#000;padding:14px;border-radius:8px;width:300px;max-width:100%;margin:10px auto;border:1px dashed var(--line2)}
.slip .c{text-align:center}.slip hr{border:0;border-top:1px dashed #000;margin:8px 0}.slip .r{display:flex;justify-content:space-between;gap:8px}
@media print{body *{visibility:hidden}.slip,.slip *{visibility:visible}.slip{position:absolute;left:0;top:0;width:72mm;margin:0;padding:2mm;border:0}}

/* ---------- small screens ---------- */
@media (max-width:1000px){
  .till{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;height:auto;min-height:100%}
  .right-pane{height:auto;border-left:0;border-top:1px solid var(--line)}
  .main{padding:20px 16px}
  .side{width:76px;padding:10px 8px}
  .side .nav-label,.side .nav-sub,.side .nav-item .t,.side .me div,.side .sw,.side .logo-tile{display:none}
  .side .nav-item{justify-content:center;padding:4px}
  .side .me{justify-content:center;padding:6px}
  .maprow{grid-template-columns:1fr}
}
