@font-face{font-family:Quicksand;font-weight:500;font-display:swap;src:url(quicksand-latin-500-normal.woff2) format('woff2')}
@font-face{font-family:Quicksand;font-weight:700;font-display:swap;src:url(quicksand-latin-700-normal.woff2) format('woff2')}
:root{
  --plum:#6B2441;--plum-d:#521a31;--plum-l:#8a3a5c;--plum-50:#f6ecf0;--plum-100:#ecd7e0;
  --cream:#FAF5EF;--paper:#fff;--ink:#1d1418;--ink-2:#5d4f55;--ink-3:#8f8187;--line:#e8dfe2;
  --ok:#2f7d4f;--ok-50:#e8f4ec;--warn:#a55d00;--warn-50:#fdf1df;--bad:#b3261e;--bad-50:#fbe9e7;
  --r:14px;--r-s:10px;--shadow:0 1px 2px rgba(60,20,35,.06),0 4px 16px rgba(60,20,35,.06);
  --font:Quicksand,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--cream);color:var(--ink);font-family:var(--font);font-weight:500;font-size:16px;line-height:1.4;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font:inherit;color:inherit}
b,strong,h1,h2,h3,th{font-weight:700}
h1{font-size:1.45rem;margin:0 0 .25rem}h2{font-size:1.15rem;margin:1.2rem 0 .5rem}h3{font-size:1rem;margin:.9rem 0 .4rem}
.muted{color:var(--ink-2)}.small{font-size:.85rem}.tiny{font-size:.78rem}.right{text-align:right}.center{text-align:center}
.num{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.hidden{display:none!important}

/* layout */
#app{min-height:100vh;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:20;background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:.75rem;padding:.6rem 1rem}
.topbar img{height:30px}
.topbar .who{margin-left:auto;text-align:right;line-height:1.15}
.topbar .who .tiny{color:var(--ink-3)}
.main{flex:1;width:100%;max-width:1100px;margin:0 auto;padding:1rem 1rem 6.5rem}
.nav{position:fixed;bottom:0;left:0;right:0;z-index:30;background:var(--paper);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:.35rem .25rem calc(.35rem + env(safe-area-inset-bottom))}
.nav button{flex:1;background:none;border:0;padding:.35rem .2rem;border-radius:var(--r-s);display:flex;flex-direction:column;align-items:center;gap:2px;font-size:.74rem;color:var(--ink-2);cursor:pointer;position:relative}
.nav button svg{width:24px;height:24px}
.nav button.on{color:var(--plum);background:var(--plum-50)}
.nav .badge{position:absolute;top:2px;right:calc(50% - 22px);background:var(--bad);color:#fff;border-radius:99px;font-size:.68rem;min-width:18px;height:18px;line-height:18px;padding:0 5px}
@media(min-width:900px){
  #app{flex-direction:row;flex-wrap:wrap}
  .topbar{width:100%}
  .nav{position:sticky;top:51px;height:calc(100vh - 51px);flex-direction:column;justify-content:flex-start;width:200px;border-top:0;border-right:1px solid var(--line);padding:1rem .6rem;gap:.25rem}
  .nav button{flex:0;flex-direction:row;gap:.6rem;font-size:.95rem;padding:.65rem .8rem;justify-content:flex-start}
  .nav .badge{position:static;margin-left:auto}
  .main{flex:1;max-width:none;width:auto;padding:1.5rem 2rem 3rem}
}

/* blocks */
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:1rem;box-shadow:var(--shadow);margin-bottom:1rem}
.card.tight{padding:.75rem}
.row{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.row.between{justify-content:space-between}
.grid2{display:grid;grid-template-columns:1fr;gap:.75rem}
@media(min-width:640px){.grid2{grid-template-columns:1fr 1fr}}
.grid3{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.6rem}
.stack>*+*{margin-top:.75rem}
hr{border:0;border-top:1px solid var(--line);margin:1rem 0}

/* forms */
label.f{display:block;font-size:.85rem;color:var(--ink-2);margin-bottom:.25rem}
.field{margin-bottom:.8rem}
input[type=text],input[type=password],input[type=number],input[type=tel],input[type=date],input[type=time],input[type=search],select,textarea{
  width:100%;background:var(--paper);border:1.5px solid var(--line);border-radius:var(--r-s);padding:.7rem .8rem;min-height:48px;outline:none}
textarea{min-height:70px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--plum)}
input.big{font-size:1.25rem;font-weight:700}
.check{display:flex;align-items:center;gap:.55rem;padding:.4rem 0;cursor:pointer}
.check input{width:22px;height:22px;accent-color:var(--plum)}
.chips{display:flex;flex-wrap:wrap;gap:.4rem}
.chip{border:1.5px solid var(--line);background:var(--paper);border-radius:99px;padding:.45rem .85rem;cursor:pointer;font-size:.9rem;min-height:40px}
.chip.on{background:var(--plum);color:#fff;border-color:var(--plum)}
.seg{display:flex;border:1.5px solid var(--line);border-radius:var(--r-s);overflow:hidden;background:var(--paper)}
.seg button{flex:1;border:0;background:none;padding:.65rem .5rem;cursor:pointer;min-height:46px;font-size:.92rem}
.seg button+button{border-left:1.5px solid var(--line)}
.seg button.on{background:var(--plum);color:#fff}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;border:0;border-radius:var(--r-s);padding:.75rem 1.1rem;min-height:48px;cursor:pointer;background:var(--plum);color:#fff;font-weight:700;text-decoration:none}
.btn:hover{background:var(--plum-d)}
.btn:disabled{opacity:.5;cursor:default}
.btn.sec{background:var(--plum-50);color:var(--plum)}
.btn.sec:hover{background:var(--plum-100)}
.btn.ghost{background:none;color:var(--plum);border:1.5px solid var(--plum-100)}
.btn.danger{background:var(--bad-50);color:var(--bad)}
.btn.wa{background:#1f8f55}
.btn.block{width:100%}
.btn.sm{min-height:36px;padding:.4rem .75rem;font-size:.88rem}
.btn.xl{min-height:58px;font-size:1.1rem}
.link{background:none;border:0;color:var(--plum);cursor:pointer;padding:.3rem 0;text-decoration:underline}

/* tables */
.tw{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -.25rem}
table{width:100%;border-collapse:collapse;font-size:.9rem}
th,td{padding:.5rem .45rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{font-size:.78rem;color:var(--ink-2);text-transform:uppercase;letter-spacing:.02em;background:var(--plum-50)}
tr.total td{font-weight:700;border-top:2px solid var(--plum-100);background:#fcf8f9}
tr.void td{color:var(--ink-3);text-decoration:line-through}
tr.click{cursor:pointer}tr.click:hover td{background:#fcf8f9}

/* pills, notes */
.pill{display:inline-block;border-radius:99px;padding:.1rem .55rem;font-size:.75rem;font-weight:700;background:var(--plum-50);color:var(--plum);white-space:nowrap}
.pill.ok{background:var(--ok-50);color:var(--ok)}.pill.warn{background:var(--warn-50);color:var(--warn)}.pill.bad{background:var(--bad-50);color:var(--bad)}.pill.grey{background:#efeaec;color:var(--ink-2)}
.note{border-radius:var(--r-s);padding:.7rem .85rem;margin:.6rem 0;font-size:.92rem}
.note.warn{background:var(--warn-50);color:#6b3d00}.note.bad{background:var(--bad-50);color:var(--bad)}.note.ok{background:var(--ok-50);color:#1d5434}.note.info{background:var(--plum-50);color:var(--plum-d)}
.demo{background:#2b1520;color:#f5e9ee;font-size:.82rem;padding:.45rem 1rem;display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;width:100%}
.demo button{background:none;border:1px solid #8d6a79;color:#f5e9ee;border-radius:8px;padding:.15rem .55rem;cursor:pointer}

/* stats */
.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem;margin-bottom:1rem}
@media(min-width:760px){.stats{grid-template-columns:repeat(4,1fr)}}
.stat{background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:.75rem .9rem}
.stat .k{font-size:.78rem;color:var(--ink-2)}.stat .v{font-size:1.3rem;font-weight:700;font-variant-numeric:tabular-nums}

/* sign-in */
.signin{width:100%;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem;background:linear-gradient(180deg,var(--cream),#f3e7ec)}
.signin .box{width:100%;max-width:420px}
.signin .logo{display:block;width:210px;margin:0 auto 1.5rem}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:.6rem;width:100%;max-width:640px}
.tile{background:var(--paper);border:1.5px solid var(--line);border-radius:var(--r);padding:.85rem .4rem;text-align:center;cursor:pointer}
.tile:hover{border-color:var(--plum)}
.av{width:56px;height:56px;border-radius:50%;background:var(--plum);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.3rem;margin:0 auto .45rem}
.av.sm{width:34px;height:34px;font-size:.9rem;margin:0}
.pinpad{display:grid;grid-template-columns:repeat(3,1fr);gap:.55rem;max-width:300px;margin:1rem auto}
.pinpad button{min-height:62px;font-size:1.45rem;font-weight:700;border-radius:var(--r);border:1.5px solid var(--line);background:var(--paper);cursor:pointer}
.pinpad button:active{background:var(--plum-50)}
.dots{display:flex;gap:.6rem;justify-content:center;margin:.75rem 0}
.dots i{width:16px;height:16px;border-radius:50%;border:2px solid var(--plum)}
.dots i.f{background:var(--plum)}

/* sale */
.line{border:1.5px solid var(--line);border-radius:var(--r);padding:.8rem;margin-bottom:.7rem;background:var(--paper)}
.line .top{display:flex;justify-content:space-between;gap:.5rem;align-items:flex-start}
.svc-pick{max-height:55vh;overflow:auto;border:1px solid var(--line);border-radius:var(--r-s);background:var(--paper)}
.svc-pick .dh{position:sticky;top:0;background:var(--plum-50);color:var(--plum);font-weight:700;font-size:.82rem;padding:.4rem .7rem}
.svc-pick button{display:flex;width:100%;justify-content:space-between;gap:.5rem;border:0;border-bottom:1px solid var(--line);background:none;padding:.7rem;text-align:left;cursor:pointer;min-height:48px}
.svc-pick button:hover{background:#fcf8f9}
.totalbar{position:sticky;bottom:4.6rem;background:var(--plum);color:#fff;border-radius:var(--r);padding:.8rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem;box-shadow:0 6px 18px rgba(107,36,65,.25);z-index:5}
@media(min-width:900px){.totalbar{bottom:1rem}}
.totalbar .v{font-size:1.35rem;font-weight:700}
.totalbar .btn{background:#fff;color:var(--plum)}

/* modal */
.modal-bg{position:fixed;inset:0;background:rgba(30,10,18,.45);z-index:50;display:flex;align-items:flex-end;justify-content:center}
@media(min-width:640px){.modal-bg{align-items:center}}
.modal{background:var(--cream);width:100%;max-width:640px;max-height:92vh;overflow:auto;border-radius:18px 18px 0 0;padding:1.1rem 1rem 1.5rem}
@media(min-width:640px){.modal{border-radius:18px}}
.modal .mh{display:flex;justify-content:space-between;align-items:center;margin-bottom:.6rem}
.x{background:none;border:0;font-size:1.6rem;line-height:1;cursor:pointer;color:var(--ink-2);padding:.2rem .5rem}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:5.5rem;background:var(--ink);color:#fff;padding:.7rem 1.1rem;border-radius:12px;z-index:80;max-width:90vw;box-shadow:var(--shadow)}
.toast.bad{background:var(--bad)}

/* receipt */
.receipt{background:#fff;border:1px dashed #cdbfc5;border-radius:var(--r);padding:1rem;max-width:380px;margin:0 auto 1rem;font-size:.92rem}
.receipt img{width:150px;display:block;margin:0 auto .5rem}
.receipt .ln{display:flex;justify-content:space-between;gap:.75rem;padding:.2rem 0}

/* tabs */
.tabs{display:flex;gap:.35rem;overflow-x:auto;margin-bottom:1rem;padding-bottom:.2rem}
.tabs button{border:1.5px solid var(--line);background:var(--paper);border-radius:99px;padding:.45rem .9rem;white-space:nowrap;cursor:pointer;min-height:40px}
.tabs button.on{background:var(--plum);color:#fff;border-color:var(--plum)}

/* print */
.print-head{display:none}
@media print{
  body{background:#fff}
  .topbar,.nav,.demo,.noprint,.totalbar,.toast{display:none!important}
  .main{padding:0}
  .card{box-shadow:none;border:0;padding:0}
  .print-head{display:flex;justify-content:space-between;align-items:flex-end;border-bottom:2px solid var(--plum);padding-bottom:.4rem;margin-bottom:.6rem}
  .print-head img{height:42px}
  table{font-size:10pt}th{background:#f2e8ec!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  h2{break-after:avoid}
  .tw{overflow:visible}
}

@media print{
  body.print-receipt *{visibility:hidden}
  body.print-receipt #receipt,body.print-receipt #receipt *{visibility:visible}
  body.print-receipt #receipt{position:absolute;left:0;top:0;border:0;margin:0}
  body.print-receipt .modal-bg{position:static;background:none}
}
