/* MSTill — till-first design. One accent (berry), money in green, everything else quiet. */
@font-face{font-family:Manrope;src:url(../fonts/manrope.woff2) format("woff2");font-weight:200 800;font-display:swap}

:root{
  --ink:#221f29;--ink-2:#35313e;--ink-soft:#4a4655;
  /* The workspace takes a whisper of the shop's system colour, so each shop's MSTill feels like its own */
  --canvas:color-mix(in srgb,var(--berry) 2.5%,#f3f3f6);--paper:#fff;--line:#e8e6ec;--line-strong:#d4d1db;
  --text:#221f29;--muted:#6a6675;--faint:#9c98a7;
  --berry:#d0346c;--berry-deep:#a92356;--berry-tint:#fcebf1;--berry-ring:#f4b3cb;
  --mint:#138a5e;--mint-tint:#e3f5ec;
  --amber:#a3650c;--amber-tint:#fff3dc;
  --red:#c62f3a;--red-tint:#fdeced;
  --blue:#2a62b8;--blue-tint:#e8f0fc;
  --r-lg:18px;--r:12px;--r-sm:11px;
  --side:236px;
  --on-ink:#fff;--bar:#221f29;--bar-2:#35313e;--bar-text:#e9e5ee;--bar-muted:#b9b4c3;
  --hover:color-mix(in srgb,var(--berry) 4%,#fafafb);--bar-soft:#e7c2d2;--shadow:rgba(34,31,41,.14);
  --track:color-mix(in srgb,var(--berry) 4%,#ebeaf0);        /* behind segmented choices */
  --th:color-mix(in srgb,var(--berry) 2%,#f8f8fa);         /* table headings */
  --lift:0 1px 2px rgba(34,31,41,.05),0 1px 3px rgba(34,31,41,.04);   /* panels sit just above the page */
  --float:0 18px 40px -14px rgba(34,31,41,.28),0 3px 8px rgba(34,31,41,.06); /* menus, notes, dialogs */
  color-scheme:light;
}
/* Dark theme: same names, darker values. Each person picks it from the moon button. */
:root[data-theme=dark]{
  --ink:#ece8f2;--ink-2:#d6d0de;--ink-soft:#c9c3d3;--on-ink:#1b1820;
  --canvas:color-mix(in srgb,var(--berry) 4%,#121016);--paper:#1c1922;--line:#2d2935;--line-strong:#423d4d;
  --text:#ece8f2;--muted:#a59fb0;--faint:#7d778a;
  --berry:#e04f86;--berry-deep:#f27aa8;--berry-tint:#3b1a2a;--berry-ring:#7a2c4e;
  --mint:#3fc792;--mint-tint:#11301f;
  --amber:#e7a940;--amber-tint:#34280f;
  --red:#f36e78;--red-tint:#3b171b;
  --blue:#7aa9f2;--blue-tint:#172741;
  --bar:#0d0b11;--bar-2:#25212d;--bar-text:#e9e5ee;--bar-muted:#9d97a8;
  --hover:color-mix(in srgb,var(--berry) 6%,#211e27);--bar-soft:#5b2b42;--shadow:rgba(0,0,0,.45);
  --track:#27232e;--th:#201d26;
  --lift:0 1px 2px rgba(0,0,0,.3);
  --float:0 20px 44px -14px rgba(0,0,0,.7),0 3px 8px rgba(0,0,0,.3);
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--canvas);color:var(--text);font-family:Manrope,system-ui,"Segoe UI",Roboto,sans-serif;font-weight:500;line-height:1.5;font-feature-settings:"tnum" 1;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:var(--berry-ring)}
a{color:var(--berry-deep);text-decoration:none}a:hover{text-decoration:underline}
h1,h2,h3,p{margin:0}
h1{font-size:1.9rem;font-weight:800;letter-spacing:-.03em;line-height:1.12}
h2{font-size:1.1rem;font-weight:750;letter-spacing:-.015em}
h3{font-size:1rem;font-weight:700}
[x-cloak]{display:none!important}
.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.muted{color:var(--muted)}.faint{color:var(--faint)}.ok{color:var(--mint)}.bad{color:var(--red)}.warn{color:var(--amber)}
.small{font-size:.875rem}.xs{font-size:.8rem}.bold{font-weight:700}.right{text-align:right}.center{text-align:center}.nowrap{white-space:nowrap}.grow{flex:1}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
:is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--berry-ring);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ===== Back office shell ===== */
.shell{display:flex;min-height:100vh}
.side{position:fixed;inset:0 auto 0 0;width:var(--side);background:var(--paper);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:40;transition:transform .2s}
.logo{display:flex;align-items:center;gap:.7rem;padding:1.3rem 1.25rem 1rem;min-width:0}
.logo>div{min-width:0}
.side .brand-logo{max-width:92px!important}
.logo-mark{width:36px;height:36px;border-radius:11px;background:var(--berry);color:#fff;display:grid;place-items:center;font-weight:800;font-size:1.05rem;flex:none;box-shadow:inset 0 -2px 0 rgba(0,0,0,.12)}
.logo b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:1.05rem;line-height:1.2;font-weight:800}
.logo small{display:block;color:var(--muted);font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.till-btn{margin:.25rem 1rem 1rem;display:flex;align-items:center;justify-content:center;gap:.55rem;height:48px;border-radius:14px;background:var(--ink);color:var(--on-ink);font-weight:750;text-decoration:none;box-shadow:0 8px 18px -10px rgba(34,31,41,.55),inset 0 1px 0 rgba(255,255,255,.08);transition:background .15s,transform .15s}
.till-btn:hover{background:var(--ink-2);text-decoration:none;transform:translateY(-1px)}
.till-btn svg{width:20px;height:20px}
.menu{flex:1;overflow-y:auto;padding:0 .75rem}
.menu-gap{height:1px;background:var(--line);margin:.75rem .5rem}
.menu a{position:relative;display:flex;align-items:center;gap:.75rem;height:44px;white-space:nowrap;padding:0 .75rem;border-radius:12px;color:var(--ink-soft);font-weight:650;font-size:.95rem;text-decoration:none;margin-bottom:2px;transition:background .15s,color .15s}
.menu a:hover{background:var(--hover);color:var(--text);text-decoration:none}
.menu a.on{background:var(--berry-tint);color:var(--berry-deep);font-weight:750}
.menu a.on svg{color:var(--berry)}
/* "You are here": a short bar on the left of the open page */
.menu a.on::before{content:"";position:absolute;left:0;top:50%;width:4px;height:44%;transform:translateY(-50%);border-radius:0 4px 4px 0;background:var(--berry)}
.menu svg{width:20px;height:20px;flex:none;color:var(--muted);transition:color .15s}
.menu a:hover svg{color:var(--text)}
/* Reminder badges: grey = good to know, amber = needs doing, red = someone is waiting */
.count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 .45rem;border-radius:99px;font-size:.74rem;font-weight:800;line-height:1;background:var(--track);color:var(--ink-soft);font-variant-numeric:tabular-nums}
.count.info{background:var(--blue-tint);color:var(--blue)}
.count.warn{background:var(--amber-tint);color:var(--amber)}
.count.urgent{background:var(--red);color:#fff;box-shadow:0 0 0 3px var(--red-tint)}
.menu .count{margin-left:auto}
.tip{position:fixed;z-index:120;max-width:260px;padding:.5rem .75rem;border-radius:10px;background:var(--ink);color:var(--on-ink);font-size:.82rem;font-weight:650;line-height:1.35;box-shadow:var(--float);pointer-events:none;opacity:0;transform:translateY(2px);transition:opacity .12s,transform .12s}
.tip.on{opacity:1;transform:none}
.me{border-top:1px solid var(--line);padding:.9rem 1.1rem;display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.avatar{width:38px;height:38px;border-radius:50%;background:var(--berry-tint);color:var(--berry-deep);display:grid;place-items:center;font-weight:800;font-size:.85rem;flex:none}
.me b{display:block;font-size:.9rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}.me small{color:var(--muted);font-size:.8rem}
.me-actions{width:100%;display:flex;gap:.25rem;justify-content:space-between}
.me-actions>*{flex:1}.me-actions .btn{width:100%}

.page{flex:1;margin-left:var(--side);min-width:0;display:flex;flex-direction:column}
.page-in{width:100%;max-width:1180px;margin:0 auto;padding:2rem 2.5rem 1.25rem;flex:1}
.head{display:flex;align-items:flex-end;gap:1rem 1.25rem;margin-bottom:1.6rem;flex-wrap:wrap}
.head .t{flex:1;min-width:240px}
.head p{color:var(--muted);margin-top:.4rem;font-size:.98rem;max-width:80ch}
.head-actions{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.head-actions select.input{height:42px;font-weight:700;border-radius:12px;box-shadow:var(--lift)}
.mob-bar{display:none}
.foot{padding:.25rem 2.5rem .9rem;max-width:1180px;margin:0 auto;width:100%;color:var(--faint);font-size:.78rem;display:flex;justify-content:space-between;gap:1rem}
.foot a{color:var(--muted)}
.scrim{display:none}
@media (max-width:980px){
  .side{transform:translateX(-100%);box-shadow:none;visibility:hidden;transition:transform .2s,visibility .2s}
  .side.open{transform:none;box-shadow:0 0 40px rgba(0,0,0,.2);visibility:visible}
  .scrim.open{display:block;position:fixed;inset:0;background:rgba(37,34,43,.4);z-index:30}
  .page{margin-left:0}
  .mob-bar{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;background:var(--paper);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
  .page-in{padding:1.5rem 1rem 2rem}
  .foot{padding:0 1rem 1.25rem}
  h1{font-size:1.45rem}
}

/* ===== Building blocks ===== */
.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--lift)}
.panel-pad{padding:1.5rem}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.05rem 1.5rem;border-bottom:1px solid var(--line);flex-wrap:wrap;min-height:58px}
.panel-head h2{font-size:1.02rem}
.section{margin-bottom:1.5rem}
.cols{display:grid;gap:1.5rem}
.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.cols-wide{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr)}
@media (max-width:1000px){.cols-2,.cols-wide{grid-template-columns:minmax(0,1fr)}}
.row{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.between{justify-content:space-between}
.stack{display:flex;flex-direction:column;gap:1rem}

/* Summary strip: one panel, figures separated by rules (instead of a wall of cards) */
.figures{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--lift);margin-bottom:1.75rem;overflow:hidden}
.fig{padding:1.3rem 1.5rem 1.35rem;border-left:1px solid var(--line);min-width:0}
.fig:first-child{border-left:0}
.fig .k{display:flex;align-items:center;gap:.45rem;color:var(--muted);font-size:.86rem;font-weight:650}
.fig .k svg{width:16px;height:16px;flex:none;color:var(--faint)}
.fig .v{font-size:2rem;font-weight:800;letter-spacing:-.03em;line-height:1.15;margin-top:.45rem}
.fig .s{color:var(--muted);font-size:.84rem;margin-top:.25rem}
/* The figure that matters most today gets a wash of the shop colour */
.fig.lead{background:color-mix(in srgb,var(--berry) 5%,var(--paper))}
.fig.lead .k,.fig.lead .k svg{color:var(--berry-deep)}
.fig.lead .v{font-size:2.35rem}
a.fig{color:inherit;text-decoration:none}a.fig:hover{background:var(--hover)}
@media (max-width:700px){.fig{border-left:0;border-top:1px solid var(--line)}.fig:first-child{border-top:0}}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;height:44px;padding:0 1.1rem;border-radius:var(--r-sm);border:1px solid var(--line-strong);background:var(--paper);color:var(--text);font:inherit;font-weight:700;font-size:.95rem;cursor:pointer;text-decoration:none;white-space:nowrap;box-shadow:0 1px 2px rgba(34,31,41,.05);transition:background .15s,border-color .15s,box-shadow .15s}
.btn:hover{background:var(--hover);border-color:color-mix(in srgb,var(--line-strong) 70%,var(--text));text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn svg{width:18px;height:18px;flex:none}
.btn-main{background:var(--berry);border-color:var(--berry);color:#fff;box-shadow:0 1px 2px rgba(34,31,41,.12),0 6px 14px -8px var(--berry),inset 0 1px 0 rgba(255,255,255,.16)}
.btn-main:hover{background:var(--berry-deep);border-color:var(--berry-deep)}
.btn-ink{background:var(--ink);border-color:var(--ink);color:var(--on-ink)}.btn-ink:hover{background:var(--ink-2);border-color:var(--ink-2)}
.btn-red{background:var(--red);border-color:var(--red);color:#fff}.btn-red:hover{background:#a8252f;border-color:#a8252f}
.btn-quiet{border-color:transparent;background:transparent;box-shadow:none}.btn-quiet:hover{background:var(--hover);border-color:transparent}
.btn-danger-quiet{border-color:transparent;background:transparent;color:var(--red);box-shadow:none}.btn-danger-quiet:hover{background:var(--red-tint);border-color:transparent}
.btn-sm{height:36px;padding:0 .8rem;font-size:.875rem}
.btn-lg{height:56px;padding:0 1.5rem;font-size:1.1rem;border-radius:var(--r)}
.btn-block{width:100%}
.btn-icon{width:40px;padding:0}
.btn[disabled]{opacity:.4;cursor:not-allowed;box-shadow:none}

/* More menu */
.more{position:relative;display:inline-block}
.more>summary{list-style:none}.more>summary::-webkit-details-marker{display:none}
.more-list{position:absolute;right:0;top:calc(100% + 6px);background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:var(--float);min-width:200px;padding:.35rem;z-index:15;text-align:left}
.more-list a,.more-list button{display:flex;align-items:center;gap:.6rem;width:100%;padding:.6rem .75rem;border-radius:8px;border:0;background:none;font:inherit;font-weight:600;font-size:.92rem;color:var(--text);cursor:pointer;text-decoration:none}
.more-list a:hover,.more-list button:hover{background:var(--hover);text-decoration:none}
.more-list svg{width:17px;height:17px;color:var(--muted)}
.more-list .danger{color:var(--red)}.more-list .danger svg{color:var(--red)}

/* Forms */
.field{display:flex;flex-direction:column;gap:.35rem;margin-bottom:1rem}
.field>label,.lbl{font-weight:700;font-size:.9rem}
.hint{font-size:.84rem;color:var(--muted)}
.input{width:100%;height:46px;padding:0 .9rem;border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--paper);color:var(--text);font:inherit;font-weight:500;font-size:1rem;transition:border-color .15s,box-shadow .15s}
.input::placeholder{color:var(--faint)}
.input:hover{border-color:color-mix(in srgb,var(--line-strong) 65%,var(--text))}
textarea.input{height:auto;min-height:90px;padding:.7rem .9rem;resize:vertical}
/* One chevron for every drop-down, in light and dark */
select.input{appearance:none;-webkit-appearance:none;padding-right:2.4rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d889a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .8rem center;background-size:16px;cursor:pointer}
.input:focus{border-color:var(--berry);outline:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--berry) 16%,transparent)}
.input-lg{height:56px;font-size:1.15rem}
.check{display:flex;align-items:center;gap:.65rem;font-weight:600;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--berry)}
.search{position:relative;flex:1;min-width:220px}
.search svg{position:absolute;left:.9rem;top:50%;transform:translateY(-50%);width:19px;height:19px;color:var(--faint);pointer-events:none}
.search .input{padding-left:2.6rem}
.filters{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;padding:.9rem 1.5rem;border-bottom:1px solid var(--line)}
.filters .input{width:auto;height:42px}
.filters .search .input{width:100%}
.grid-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1.25rem}
@media (max-width:640px){.grid-form{grid-template-columns:1fr}}

/* Tabs */
.tabs{display:inline-flex;gap:2px;flex-wrap:wrap;padding:4px;border-radius:13px;background:var(--track)}
.tabs a,.tabs button{height:36px;display:inline-flex;align-items:center;padding:0 .95rem;border-radius:10px;font-weight:700;font-size:.88rem;color:var(--muted);border:0;background:none;font-family:inherit;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .15s,color .15s}
.tabs a:hover,.tabs button:hover{color:var(--text);text-decoration:none}
.tabs .on{background:var(--paper)!important;color:var(--text)!important;box-shadow:0 1px 2px rgba(34,31,41,.1),0 1px 1px rgba(34,31,41,.04)}
:root[data-theme=dark] .tabs .on{background:#3a3543!important}
.toolbar{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin-bottom:1.5rem}

/* Tables */
.table-wrap{overflow-x:auto}
.table{width:100%;border-collapse:collapse;font-size:.95rem}
.table th{text-align:left;font-size:.8rem;color:var(--muted);font-weight:700;padding:.62rem 1.5rem;background:var(--th);border-bottom:1px solid var(--line);white-space:nowrap}
.table td{padding:.78rem 1.5rem;border-bottom:1px solid var(--line);vertical-align:middle}
.table tbody tr:last-child td{border-bottom:0}
.table tbody tr:hover td{background:var(--hover)}
.table .right{text-align:right}
.table tfoot td{font-weight:800;border-top:1px solid var(--line-strong);border-bottom:0;background:var(--th)}
.table .sub{display:block;color:var(--muted);font-size:.85rem;margin-top:.1rem}
.table tr.voided td{color:var(--faint)}
.table tr.voided .amt{text-decoration:line-through}
.empty{padding:2.75rem 1rem 3rem;text-align:center;color:var(--muted)}
.empty::before{content:"";display:block;width:54px;height:54px;margin:0 auto 1rem;border-radius:16px;background:var(--track) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d889a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h4.5l1.5 2.5h6l1.5-2.5H21'/%3E%3Cpath d='M5.5 5.5h13L21 13v5a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 18v-5z'/%3E%3C/svg%3E") center/26px no-repeat}
.empty b{display:block;color:var(--text);font-size:1.05rem;margin-bottom:.25rem}

/* Tags */
.tag{display:inline-flex;align-items:center;gap:.35rem;font-size:.78rem;font-weight:700;padding:.22rem .62rem;border-radius:99px;background:var(--track);color:var(--ink-soft);white-space:nowrap;line-height:1.35}
.tag.ok{background:var(--mint-tint);color:var(--mint)}.tag.bad{background:var(--red-tint);color:var(--red)}
.tag.warn{background:var(--amber-tint);color:var(--amber)}.tag.info{background:var(--blue-tint);color:var(--blue)}
.tag.berry{background:var(--berry-tint);color:var(--berry-deep)}
.dot{width:9px;height:9px;border-radius:50%;display:inline-block;flex:none}

/* Notices */
.notice{display:flex;gap:.8rem;align-items:center;padding:.9rem 1.15rem;border-radius:14px;font-weight:600;margin-bottom:1.5rem;border:1px solid color-mix(in srgb,currentColor 14%,transparent)}
.notice svg{width:21px;height:21px;flex:none}
.notice.ok{background:var(--mint-tint);color:var(--mint)}
.notice.bad{background:var(--red-tint);color:var(--red)}
.notice.warn{background:var(--amber-tint);color:var(--amber)}
.notice.info{background:var(--blue-tint);color:var(--blue)}
.notice[hidden]{display:none}
.notice .notice-x{color:inherit;opacity:.65;flex:none;margin-right:-.4rem}
.notice .notice-x:hover{opacity:1}
.toasts{position:fixed;right:1.25rem;bottom:1.25rem;z-index:90;display:flex;flex-direction:column;gap:.5rem;max-width:min(420px,calc(100vw - 2rem))}
.toasts .notice{margin:0;box-shadow:var(--float);background-color:color-mix(in srgb,currentColor 9%,var(--paper))}
.toasts{pointer-events:none}.toasts .notice{pointer-events:auto}
.till ~ .toasts{top:76px;bottom:auto;right:auto;left:50%;transform:translateX(-50%)}

/* Dialogs */
dialog.modal{background:var(--paper);border:0;border-radius:22px;padding:0;width:min(470px,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);overflow:auto;box-shadow:0 30px 80px -20px rgba(34,31,41,.45),0 0 0 1px rgba(34,31,41,.04);color:var(--text)}
dialog.modal::backdrop{background:rgba(26,23,32,.5);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
dialog.pay::backdrop{background:rgba(26,23,32,.66)}   /* no blur on the till: it opens on every sale, keep it instant on small laptops */
dialog[open]{animation:pop .16s ease-out}
@keyframes pop{from{opacity:0;transform:translateY(6px) scale(.985)}to{opacity:1;transform:none}}
.modal-head{padding:1.5rem 1.6rem .5rem}
.modal-head h2{font-size:1.3rem;letter-spacing:-.02em}
.modal-head p{color:var(--muted);margin-top:.25rem}
.modal-body{padding:1rem 1.6rem}
.modal-foot{display:flex;gap:.6rem;justify-content:flex-end;padding:1rem 1.6rem 1.5rem}
/* Wide dialog: two columns side by side so it fits on the screen without scrolling */
dialog.modal.modal-wide{width:min(820px,calc(100vw - 2rem))}
.modal-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));align-items:start}
.modal-wide .modal-col+.modal-col{border-left:1px solid var(--line)}
@media (max-width:700px){.modal-wide .modal-col+.modal-col{border-left:0}}
/* Laptops and short screens: tighter dialogs, so most fit without scrolling */
@media (max-height:900px){
  .modal-head{padding:1.15rem 1.5rem .35rem}.modal-head h2{font-size:1.25rem}
  .modal-body{padding:.75rem 1.5rem}
  .modal-foot{padding:.75rem 1.5rem 1.15rem}
  dialog.modal .field{margin-bottom:.75rem}
  dialog.modal .input-lg{height:50px}
  dialog.modal .pl td{padding:.5rem 0}
  dialog.modal .pick-col .pick{padding:.6rem .9rem}
  dialog.modal .change-big{padding:.7rem 1rem}dialog.modal .change-big b{font-size:1.7rem}
}

/* Lists */
.list{list-style:none;margin:0;padding:0}
.list li{display:flex;align-items:center;gap:.9rem;padding:.8rem 1.5rem;border-bottom:1px solid var(--line)}
/* Best sellers: rank, name with a bar for how many sold, the number */
.ranked .rank{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;flex:none;background:var(--track);color:var(--ink-soft);font-size:.78rem;font-weight:800}
.ranked li:first-child .rank{background:var(--berry);color:#fff}
.ranked .grow{min-width:0}
.ranked b{display:block;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ranked .meter{display:block;height:5px;margin-top:.4rem;max-width:260px}.ranked .meter i{background:color-mix(in srgb,var(--berry) 55%,var(--paper))}
.list li:last-child{border-bottom:0}

/* Chart */
.bars{position:relative;display:flex;align-items:flex-end;gap:8px;height:230px;padding:1.6rem 1.5rem .6rem}
/* faint guide lines behind the bars */
.bars::before{content:"";position:absolute;left:1.5rem;right:1.5rem;top:1.6rem;bottom:2.2rem;background:repeating-linear-gradient(to bottom,var(--line) 0 1px,transparent 1px 25%);border-bottom:1px solid var(--line-strong);pointer-events:none}
.bars .b{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;min-width:0;position:relative;z-index:1}
.bars .b i{display:block;width:100%;max-width:36px;background:color-mix(in srgb,var(--berry) 24%,var(--paper));border-radius:8px 8px 3px 3px;min-height:3px;transition:background .15s}
.bars .b:hover i{background:var(--berry)}
.bars .b.now i{background:var(--berry)}
.bars .b span{font-size:.72rem;color:var(--muted);margin-top:.45rem;white-space:nowrap}
.bars .b em{position:absolute;top:-1.3rem;font-style:normal;font-size:.72rem;font-weight:700;white-space:nowrap;opacity:0}
.bars .b:hover em{opacity:1}
.meter{height:6px;border-radius:99px;background:var(--track);overflow:hidden}.meter i{display:block;height:100%;background:var(--ink);border-radius:99px}

/* Profit & loss */
.pl{width:100%;border-collapse:collapse}
.pl td{padding:.75rem 0;border-bottom:1px solid var(--line)}
.pl td:last-child{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
.pl tr.minor td{color:var(--muted);font-size:.9rem;padding:.45rem 0 .45rem 1rem;border-bottom:0}
.pl tr.minor td:last-child{font-weight:500}
.pl tr.sum td{font-weight:800}
.pl tr.net td{border:0;padding-top:1.1rem;font-size:1.35rem;font-weight:800}

/* Pager */
.pager{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-top:1px solid var(--line);flex-wrap:wrap}
.pager .pages{display:flex;gap:.3rem}
.pager a,.pager span.p{min-width:38px;height:38px;display:inline-grid;place-items:center;padding:0 .6rem;border-radius:9px;font-weight:700;font-size:.9rem;color:var(--text);text-decoration:none}
.pager a:hover{background:var(--hover);text-decoration:none}
.pager span.cur{background:var(--ink);color:var(--on-ink)}
.pager span.off{color:var(--faint)}

/* ===== Sign in ===== */
.signin{min-height:100vh;display:grid;place-items:center;padding:2rem 1rem;background:var(--canvas)}
.signin-box{width:100%;max-width:420px}
.signin-card{background:var(--paper);border:1px solid var(--line);border-radius:22px;padding:2.25rem 2rem 2rem}
.signin h1{font-size:1.6rem;margin:1.25rem 0 .3rem}
.pw{position:relative}.pw .input{padding-right:4.8rem}
.pw button{position:absolute;right:.45rem;top:50%;transform:translateY(-50%);border:0;background:var(--canvas);font:inherit;font-weight:700;font-size:.82rem;padding:.4rem .7rem;border-radius:7px;cursor:pointer;color:var(--ink-soft)}

/* ===== The till ===== */
.till{height:100vh;height:100dvh;display:grid;grid-template-rows:64px 1fr;background:var(--canvas);overflow:hidden}
.till-top{background:var(--bar);color:#fff;display:flex;align-items:center;gap:1rem;padding:0 1rem 0 1.1rem}
.till-top .logo-mark{width:34px;height:34px}
.till-top .where{line-height:1.2;min-width:0}
.till-top .where b{display:block;font-size:.98rem}
.till-top .where small{color:var(--bar-muted);font-size:.8rem}
.till-search{flex:1;max-width:620px;margin:0 auto;position:relative}
.till-search svg{position:absolute;left:1rem;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--bar-muted)}
.till-search input{width:100%;height:44px;border-radius:11px;border:0;background:var(--bar-2);color:#fff;font:inherit;font-size:1rem;padding:0 1rem 0 2.8rem}
.till-search input::placeholder{color:var(--bar-muted)}
.till-search input:focus{outline:none;background:var(--paper);color:var(--text);box-shadow:0 0 0 3px var(--berry-ring)}
.till-top .who{display:flex;align-items:center;gap:.5rem}
.till-top .tbtn{height:40px;display:inline-flex;align-items:center;gap:.45rem;padding:0 .85rem;border-radius:10px;color:var(--bar-text);font-weight:650;font-size:.9rem;background:transparent;border:0;cursor:pointer;font-family:inherit;text-decoration:none}
.till-top .tbtn:hover{background:var(--bar-2);text-decoration:none;color:#fff}
.till-top .tbtn.picked{background:var(--berry);color:#fff}
.till-top .tbtn .label{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.till-top .tbtn svg{width:18px;height:18px}
.till-top .clock{font-weight:700;color:var(--bar-text);padding:0 .4rem}

.till-body{display:grid;grid-template-columns:184px minmax(0,1fr) 400px;min-height:0}
.rail{background:var(--paper);border-right:1px solid var(--line);overflow-y:auto;padding:.75rem .6rem}
.rail button{display:flex;align-items:center;gap:.6rem;width:100%;text-align:left;min-height:52px;padding:.55rem .75rem;border:0;border-radius:11px;background:none;font:inherit;font-weight:700;font-size:.95rem;color:var(--ink-soft);cursor:pointer;margin-bottom:3px}
.rail button:hover{background:var(--hover);color:var(--text)}
.rail button.on{background:var(--berry-tint);color:var(--berry-deep)}
.rail .sw{width:12px;height:12px;border-radius:4px;flex:none}
.rail .cn{min-width:0;overflow-wrap:break-word;hyphens:auto;line-height:1.25}
.rail .n{margin-left:auto;font-size:.75rem;font-weight:700;opacity:.6;flex:none;padding-left:.25rem}

.shelf{overflow-y:auto;padding:1.1rem}
.shelf-head{display:flex;align-items:baseline;justify-content:space-between;margin:0 .1rem .9rem}
.shelf-head h2{font-size:1.1rem}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(172px,1fr));gap:.75rem}
.tile{position:relative;display:flex;flex-direction:column;gap:.5rem;text-align:left;background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:.85rem;cursor:pointer;font:inherit;color:var(--text);min-height:150px;box-shadow:var(--lift);transition:border-color .15s,box-shadow .15s}
.tile:hover{border-color:color-mix(in srgb,var(--berry) 30%,var(--line));box-shadow:0 8px 20px -10px var(--shadow)}
.tile:active{transform:scale(.985)}
.mono{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;font-weight:800;font-size:.95rem;letter-spacing:-.02em;flex:none;background:color-mix(in srgb,var(--c) 14%,var(--paper));color:var(--c)}
.mono.sm{width:36px;height:36px;font-size:.82rem;border-radius:9px}
:root[data-theme=dark] .mono{background:color-mix(in srgb,var(--c) 28%,var(--paper));color:color-mix(in srgb,var(--c) 45%,#fff)}
.tile .nm{font-weight:650;font-size:.95rem;line-height:1.3;flex:1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tile .ft{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.15rem .5rem}
.tile .pr{font-size:1.2rem;font-weight:800;letter-spacing:-.01em;white-space:nowrap}
.tile .st{font-size:.78rem;color:var(--muted);font-weight:650;white-space:nowrap}
.tile.low .st{color:var(--amber)}
.tile[disabled]{opacity:.45;cursor:not-allowed}
.tile[disabled] .st{color:var(--red)}
.tile .qty-badge{position:absolute;top:.7rem;right:.7rem;min-width:28px;height:28px;padding:0 .45rem;border-radius:99px;background:var(--berry);color:#fff;font-weight:800;font-size:.85rem;display:grid;place-items:center;box-shadow:0 0 0 3px var(--paper)}

.ticket{background:var(--paper);border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
.ticket-head{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--line)}
.ticket-lines{flex:1;overflow-y:auto}
.tl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.3rem .75rem;padding:.85rem 1.25rem;border-bottom:1px solid var(--line)}
.tl .nm{font-weight:700;font-size:.95rem;line-height:1.3}
.tl .lt{font-weight:800;text-align:right}
.tl .each{color:var(--muted);font-size:.83rem;align-self:center}
.stepper{display:flex;align-items:center;gap:.2rem;justify-self:end}
.stepper button{width:34px;height:34px;border-radius:10px;border:1px solid var(--line-strong);background:var(--paper);font-size:1.15rem;font-weight:700;cursor:pointer;color:var(--text);line-height:1}
.stepper button:hover{background:var(--hover)}
.stepper b{min-width:30px;text-align:center}
.ticket-empty{flex:1;display:grid;place-items:center;text-align:center;color:var(--muted);padding:2rem}
.ticket-empty svg{width:46px;height:46px;color:var(--line-strong);margin-bottom:.6rem}
.ticket-sum{padding:1rem 1.25rem 1.25rem;border-top:1px solid var(--line)}
.ticket-sum .r{display:flex;justify-content:space-between;align-items:center;padding:.2rem 0;color:var(--muted);font-weight:600}
.ticket-sum .r b{color:var(--text)}
.link-btn{background:none;border:0;padding:0;font:inherit;font-weight:700;color:var(--berry-deep);cursor:pointer}
.charge{margin-top:.9rem;width:100%;height:72px;border:0;border-radius:16px;background:var(--berry);color:#fff;font:inherit;cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:0 1.35rem;transition:background .15s,box-shadow .15s;box-shadow:0 12px 24px -14px var(--berry),inset 0 1px 0 rgba(255,255,255,.16)}
.charge:hover{background:var(--berry-deep)}
.charge span{font-size:1.15rem;font-weight:750}
.charge b{font-size:1.75rem;font-weight:800;letter-spacing:-.02em}
.charge[disabled]{background:var(--berry-tint);color:var(--muted);cursor:not-allowed;box-shadow:none}

/* Payment screen */
dialog.pay{background:var(--paper);border:0;padding:0;border-radius:24px;width:min(920px,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);box-shadow:0 30px 90px -20px rgba(0,0,0,.5);color:var(--text);overflow:auto}
.pay-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px}
.pay-left{padding:2rem}
.pay-right{background:var(--canvas);padding:2rem 1.5rem;border-radius:0 24px 24px 0}
.due-label{color:var(--muted);font-weight:700}
.due{font-size:3.6rem;font-weight:800;letter-spacing:-.035em;line-height:1.1;margin:.2rem 0 1.5rem}
.paycur{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem;margin:-.25rem 0 1rem}
.paycur .pick{font:inherit;font-weight:750;min-height:44px}
.paycur small{grid-column:1/-1;text-align:center}
.methods{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;margin-bottom:1.5rem}
.methods button{height:84px;border:2px solid var(--line);border-radius:14px;background:var(--paper);font:inherit;font-weight:750;font-size:1rem;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;color:var(--text)}
.methods button svg{width:26px;height:26px}
.methods button.on{border-color:var(--ink);background:var(--ink);color:var(--on-ink)}
.tendered{display:flex;justify-content:space-between;align-items:baseline;padding:1rem 1.2rem;border:2px solid var(--line);border-radius:14px;margin-bottom:.75rem}
.tendered span{color:var(--muted);font-weight:700}
.tendered b{font-size:2rem;font-weight:800}
.change-big{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.2rem;border-radius:14px;background:var(--mint-tint);color:var(--mint)}
.change-big span{font-weight:750}
.change-big b{font-size:2.2rem;font-weight:800;letter-spacing:-.02em}
/* Change credit at the till */
.credit-pan{margin-top:.75rem}
.credit-toggle{width:100%;display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;border:1.5px dashed var(--line-strong);border-radius:12px;background:transparent;color:var(--berry-deep);font:inherit;font-weight:750;cursor:pointer}
.credit-toggle:hover{background:var(--berry-tint)}.credit-toggle svg{width:18px;height:18px}
.credit-pan>div{border:1.5px solid var(--line);border-radius:12px;padding:.7rem}
.keep-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:.5rem;min-height:44px}
.credit-chip{color:var(--mint);border-color:var(--mint-tint);background:var(--mint-tint);flex:none}
.change-big.short{background:var(--red-tint);color:var(--red)}
.notes{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin-bottom:1rem}
.notes button{height:52px;border-radius:11px;border:1px solid var(--line-strong);background:var(--paper);font:inherit;font-weight:800;font-size:1.05rem;cursor:pointer;color:var(--text)}
.notes button.exact{background:var(--ink);color:var(--on-ink);border-color:var(--ink)}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}
.keypad button{height:64px;border-radius:12px;border:0;background:var(--paper);font:inherit;font-size:1.5rem;font-weight:700;cursor:pointer;color:var(--text);box-shadow:0 1px 0 var(--line-strong)}
.keypad button:hover{background:var(--hover)}
.keypad button:active{background:var(--line)}
.pay-foot{display:flex;gap:.75rem;margin-top:1.5rem}
@media (max-width:820px){.pay-grid{grid-template-columns:1fr}.pay-right{border-radius:0 0 24px 24px}.due{font-size:2.6rem}}
/* Small laptops (11–13" at 1366×768) and short windows: the whole payment fits without scrolling, wallet box included */
@media (min-width:821px) and (max-height:780px){
  dialog.pay{max-height:calc(100dvh - 1rem)}
  .pay-left{padding:1.1rem 1.5rem 1.2rem}
  .pay-right{padding:1.1rem 1.1rem}
  .due{font-size:2.6rem;margin:0 0 .7rem}
  .methods{margin-bottom:.7rem;gap:.5rem}
  .methods button{height:56px;flex-direction:row;gap:.5rem}
  .methods button svg{width:21px;height:21px}
  .tendered{padding:.55rem 1rem;margin-bottom:.5rem}.tendered b{font-size:1.55rem}
  .change-big{padding:.5rem 1rem}.change-big b{font-size:1.65rem}
  .credit-pan{margin-top:.5rem}.credit-pan>div{padding:.5rem .6rem}
  .keep-row{margin-top:.35rem;min-height:40px}.keep-row .btn{min-height:40px}
  .pay-foot{margin-top:.8rem}.pay-foot .btn{min-height:50px}
  .notes{margin-bottom:.6rem}.notes button{height:44px}
  .keypad button{height:52px;font-size:1.35rem}
}

.done{text-align:center;padding:2.5rem 2rem 2rem}
.done .tick{width:72px;height:72px;border-radius:50%;background:var(--mint-tint);color:var(--mint);display:grid;place-items:center;margin:0 auto 1rem}
.done .tick svg{width:38px;height:38px}
.done .chg{font-size:4rem;font-weight:800;letter-spacing:-.04em;color:var(--mint);line-height:1.1;margin:.3rem 0 .2rem}

kbd{font-family:inherit;font-size:.72rem;font-weight:800;padding:.1rem .4rem;border-radius:5px;background:rgba(255,255,255,.18)}

@media (max-width:1180px){.till-body{grid-template-columns:168px minmax(0,1fr) 360px}.till-top .clock{display:none}.rail button{padding:.5rem .6rem;gap:.5rem;font-size:.9rem}}
@media (max-width:900px){
  .till{height:auto;min-height:100dvh;overflow:visible;grid-template-rows:auto 1fr}
  .till-top{flex-wrap:wrap;padding:.6rem .75rem;gap:.6rem;position:sticky;top:0;z-index:20}
  .till-search{order:3;flex-basis:100%;max-width:none}
  .till-top .who .label{display:none}
  .till-body{grid-template-columns:1fr}
  .rail{display:flex;gap:.4rem;overflow-x:auto;padding:.6rem .75rem;border-right:0;border-bottom:1px solid var(--line)}
  .rail button{width:auto;flex:none;min-height:42px;margin:0}
  .rail .n{display:none}
  .shelf{padding:.75rem .75rem 6.5rem}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
  .ticket{border-left:0;border-top:1px solid var(--line);padding-bottom:5.5rem}
  .mob-charge{display:flex!important}
}
.mob-charge{display:none;position:fixed;left:.75rem;right:.75rem;bottom:.75rem;z-index:25;height:68px;border:0;border-radius:16px;background:var(--berry);color:#fff;font:inherit;align-items:center;gap:.75rem;padding:0 1.2rem;box-shadow:0 12px 30px var(--shadow);cursor:pointer}
.mob-charge span{font-weight:700;opacity:.9}.mob-charge b{margin-left:auto;font-size:1.5rem;font-weight:800}

/* Receipt */
.receipt{width:300px;margin:0 auto;font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;font-size:13px;color:#000;background:#fff;padding:16px 12px;line-height:1.4}
.receipt h2{text-align:center;font-family:Manrope,sans-serif;font-size:17px;font-weight:800}
.receipt .c{text-align:center}
.receipt hr{border:0;border-top:1px dashed #000;margin:8px 0}
.receipt .r{display:flex;justify-content:space-between;gap:8px}
.receipt .big{font-size:16px;font-weight:800}
.receipt .void{border:2px solid #000;text-align:center;font-weight:800;padding:4px;margin:6px 0}
.receipt .credit-box{border:1.5px solid #000;padding:5px 6px;margin:6px 0;font-size:12px}.receipt .credit-box .r{font-size:13.5px}
.receipt .items{width:100%;border-collapse:collapse;font-size:12.5px}
.receipt .items th{font-weight:700;text-align:left;padding:0 0 3px;border-bottom:1px solid #000}
.receipt .items td{padding:3px 0;vertical-align:top}
.receipt .items .n{text-align:right;white-space:nowrap;padding-left:8px}
.receipt .items small{display:block;font-size:11px;color:#333}
.receipt .bill{font-size:12px;line-height:1.35}
.receipt .bill b{font-size:13px}
.receipt .sig{margin-top:6px;font-family:Manrope,Arial,sans-serif;font-size:9px;letter-spacing:.01em;white-space:nowrap;color:#333}

@media print{
  @page{margin:10mm}
  body{background:#fff}
  .side,.mob-bar,.foot,.no-print,.toasts,.pager,.scrim,.head-actions,.toolbar,.filters{display:none!important}
  .page{margin:0}.page-in{padding:0;max-width:none}
  .panel,.figures{break-inside:avoid;border-color:#bbb}
  .print-only{display:block!important}
}
.print-only{display:none}

/* Brand logo */
.brand-logo{display:block;object-fit:contain;border-radius:8px;flex:none}
.till-top .brand-logo{background:#fff;padding:3px}
:root[data-theme=dark] .brand-logo{background:#fff;padding:3px}
.logo-drop{width:132px;height:96px;border:1px dashed var(--line-strong);border-radius:var(--r);display:grid;place-items:center;background:var(--canvas);flex:none}
.logo-drop img{max-width:116px;max-height:80px;object-fit:contain}

/* Till: blocks or list */
.viewer{display:inline-flex;background:var(--track);border-radius:11px;padding:3px;gap:2px}
.viewer button{width:34px;height:30px;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer;display:grid;place-items:center}
.viewer button svg{width:17px;height:17px}
.viewer button.on{background:var(--paper);color:var(--text);box-shadow:0 1px 2px rgba(34,31,41,.12)}
:root[data-theme=dark] .viewer button.on{background:#3a3543}
.plist{background:var(--paper);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.prow{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:.9rem;align-items:center;width:100%;text-align:left;padding:.65rem 1rem;border:0;border-bottom:1px solid var(--line);background:none;font:inherit;color:var(--text);cursor:pointer;min-height:60px}
.prow:last-child{border-bottom:0}
.prow:hover{background:var(--hover)}
.prow .nm b{display:block;font-weight:700;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prow .nm small{color:var(--muted);font-size:.8rem}
.prow .st{font-size:.82rem;color:var(--muted);font-weight:650;white-space:nowrap}
.prow.low .st{color:var(--amber)}
.prow .pr{font-size:1.1rem;font-weight:800;min-width:76px;text-align:right}
.prow[disabled]{opacity:.45;cursor:not-allowed}
.prow .qty-badge{position:absolute;left:2.6rem;top:.35rem;min-width:22px;height:22px;font-size:.75rem;padding:0 .35rem;border-radius:99px;background:var(--berry);color:#fff;font-weight:800;display:grid;place-items:center}

/* Till: customer */
.bill-to{display:flex;align-items:center;gap:.7rem;padding:.6rem .75rem;border-radius:11px;background:var(--berry-tint);margin-bottom:.6rem}
.bill-to svg{width:20px;height:20px;color:var(--berry-deep);flex:none}
.bill-to b{display:block;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bill-to small{display:block;color:var(--muted);font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cust-list{list-style:none;margin:0;padding:0;max-height:min(46vh,360px);overflow-y:auto;border:1px solid var(--line);border-radius:var(--r)}
.cust-list li{display:flex;align-items:center;gap:.25rem;border-bottom:1px solid var(--line);padding-right:.4rem}
.cust-list li:last-child{border-bottom:0}
.cust-pick{flex:1;text-align:left;border:0;background:none;font:inherit;color:var(--text);padding:.75rem 1rem;cursor:pointer;min-width:0}
.cust-pick:hover{background:var(--hover)}
.cust-pick b{display:block}
.cust-pick small{color:var(--muted);font-size:.82rem}

/* Choice tiles inside forms (e.g. "Paid with") */
.pick{display:flex;align-items:center;justify-content:center;text-align:center;min-height:48px;padding:.4rem .6rem;border:2px solid var(--line);border-radius:12px;background:var(--paper);font-weight:700;font-size:.9rem;cursor:pointer;color:var(--text);transition:border-color .15s,background .15s}
.pick:hover{border-color:var(--line-strong)}
.pick.on{border-color:var(--ink);background:var(--ink);color:var(--on-ink)}
.pick:has(input:focus-visible){outline:3px solid var(--berry-ring);outline-offset:2px}
.drawer-sum{display:block;color:var(--muted);font-size:.84rem;margin-top:.15rem}

/* Categories */
.cat-dot{width:14px;height:14px;border-radius:5px;background:var(--c);flex:none}
.swatches{display:flex;flex-wrap:wrap;gap:.5rem}
.swatch{position:relative;cursor:pointer}
.swatch input{position:absolute;opacity:0;width:1px;height:1px}
.swatch span{display:block;width:38px;height:38px;border-radius:10px;background:var(--c);border:3px solid transparent;box-shadow:inset 0 0 0 2px var(--paper)}
.swatch input:checked+span{border-color:var(--ink)}
.swatch input:focus-visible+span{outline:2px solid var(--berry);outline-offset:2px}
.cat-preview{display:flex;align-items:center;gap:.75rem;padding:.75rem;border:1px solid var(--line);border-radius:12px;background:var(--canvas)}

.cat-preview small{display:block;color:var(--muted);font-size:.8rem}
.hint.bad{color:var(--red)}

/* Stock transfers */
.transfer-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:1.5rem;align-items:start}
.transfer-side{position:sticky;top:1rem}
@media (max-width:1000px){.transfer-grid{grid-template-columns:minmax(0,1fr)}.transfer-side{position:static}}
.search-drop{position:relative}
.drop{position:absolute;left:0;right:0;top:calc(100% + 4px);background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px var(--shadow);z-index:20;overflow:hidden}
.drop button{display:flex;width:100%;gap:.75rem;align-items:center;padding:.7rem 1rem;border:0;border-bottom:1px solid var(--line);background:none;font:inherit;color:var(--text);text-align:left;cursor:pointer}
.drop button:last-child{border-bottom:0}
.drop button.on{background:var(--hover)}
.drop small{display:block;color:var(--muted);font-size:.8rem}
.drop .num{color:var(--muted);font-size:.85rem;white-space:nowrap}
.sum-list{display:grid;gap:.55rem;margin:0;padding:1rem 0 0;border-top:1px solid var(--line)}
.sum-list div{display:flex;justify-content:space-between;gap:1rem}
.sum-list dt{color:var(--muted)}.sum-list dd{margin:0}
.steps{display:flex;gap:0;margin-bottom:1.5rem;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.steps>div{flex:1;padding:1rem 1.25rem;border-left:1px solid var(--line);text-align:left}
.steps>div:first-child{border-left:0}
.steps .k{font-size:.8rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.steps b{display:block;margin-top:.15rem}
.steps small{color:var(--muted)}
.steps .done .k{color:var(--mint)}.steps .now .k{color:var(--blue)}.steps .off .k{color:var(--red)}
@media (max-width:700px){.steps{flex-direction:column}.steps>div{border-left:0;border-top:1px solid var(--line)}.steps>div:first-child{border-top:0}}
.recv-input{width:96px;text-align:right}
tr.short td{background:var(--amber-tint)}

/* Fit on one screen */
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:900px){.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.grid-3{grid-template-columns:1fr}}
.nowrap{white-space:nowrap}
.till-moves{cursor:help}
@media (max-height:820px) and (min-width:981px){
  .logo{padding:.85rem 1.25rem .6rem}
  .till-btn{height:42px;margin:.15rem 1rem .6rem}
  .menu a{height:36px;margin-bottom:1px}
  .menu-gap{margin:.4rem .5rem}
  .me{padding:.6rem 1.1rem;gap:.4rem}
}
.table.compact td{padding-top:.5rem;padding-bottom:.5rem}
.linkbtn{border:0;background:none;padding:0;font:inherit;font-weight:700;color:var(--berry);cursor:pointer;text-decoration:underline;text-underline-offset:2px}.linkbtn:disabled{opacity:.5;cursor:wait}
/* Stock take */
.find-box{position:relative;min-width:240px}
.find-box svg{position:absolute;left:.9rem;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--muted)}
.find-box .input{padding-left:2.6rem;height:48px;font-size:1.05rem}
tr.flash td{animation:flash 1.2s ease-out}
@keyframes flash{from{background:var(--mint-tint)}to{background:transparent}}

/* List pages fill the screen: title, tabs and filters stay put, the list scrolls with its headings pinned */
@media (min-width:981px) and (min-height:560px){
  body.fit .page{height:100vh;min-height:0}
  body.fit .page-in{display:flex;flex-direction:column;min-height:0;overflow:hidden;overflow:clip}
  body.fit .page-in :not(.cols):has(.fill){display:flex;flex-direction:column;flex:0 1 auto;min-height:0}
  body.fit .fill{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;overflow:hidden}
  body.fit .fill>*{flex:none}
  body.fit .fill>.table-wrap{flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
  body.fit .fill .table thead th{position:sticky;top:0;z-index:2;background:var(--th);box-shadow:inset 0 -1px 0 var(--line)}
  /* a list beside a side box (Income & expenses) */
  body.fit .page-in .cols:has(.fill){flex:0 1 auto;min-height:0;grid-template-rows:minmax(0,1fr)}
  body.fit .cols:has(.fill)>*{max-height:100%;min-height:0;overflow:auto}
  body.fit .cols>.fill{overflow:hidden}
}
/* Two-line choices (e.g. counting a drawer again) */
.pick-col{display:grid;gap:.5rem}
.pick-col .pick{justify-content:flex-start;text-align:left;gap:.75rem;padding:.75rem 1rem;font-weight:500;min-height:0}
.pick-col .pick input{position:static;opacity:1;width:18px;height:18px;flex:none;accent-color:var(--berry);margin:0}
.pick-col .pick.on{background:var(--berry-tint);border-color:var(--berry);color:var(--text)}
.pick-col .pick b{display:block;font-weight:750}
.pick-col .pick small{display:block;color:var(--muted);font-size:.84rem;line-height:1.35;margin-top:.1rem}

/* ===== Menu designs (Shop settings › Menu design): body.nav-list | nav-touch | nav-rail | nav-bottom ===== */
.till-btn .short{display:none}

/* Touch list: same list, finger-sized */
.nav-touch .menu a{height:54px;font-size:1.02rem;border-radius:12px;margin-bottom:4px}
.nav-touch .menu svg{width:23px;height:23px}
.nav-touch .till-btn{height:58px;font-size:1.05rem}
.nav-touch .me-actions .btn{height:44px}
@media (max-height:820px) and (min-width:981px){.nav-touch .menu a{height:48px;margin-bottom:2px}.nav-touch .till-btn{height:52px}}

/* Icon rail: slim strip, big icons with a word under each; stays on screen on tablets too */
.nav-rail{--side:88px}
.nav-rail .logo{justify-content:center;padding:.9rem .4rem .7rem}
.nav-rail .logo>div:not(.logo-mark){display:none}
.nav-rail .side .brand-logo{max-width:60px!important}
.nav-rail .till-btn{flex-direction:column;height:auto;gap:.2rem;margin:0 .55rem .7rem;padding:.6rem .2rem;font-size:.78rem}
.nav-rail .till-btn .full{display:none}.nav-rail .till-btn .short{display:inline}
.nav-rail .till-btn svg{width:24px;height:24px}
.nav-rail .menu{padding:0 .45rem}
.nav-rail .menu a{position:relative;flex-direction:column;justify-content:center;gap:.2rem;height:auto;min-height:54px;padding:.35rem .15rem;text-align:center;font-size:.72rem;line-height:1.15;font-weight:650;margin-bottom:3px}
.nav-rail .menu svg{width:24px;height:24px}
.nav-rail .menu .count{position:absolute;top:4px;right:4px;margin:0;min-width:18px;height:18px;font-size:.64rem;padding:0 .3rem}
.nav-rail .menu a.on::before,.nav-bottom .menu a.on::before{display:none}
.nav-rail .menu-gap{margin:.45rem .4rem}
.nav-rail .me{flex-direction:column;padding:.6rem .4rem;gap:.35rem}
.nav-rail .me .who{display:none}
.nav-rail .me-actions{flex-direction:column;align-items:center}
.nav-rail .me-actions .btn{width:44px;height:36px}
@media (max-height:820px){.nav-rail .me .avatar{display:none}.nav-rail .logo{padding:.6rem .4rem .5rem}.nav-rail .till-btn{margin-bottom:.5rem;padding:.45rem .2rem}.nav-rail .menu a{min-height:50px}}
@media (max-width:980px){
  .nav-rail .side{transform:none;box-shadow:none;visibility:visible}
  .nav-rail .page{margin-left:var(--side)}
  .nav-rail .mob-bar{display:none}
}

/* Bottom bar: menu along the bottom like a phone app */
.nav-bottom{--bar:76px}
.nav-bottom .side{inset:auto 0 0 0;width:100%;height:var(--bar);flex-direction:row;align-items:stretch;border-right:0;border-top:1px solid var(--line);transform:none;visibility:visible;box-shadow:0 -4px 18px rgba(0,0,0,.05)}
.nav-bottom .logo{display:none}
.nav-bottom .till-btn{flex:none;flex-direction:column;gap:.15rem;height:auto;margin:.45rem 0 .45rem .5rem;padding:0 1.1rem;font-size:.75rem}
.nav-bottom .till-btn .full{display:none}.nav-bottom .till-btn .short{display:inline}
.nav-bottom .till-btn svg{width:22px;height:22px}
.nav-bottom .menu{display:flex;align-items:stretch;overflow-x:auto;overflow-y:hidden;padding:0 .35rem;scrollbar-width:none}
.nav-bottom .menu::-webkit-scrollbar{display:none}
.nav-bottom .menu a{position:relative;flex:1 0 76px;flex-direction:column;justify-content:center;gap:.2rem;height:auto;margin:.35rem .1rem;padding:0 .3rem;font-size:.72rem;line-height:1.1;text-align:center;font-weight:650}
.nav-bottom .menu .ml{max-width:92px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nav-bottom .menu svg{width:23px;height:23px}
.nav-bottom .menu .count{position:absolute;top:2px;right:10px;margin:0;min-width:18px;height:18px;font-size:.64rem;padding:0 .3rem}
.nav-bottom .menu-gap{flex:none;width:1px;height:auto;margin:.9rem .3rem}
.nav-bottom .me{flex:none;flex-wrap:nowrap;border-top:0;border-left:1px solid var(--line);padding:0 .6rem;gap:.3rem}
.nav-bottom .me .who{display:none}
.nav-bottom .me .avatar{width:34px;height:34px}
.nav-bottom .me-actions{width:auto;gap:.15rem}
.nav-bottom .me-actions .btn{width:42px;height:42px}
.nav-bottom .page{margin-left:0;padding-bottom:var(--bar)}
.nav-bottom .mob-bar,.nav-bottom .scrim{display:none!important}
@media (min-width:981px) and (min-height:560px){.nav-bottom.fit .page{height:100vh}}
@media (max-width:600px){.nav-bottom .me .avatar{display:none}.nav-bottom .me-actions .btn{width:36px}}

/* Pictures of each design on the settings page */
.menu-picks{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.9rem}
.menu-pick{display:flex;flex-direction:column;gap:.3rem;padding:.75rem;border:2px solid var(--line);border-radius:var(--r);cursor:pointer}
.menu-pick:hover{border-color:var(--line-2,var(--faint))}
.menu-pick.on{border-color:var(--berry);background:var(--berry-tint)}
.menu-pick:has(input:focus-visible){outline:3px solid var(--berry-ring);outline-offset:2px}
.mp-shot{display:grid;height:78px;gap:4px;padding:5px;border:1px solid var(--line);border-radius:8px;background:var(--paper);margin-bottom:.25rem}
.mp-shot i{background:var(--line);border-radius:3px}
.mp-shot i:first-child{background:var(--berry)}
.mp-shot b{background:var(--canvas);border-radius:4px}
.mp-list,.mp-touch,.mp-rail{grid-template-columns:38% 1fr;grid-template-rows:repeat(4,1fr)}
.mp-list i,.mp-touch i,.mp-rail i{grid-column:1}
.mp-list b,.mp-touch b,.mp-rail b{grid-column:2;grid-row:1/-1}
.mp-list{grid-template-rows:repeat(4,9px);align-content:start}.mp-list b{grid-row:1/span 4;height:66px}
.mp-rail{grid-template-columns:16% 1fr}
.mp-bottom{grid-template-columns:repeat(4,1fr);grid-template-rows:1fr 15px}
.mp-bottom b{grid-row:1;grid-column:1/-1}.mp-bottom i{grid-row:2}

/* ===== Long tables and lists on report-style pages: fixed height, rows scroll inside, heading stays ===== */
.scroll-box{max-height:440px;overflow:auto;overscroll-behavior:contain}
.scroll-box.sm{max-height:330px}
.scroll-box .table thead th{position:sticky;top:0;z-index:2;background:var(--th);box-shadow:inset 0 -1px 0 var(--line)}
@media print{.scroll-box{max-height:none;overflow:visible}}

/* ===== Responsive: every screen size ===== */
/* Big screens: use more of the width */
@media (min-width:1600px){.page-in,.foot{max-width:1440px}}
@media (min-width:2200px){.page-in,.foot{max-width:1680px}html{font-size:17px}}

/* Small laptops and tablets on their side (sidebar showing): a little tighter so tables fit */
@media (min-width:981px) and (max-width:1280px){
  :root{--side:224px}
  .page-in{padding:1.4rem 1.6rem 1rem}
  .foot{padding:0 1.6rem .85rem}
  .table th,.table td{padding-left:1rem;padding-right:1rem}
  .panel-head{padding:.9rem 1rem}
}

/* Tablets upright and small screens */
@media (max-width:980px){
  .table th,.table td{padding-left:1rem;padding-right:1rem}
  .panel-head{padding:.9rem 1rem}
  .panel-pad{padding:1.1rem}
}

/* Phones */
@media (max-width:640px){
  .page-in{padding:1rem .75rem 1.5rem}
  .head{margin-bottom:1rem;gap:.75rem}
  body:not(.nav-rail):not(.nav-bottom) .head .t h1:not(.keep){display:none}   /* the title is already in the bar at the top */
  .head .t h1.keep{font-size:1.5rem}
  .head p{margin-top:0;font-size:.92rem}
  .head-actions{width:100%;gap:.5rem}
  .head-actions .btn{flex:1 1 auto;justify-content:center}
  .head-actions form,.head-actions select{flex:1 1 100%;width:100%!important}
  .tabs{flex-wrap:nowrap;overflow-x:auto;max-width:100%;scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tabs a,.tabs button{flex:none}
  .toolbar{gap:.6rem;margin-bottom:1rem}
  .toolbar>*{max-width:100%}
  .notice{flex-wrap:wrap}
  .notice>.grow{flex:1 1 calc(100% - 40px)}
  .notice>.btn,.notice>form{margin-left:auto}
  .modal-head,.modal-body,.modal-foot{padding-left:1.1rem;padding-right:1.1rem}
  .modal-foot{flex-wrap:wrap}.modal-foot .btn{flex:1}

  /* Tables become one card per row, each value with its column name */
  .table:not(.no-stack),.table:not(.no-stack) tbody,.table:not(.no-stack) tfoot{display:block;width:100%}
  .table:not(.no-stack) thead{display:none}
  .table:not(.no-stack) tr{display:block;padding:.75rem 1rem;border-bottom:1px solid var(--line)}
  .table:not(.no-stack) tbody tr:last-child{border-bottom:0}
  .table:not(.no-stack) td{display:grid;grid-template-columns:minmax(0,42%) minmax(0,1fr);column-gap:1rem;align-items:baseline;justify-items:end;padding:.18rem 0;border:0;text-align:right;white-space:normal;background:none!important}
  .table:not(.no-stack) td>*{grid-column:2}
  .table:not(.no-stack) td::before{content:attr(data-label);grid-column:1;grid-row:1 / span 6;justify-self:start;text-align:left;font-size:.78rem;font-weight:700;color:var(--muted)}
  .table:not(.no-stack) td:first-child{display:block;text-align:left;padding-bottom:.4rem}
  .table:not(.no-stack) td:first-child::before,.table:not(.no-stack) td[data-label=""]::before,.table:not(.no-stack) td[colspan]::before{display:none}
  .table:not(.no-stack) td[data-label=""]{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:.4rem;padding-top:.45rem}
  .table:not(.no-stack) td[colspan]{display:block;text-align:center}
  .table:not(.no-stack) td .sub{text-align:inherit}
  .table:not(.no-stack) td>*:not(.sub){min-width:0}
  .table:not(.no-stack) tfoot tr{border-top:1px solid var(--line-strong)}

  .foot{flex-direction:column;align-items:center;text-align:center;gap:.15rem}

  /* Till */
  .till-top .where small{display:none}
}

/* Wide tables (many columns) also become cards on tablets and small laptops */
@media (max-width:1100px){
  .table.stack-md,.table.stack-md tbody,.table.stack-md tfoot{display:block;width:100%}
  .table.stack-md thead{display:none}
  .table.stack-md tr{display:block;padding:.75rem 1rem;border-bottom:1px solid var(--line)}
  .table.stack-md tbody tr:last-child{border-bottom:0}
  .table.stack-md td{display:grid;grid-template-columns:minmax(0,42%) minmax(0,1fr);column-gap:1rem;align-items:baseline;justify-items:end;padding:.18rem 0;border:0;text-align:right;white-space:normal;background:none!important}
  .table.stack-md td>*{grid-column:2}
  .table.stack-md td::before{content:attr(data-label);grid-column:1;grid-row:1 / span 6;justify-self:start;text-align:left;font-size:.78rem;font-weight:700;color:var(--muted)}
  .table.stack-md td:first-child{display:block;text-align:left;padding-bottom:.4rem}
  .table.stack-md td:first-child::before,.table.stack-md td[data-label=""]::before,.table.stack-md td[colspan]::before{display:none}
  .table.stack-md td[data-label=""]{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:.4rem;padding-top:.45rem}
  .table.stack-md td[colspan]{display:block;text-align:center}
  .table.stack-md td .sub{text-align:inherit}
  .table.stack-md td>*:not(.sub){min-width:0}
  .table.stack-md tfoot tr{border-top:1px solid var(--line-strong)}

}

/* Till: tablets and small laptops */
@media (max-width:1180px){
  .till-top .tbtn:not(.picked) .label{display:none}
  .till-top .tbtn{padding:0 .7rem}
  .till-top .tbtn.picked .label{max-width:120px}
}
@media (min-width:561px) and (max-width:900px){.tiles{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}}
.nav-rail .menu a,.nav-bottom .menu a{white-space:normal}

/* Section tabs at the top of grouped pages (Sales · Void requests · Customers, Stock · Transfers · Stock take, Cash-up · Income & expenses) */
.subnav{display:flex;gap:.35rem;border-bottom:1px solid var(--line);margin:-.4rem 0 1.25rem;overflow-x:auto;scrollbar-width:none;flex-shrink:0}  /* never squashed on pages that fit the screen */
.subnav::-webkit-scrollbar{display:none}
.subnav a{position:relative;flex:none;display:inline-flex;align-items:center;gap:.45rem;padding:.6rem .85rem .7rem;margin-bottom:-1px;color:var(--muted);font-weight:700;font-size:.92rem;text-decoration:none;white-space:nowrap;transition:color .15s}
.subnav a:hover{color:var(--text);text-decoration:none}
.subnav a.on{color:var(--text)}
.subnav a.on::after{content:"";position:absolute;left:.6rem;right:.6rem;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--berry)}
.subnav .count{min-width:20px;height:20px;font-size:.7rem;padding:0 .4rem}
@media (max-width:640px){.subnav{margin:-.25rem 0 .8rem}.subnav a{padding:.5rem .7rem;font-size:.88rem}}
@media (max-width:600px){
  .nav-bottom .till-btn{padding:0 .7rem;margin-left:.35rem}
  .nav-bottom .menu{padding:0 .15rem}
  .nav-bottom .menu a{flex:1 0 54px;padding:0 .1rem;font-size:.66rem}
  .nav-bottom .me{padding:0 .3rem}
  .nav-bottom .me-actions>*:not(form){display:none}   /* phones: only Sign out fits; theme and password buttons show on bigger screens */
}

/* Till bar: icon-only buttons (sound, theme, sign out) */
.till-top .tbtn-icon{padding:0;width:40px;justify-content:center}
.till-top .tbtn-icon .label{display:none}

/* Back-office sidebar on laptops and big screens: the menu is short, so give it room to breathe:
   a clear gap under the logo and the till button, and tall, well-spaced menu items */
@media (min-width:981px) and (min-height:700px){
  body:not(.nav-rail):not(.nav-bottom) .logo{padding:clamp(1.4rem,3.4vh,2.6rem) 1.4rem clamp(1.1rem,2.6vh,2rem)}
  body:not(.nav-rail):not(.nav-bottom) .till-btn{height:clamp(48px,5.8vh,58px);margin:0 1.1rem clamp(1.6rem,5vh,3.4rem);font-size:clamp(.95rem,1.6vh,1.05rem)}
  body:not(.nav-rail):not(.nav-bottom) .menu{padding:0 .9rem}
  body:not(.nav-rail):not(.nav-bottom) .menu a{height:clamp(46px,6.2vh,60px);padding:0 1.1rem;border-radius:12px;font-size:clamp(.97rem,1.7vh,1.08rem);
    margin-bottom:clamp(6px,2.2vh,22px);gap:clamp(.9rem,1.5vh,1.15rem)}
  body:not(.nav-rail):not(.nav-bottom) .menu svg{width:clamp(20px,2.4vh,23px);height:clamp(20px,2.4vh,23px)}
}

/* Icon rail: wider, and spread down the screen on taller displays */
.nav-rail{--side:108px}
.nav-rail .side .brand-logo{max-width:76px!important}
.nav-rail .menu{padding:0 .55rem;display:flex;flex-direction:column;gap:clamp(4px,1vh,12px)}
.nav-rail .menu a{min-height:clamp(62px,8.2vh,88px);font-size:.78rem;gap:.35rem;border-radius:14px;margin:0}
.nav-rail .menu svg{width:clamp(24px,2.8vh,28px);height:clamp(24px,2.8vh,28px)}
.nav-rail .till-btn{margin:0 .6rem clamp(.7rem,2vh,1.4rem);padding:clamp(.55rem,1.2vh,.8rem) .2rem;font-size:.8rem}
.nav-rail .logo{padding:clamp(.9rem,2vh,1.4rem) .4rem clamp(.7rem,1.6vh,1.1rem)}
.nav-rail .me{gap:.5rem;padding:.8rem .4rem}
.nav-rail .me-actions{gap:.35rem}
.nav-rail .me-actions .btn{width:48px;height:40px}
@media (max-height:820px){.nav-rail .menu a{min-height:56px}}
@media (max-width:640px){.nav-rail{--side:84px}.nav-rail .menu a{font-size:.7rem}}

/* Header designs (Shop settings › Header design): .hd-side | .hd-centred | .hd-logo | .hd-pill | .hd-compact */
.logo-pill{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;padding:.32rem .75rem;border-radius:99px;background:var(--berry-tint);color:var(--berry-deep);font-size:.8rem;font-weight:700;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.logo-pill svg{width:14px;height:14px;flex:none}
.logo.hd-centred,.logo.hd-logo{flex-direction:column;text-align:center;gap:.55rem}
.logo.hd-centred .logo-text{width:100%}
.logo.hd-centred small{margin-top:.15rem}
.side .logo.hd-centred .brand-logo{max-width:150px!important}
.side .logo.hd-logo .brand-logo{max-width:190px!important}
.logo.hd-pill{flex-wrap:wrap;row-gap:.7rem}
.logo.hd-pill .logo-text{flex:1;min-width:0}
.logo.hd-pill .logo-pill{flex:1 1 100%}
.logo.hd-compact{padding-top:1rem;padding-bottom:.8rem;gap:.55rem}
.logo.hd-compact b{display:block;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:unset}
.logo.hd-compact b .muted{font-weight:600}
.nav-rail .logo .logo-pill{display:none}
/* Little pictures of each header design on the settings page: l = logo, n = name, b = branch */
.hd-shot{display:grid;height:78px;padding:9px;gap:5px;border:1px solid var(--line);border-radius:8px;background:var(--paper);margin-bottom:.25rem;align-content:center}
.hd-shot i{display:block;border-radius:4px;background:var(--line)}
.hd-shot .l{background:var(--berry);border-radius:50%}
.hd-shot .b{background:var(--berry-tint)}
.hd-shot-side{grid-template-columns:24px 1fr;grid-template-rows:9px 7px}.hd-shot-side .l{grid-row:1/3;width:24px;height:24px}.hd-shot-side .b{background:var(--line);width:60%}
.hd-shot-centred{justify-items:center}.hd-shot-centred .l{width:26px;height:26px}.hd-shot-centred .n{width:70%;height:8px}.hd-shot-centred .b{width:45%;height:6px;background:var(--line)}
.hd-shot-logo{justify-items:center}.hd-shot-logo .l{width:38px;height:38px}.hd-shot-logo .n{display:none}.hd-shot-logo .b{width:55%;height:10px;border-radius:99px}
.hd-shot-pill{grid-template-columns:22px 1fr}.hd-shot-pill .l{width:22px;height:22px}.hd-shot-pill .n{height:8px;align-self:center}.hd-shot-pill .b{grid-column:1/3;height:11px;border-radius:99px}
.hd-shot-compact{grid-template-columns:16px 1fr 1fr;align-items:center}.hd-shot-compact .l{width:16px;height:16px}.hd-shot-compact .n,.hd-shot-compact .b{height:7px;background:var(--line)}

/* System colour (Shop settings › System colour). Pink is the default above; each choice swaps the accent in light and dark */
:root[data-accent=violet]{--berry:#5b3cc4;--berry-deep:#452c9f;--berry-tint:#efebfa;--berry-ring:#c9bdf0;--bar-soft:#d3caf2}
:root[data-accent=violet][data-theme=dark]{--berry:#8f78e8;--berry-deep:#b3a3f2;--berry-tint:#241d3d;--berry-ring:#4a3a85;--bar-soft:#3a2f66}
:root[data-accent=mst]{--berry:#4c1bb8;--berry-deep:#3a1490;--berry-tint:#eee8fb;--berry-ring:#c4b2f0;--bar-soft:#cfc2f2}
:root[data-accent=mst][data-theme=dark]{--berry:#8a6cf0;--berry-deep:#b09cf6;--berry-tint:#221a3b;--berry-ring:#46338a;--bar-soft:#37295f}
:root[data-accent=indigo]{--berry:#4f46a8;--berry-deep:#3b348a;--berry-tint:#ecebf7;--berry-ring:#c3c0ea;--bar-soft:#cdcaee}
:root[data-accent=indigo][data-theme=dark]{--berry:#8a84e0;--berry-deep:#aca7ee;--berry-tint:#1f1d38;--berry-ring:#3f3a7a;--bar-soft:#312e5c}
:root[data-accent=plum]{--berry:#6b4fa0;--berry-deep:#533b80;--berry-tint:#f1edf7;--berry-ring:#d0c3e6;--bar-soft:#d9cdea}
:root[data-accent=plum][data-theme=dark]{--berry:#a68bd6;--berry-deep:#c2aee6;--berry-tint:#2a2036;--berry-ring:#54416f;--bar-soft:#43355a}
:root[data-accent=teal]{--berry:#0f766e;--berry-deep:#0b5e58;--berry-tint:#e3f3f1;--berry-ring:#a7d8d2;--bar-soft:#b9e0db}
:root[data-accent=teal][data-theme=dark]{--berry:#3fbfb2;--berry-deep:#73d6cb;--berry-tint:#102c2a;--berry-ring:#1f5a55;--bar-soft:#1d4744}
.accent-picks{display:flex;flex-wrap:wrap;gap:.6rem}
.accent-pick{display:inline-flex;align-items:center;gap:.55rem;padding:.55rem .9rem .55rem .6rem;border:2px solid var(--line);border-radius:99px;cursor:pointer;font-size:.92rem}
.accent-pick .dot{width:22px;height:22px;border-radius:50%;flex:none}
.accent-pick.on{border-color:var(--text)}
.accent-pick:has(input:focus-visible){outline:3px solid var(--berry-ring);outline-offset:2px}

/* ===== Sign-in: a solid side panel (MSTill, the till icon, "Point of sale") and a light sign-in side with a soft wave.
   Colours follow the system colour picked in Shop settings (--berry). ===== */
.auth-body{background:var(--paper)}
.auth{--panel:color-mix(in srgb,var(--berry) 34%,#1b1d36);--soft:color-mix(in srgb,var(--berry) 7%,#f3f4fa);--wave:color-mix(in srgb,var(--berry) 13%,#e4e6f3);
  min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(300px,32%) 1fr}
:root[data-theme=dark] .auth{--panel:color-mix(in srgb,var(--berry) 28%,#0d0e1c);--soft:var(--canvas);--wave:color-mix(in srgb,var(--berry) 12%,var(--paper))}
.auth-panel{background:var(--panel);color:#fff;display:flex;flex-direction:column;padding:clamp(2rem,6vh,3.5rem) clamp(1.75rem,3.5vw,3rem)}
.auth-mark{display:flex;align-items:center;gap:.5rem;font-size:1.55rem;font-weight:800;letter-spacing:-.02em}
.auth-mark svg{width:24px;height:24px;color:var(--berry)}
.auth-icon{flex:1;display:flex;align-items:center}
.auth-icon svg{width:clamp(70px,9vw,104px);height:auto}
.auth-title{margin:0;font-size:clamp(2.6rem,4.6vw,3.9rem);line-height:.98;font-weight:800;letter-spacing:-.035em}
.auth-title span{display:block}
.auth-tag{position:relative;margin:1.4rem 0 0;padding-top:1.1rem;font-size:clamp(.78rem,1vw,.88rem);font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:rgba(255,255,255,.72);line-height:1.5}
.auth-tag::before{content:"";position:absolute;left:0;top:0;width:44px;height:4px;border-radius:2px;background:var(--berry)}

.auth-side{position:relative;overflow:hidden;background:var(--soft);display:flex;flex-direction:column;justify-content:center;padding:2rem clamp(1.5rem,7vw,7rem)}
.auth-wave{position:absolute;right:0;bottom:0;width:62%;height:100%;pointer-events:none}
.auth-wave path{fill:var(--wave)}
.auth-form{position:relative;width:100%;max-width:400px}
.auth-eyebrow{margin:0 0 .35rem;font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--berry)}
.auth-form h1{margin:0 0 1.6rem;font-size:clamp(2rem,3.2vw,2.5rem);line-height:1.1;letter-spacing:-.02em;color:var(--panel)}
:root[data-theme=dark] .auth-form h1{color:var(--text)}
.auth-form .field{margin-bottom:1rem}
.auth-form .input{height:52px;border-radius:4px;background:var(--paper);border-color:var(--line-strong);font-size:1rem}
.auth-form .input:focus{border-color:var(--berry);outline:none;box-shadow:0 0 0 3px var(--berry-ring)}
.auth-form .pw button{background:var(--canvas)}
.auth-forgot{display:block;margin:-.25rem 0 1.25rem;font-size:.88rem;color:var(--berry-deep)}
.auth-go{height:52px;border-radius:4px;font-size:1.02rem}
.auth-foot{position:absolute;right:1.5rem;bottom:1rem;margin:0;font-size:.75rem;color:var(--muted)}

/* Tablets in portrait and phones: the panel becomes a short band on top; everything fits without scrolling */
@media (max-width:820px){
  .auth{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .auth-panel{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.25rem 1rem;padding:max(1.1rem,env(safe-area-inset-top)) 1.25rem 1.2rem}
  .auth-mark{grid-column:1/-1;font-size:1.3rem;margin-bottom:.6rem}
  .auth-icon{grid-row:2/4}.auth-icon svg{width:58px}
  .auth-title{font-size:1.7rem;line-height:1.05}
  .auth-title span{display:inline}
  .auth-tag{margin:.3rem 0 0;padding:0;font-size:.7rem;letter-spacing:.12em}
  .auth-tag::before{display:none}
  .auth-side{justify-content:flex-start;padding:1.6rem 1.25rem max(2.4rem,env(safe-area-inset-bottom))}
  .auth-form{margin:0 auto}
  .auth-form h1{font-size:1.9rem;margin-bottom:1.2rem}
  .auth-foot{left:0;right:0;text-align:center;bottom:.6rem}
}
@media (max-width:820px) and (max-height:640px){
  .auth-mark{margin-bottom:.3rem}.auth-icon svg{width:46px}.auth-title{font-size:1.45rem}.auth-tag{font-size:.66rem}
  .auth-side{padding-top:1.1rem}.auth-form h1{font-size:1.6rem;margin-bottom:.8rem}
  .auth-form .field{margin-bottom:.7rem}.auth-form .input{height:48px}.auth-go{height:48px}
}

/* ===== Refinements: reminders on the menu, Overview extras ===== */
/* Cash-up: earlier days nobody counted, as small chips under the date (they used to be a banner) */
.missed-days{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem;margin:-.6rem 0 1.25rem}
.missed-label{display:inline-flex;align-items:center;gap:.35rem;font-size:.85rem;font-weight:750;color:var(--amber);margin-right:.15rem}
.missed-label svg{width:16px;height:16px}
.day-chip{display:inline-flex;align-items:center;gap:.35rem;height:32px;padding:0 .75rem;border-radius:99px;background:var(--amber-tint);color:var(--amber);font-size:.84rem;font-weight:600;text-decoration:none;border:1px solid color-mix(in srgb,var(--amber) 22%,transparent)}
.day-chip b{font-weight:800}
.day-chip:hover{background:color-mix(in srgb,var(--amber) 16%,var(--paper));text-decoration:none}
/* Overview: today's exchange rate, when a second currency is on */
.rate-strip{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;padding:.85rem 1.25rem}
.rate-strip .rate-ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--blue-tint);color:var(--blue);flex:none}
.rate-strip .rate-ico svg{width:20px;height:20px}
.rate-strip.unset .rate-ico{background:var(--amber-tint);color:var(--amber)}
.rate-strip small{display:block;color:var(--muted);font-size:.82rem}
/* Phones: fourteen days of bars in a narrow card; every other day keeps its label (always "Today") */
@media (max-width:640px){
  .bars{gap:4px;padding:1.4rem .9rem .55rem;height:200px}
  .bars::before{left:.9rem;right:.9rem;top:1.4rem;bottom:2rem}
  .bars .b span{font-size:.62rem;visibility:hidden}
  .bars .b:nth-last-child(odd) span{visibility:visible}
}
