/* Restaurant billing.  The colours and font below are only defaults: each restaurant's own
   theme is written into a <style> block by base.html (see settings.py). */
:root {
  --primary: #c0392b; --primary-dark: #9a2e22; --primary-text: #c0392b; --on-primary: #fff;
  --on-primary-soft: rgba(255,255,255,.2); --brand-on-primary: #c9a35b;
  --accent: #c9a35b; --on-accent: #111; --dark: #1b3a2a; --on-dark: #fff; --accent-on-dark: #c9a35b;
  --bg: #f8f6ee;
  --ink: #22281f; --muted: #6b7266; --line: #e4dfd0;
  --card: #ffffff; --ok: #2e8b57; --veg: #2e8b57; --nonveg: #c0392b; --danger: #b3261e;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 var(--font);
       background: var(--bg); color: var(--ink); }
button, input, select, textarea { font-family: inherit; }
h1 { font-size: 1.5rem; margin: 0 0 .6rem; color: var(--dark); }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; color: var(--dark); }
a { color: var(--primary-text); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.n { text-align: right; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* top bar: slim and quiet.  On phones the page links move to a tab bar at the bottom. */
.topbar { display: flex; align-items: center; gap: 1rem; background: var(--card); color: var(--ink);
          padding: 0 1rem; height: 56px; position: sticky; top: 0; z-index: 20;
          border-bottom: 1px solid var(--line); }
.brand { color: var(--primary-text); font-weight: 700; font-size: 1.05rem; text-decoration: none;
         white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tabnav { display: flex; gap: .15rem; flex: 1; justify-content: center; }
.tabnav a { display: flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none;
            padding: .45rem .75rem; border-radius: 999px; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.tabnav a:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.tabnav a.on { color: var(--primary-text); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.tabnav .ic { width: 18px; height: 18px; flex: none; }
.tabnav .badge { background: var(--primary); color: var(--on-primary); }
.usermenu { position: relative; }
.bell { margin-left: auto; display: flex; align-items: center; gap: .35rem; color: var(--muted); text-decoration: none;
        padding: .45rem .7rem; border-radius: 999px; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.bell:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.bell.on { color: var(--primary-text); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.bell .ic { width: 20px; height: 20px; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer;
                    padding: .25rem; border-radius: 999px; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
          background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary-text); font-weight: 700; }
.who { font-size: .9rem; color: var(--muted); max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-box { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; background: var(--card);
                border: 1px solid var(--line); border-radius: 14px; padding: .8rem; z-index: 40;
                box-shadow: 0 12px 32px rgba(0,0,0,.14); display: grid; gap: .6rem; }
.um-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.usermenu-box label { margin: 0; }
.usermenu-box .lang-select { width: 100%; }
.logout { display: grid; gap: .5rem; margin: 0; }

main { max-width: 760px; margin: 1rem auto; padding: 0 1rem 5rem; }
.card { box-shadow: none; }
main.wide { max-width: 1280px; } main.receipt-main { max-width: 420px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }

/* buttons & inputs */
.btn { display: inline-block; background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary);
       border-radius: 10px; padding: .65rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer;
       text-decoration: none; text-align: center; }
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--primary-text); border-color: var(--line); }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn.small { padding: .3rem .7rem; font-size: .9rem; border-radius: 8px; }
.btn.block { display: block; width: 100%; }
input, select { font: inherit; padding: .55rem .65rem; border: 1px solid #cfc9b6; border-radius: 8px;
                background: #fff; color: var(--ink); max-width: 100%; }
input:focus, select:focus, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: .8rem; }
label input, label select { display: block; width: 100%; margin-top: .25rem; color: var(--ink); }
input.short { width: 6rem; }
.check { display: flex; gap: .5rem; align-items: center; color: var(--ink); margin: .6rem 0; }
.check input { width: auto; margin: 0; }

.flash { padding: .6rem .8rem; border-radius: 8px; margin-bottom: .8rem; background: #fdecea;
         border: 1px solid #f3b8b1; color: #7a1d14; }
.flash.ok { background: #e8f5ee; border-color: #b6dfc6; color: #1d5a3a; }

.login-page main { margin-top: 12vh; }
.login-head { text-align: center; margin-bottom: 1rem; }
.login-head h1 { color: var(--primary-text); font-size: 1.4rem; }

/* tables / filters */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
                color: var(--muted); border-bottom: 2px solid var(--line); padding: .45rem .5rem; }
table.data td { padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th.n { text-align: right; }
table.data tr.void td { color: var(--muted); text-decoration: line-through; }
table.data tr.void td:last-child { text-decoration: none; }
.tag { background: #eee; border-radius: 6px; padding: .1rem .4rem; font-size: .75rem; margin-right: .3rem; }
.filters { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.filters label { margin: 0; }
.filters label input, .filters label select { width: auto; }
.filters .spacer { flex: 1; }
form.inline { display: flex; gap: .4rem; align-items: center; margin: 0; }
form.inline input { padding: .3rem .5rem; width: 10rem; }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin-top: 1rem; }
.custom-date { display: none; } .custom-date.show { display: block; }

/* ---------------- billing screen ---------------- */
.tabs { display: flex; gap: .5rem; margin-bottom: .8rem; }
.tabs button { flex: 1; padding: .6rem .5rem; border: 1px solid var(--line); background: #fff;
               border-radius: 999px; font: inherit; font-weight: 700; font-size: .98rem;
               color: var(--dark); cursor: pointer; }
.tabs button.on { background: var(--dark); color: var(--accent-on-dark); border-color: var(--dark); }
.bill-layout { display: grid; grid-template-columns: 1fr 380px; gap: 1rem; align-items: start; }
.menu-pane { min-width: 0; }
.menu-tools { display: flex; gap: .6rem; margin-bottom: .6rem; flex-wrap: wrap; }
.menu-tools input[type=search] { flex: 1; min-width: 160px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; flex: none; }
.seg button { border: 0; background: transparent; padding: .45rem .75rem; font: inherit; font-size: .9rem; cursor: pointer;
              display: flex; align-items: center; gap: .15rem; color: var(--ink); }
.seg button.on { background: var(--dark); color: var(--on-dark); }
.chips-wrap { position: relative; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .5rem; }
.chips button { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px;
                padding: .35rem .85rem; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); }
.chips button.on { background: var(--dark); border-color: var(--dark); color: var(--on-dark); font-weight: 600; }
.chips { scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.item { position: relative; text-align: left; background: #fff; border: 1px solid var(--line);
        border-radius: 12px; padding: .65rem .7rem; cursor: pointer; font: inherit; touch-action: manipulation;
        display: flex; flex-direction: column; gap: .2rem; min-height: 72px; color: var(--ink); }
.item:hover { border-color: var(--accent); }
.item:active { transform: scale(.98); }
.item .nm { font-weight: 600; line-height: 1.25; }
.item .pr { margin-top: auto; color: var(--muted); font-weight: 600; font-size: .9rem; }
.item.in { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.item .badge { position: absolute; bottom: .55rem; right: .55rem; top: auto; background: var(--primary); color: var(--on-primary);
               min-width: 24px; height: 24px; border-radius: 12px; font-size: .8rem; font-weight: 700; margin: 0;
               display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.dot { display: inline-block; width: 12px; height: 12px; border: 2px solid; border-radius: 3px;
       position: relative; vertical-align: middle; }
.dot::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: currentColor; }
.dot.veg { color: var(--veg); } .dot.nonveg { color: var(--nonveg); }
.item .dot { position: absolute; top: .55rem; right: .55rem; }
.item .nm { padding-right: 18px; }
.cat-title { grid-column: 1 / -1; margin: .9rem 0 .1rem; font-weight: 700; color: var(--muted);
             font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.cat-title:first-child { margin-top: .2rem; }

.cart-pane { position: sticky; top: 72px; background: #fff; border: 1px solid var(--line);
             border-radius: 16px; padding: 1rem; max-height: calc(100vh - 88px); overflow-y: auto; }
.cart-pane h2 { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.sheet-grip, .sheet-close { display: none; }
.empty { padding: 1rem 0; text-align: center; }
.line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; padding: .5rem 0;
        border-bottom: 1px solid var(--line); }
.line .nm { font-weight: 600; } .line .rate { color: var(--muted); font-size: .85rem; }
.line .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty { display: flex; align-items: center; gap: .4rem; }
.qty button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #cfc9b6; background: #fff;
              font-size: 1.2rem; cursor: pointer; line-height: 1; }
.qty .q { min-width: 1.8rem; text-align: center; font-weight: 700; }
.qty .rm { border-color: transparent; color: var(--danger); margin-left: .3rem; }
.totals { margin-top: .6rem; }
.totals .row { display: flex; justify-content: space-between; align-items: center; padding: .25rem 0; }
.totals .row input { width: 6rem; text-align: right; padding: .3rem .5rem; }
.totals .grand { font-size: 1.4rem; border-top: 2px solid var(--dark); margin-top: .3rem; padding-top: .5rem; }
.pay { display: flex; gap: .4rem; margin: .7rem 0; }
.pay button { flex: 1; padding: .6rem 0; border: 2px solid var(--line); background: #fff; border-radius: 10px;
              font: inherit; font-weight: 600; cursor: pointer; }
.pay button.on { border-color: var(--dark); background: var(--dark); color: var(--on-dark); }
.cart-pane #note { width: 100%; }
.actions { display: flex; gap: .6rem; margin-top: .6rem; }
.actions .btn { flex: 1; padding: .85rem; font-size: 1.05rem; }
.actions #clear { flex: 0 0 auto; }
.mobile-bar { position: fixed; left: .75rem; right: .75rem; bottom: calc(var(--nav-h) + .6rem); z-index: 30;
              gap: .4rem; align-items: stretch; }
.mobile-bar .mb-open { flex: 1; min-width: 0; display: flex; border: 0; background: var(--primary); color: var(--on-primary);
              font: inherit; padding: .8rem 1.1rem; border-radius: 14px; justify-content: space-between; align-items: center;
              cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.18); text-align: left; }
.mobile-bar.quick .mb-open { padding: .7rem .8rem; }
.mobile-bar.quick .mb-go { font-size: .9rem; }
.mb-pay { display: flex; gap: .4rem; }
.mb-pay[hidden] { display: none; }
.mb-q { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 76px; padding: .35rem .6rem;
        border: 2px solid var(--dark); background: #fff; color: var(--dark); border-radius: 14px; font: inherit; cursor: pointer;
        box-shadow: 0 8px 24px rgba(0,0,0,.18); line-height: 1.15; }
.mb-q b { font-size: 1.05rem; }
.mb-q small { font-size: .7rem; color: var(--muted); }
.mb-q:disabled { opacity: .55; }
.mobile-bar { display: none; }
.mobile-bar .mb-left { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.mobile-bar .mb-n { font-size: .8rem; opacity: .9; }
.mobile-bar b { font-size: 1.15rem; }
.mobile-bar .mb-go { font-weight: 700; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 34; }

@media screen and (max-width: 900px) {
  .mobile-bar:not([hidden]) { display: flex; }
  .bill-layout { grid-template-columns: 1fr; }
  /* the bill is a sheet that slides up from the bottom */
  .cart-pane { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 35; max-height: 88vh;
               border-radius: 18px 18px 0 0; border: 0; padding: .4rem 1rem calc(1rem + env(safe-area-inset-bottom));
               transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -10px 30px rgba(0,0,0,.18); }
  .sheet-open .cart-pane { transform: none; }
  .sheet-open { overflow: hidden; }
  .sheet-grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: .3rem auto .7rem; }
  .sheet-close { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
                 border: 0; border-radius: 50%; background: #f1efe8; color: var(--ink); font-size: 1rem; cursor: pointer; }
  .menu-pane { padding-bottom: 5rem; }
  /* search, veg filter and categories stay in reach while scrolling */
  .menu-tools, .chips-wrap { position: sticky; z-index: 10; background: var(--bg); }
  .menu-tools { top: 56px; padding-top: .5rem; margin: -.5rem 0 0; flex-wrap: nowrap; }
  .chips-wrap { top: 106px; }
  .chips { padding: .4rem 0 .5rem; margin-bottom: .2rem; }
  .menu-tools input[type=search] { min-width: 0; }
  .seg .lbl { display: none; }
  .seg button { padding: .45rem .7rem; }
}

/* ---------------- receipt ---------------- */
.receipt-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.receipt { position: relative; width: 100%; max-width: 380px; background: #fff; padding: 1rem;
           border: 1px solid var(--line); font: 14px/1.4 "Courier New", ui-monospace, monospace; color: #000; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: .5rem 0; }
.r-head { text-align: center; } .r-name { font-size: 1.4em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.r-meta div, .r-tot div { display: flex; justify-content: space-between; gap: .5rem; }
.r-meta span { color: #444; }
.r-items { width: 100%; border-collapse: collapse; }
.r-items th { text-align: left; border-bottom: 1px solid #000; font-weight: 700; }
.r-items th.n, .r-items td.n { text-align: right; }
.r-items td { padding: 2px 0; vertical-align: top; }
.r-tot .g { font-size: 1.25em; font-weight: 700; margin: .2rem 0; }
.r-foot { text-align: center; }
.void-mark { position: absolute; inset: 40% 0 auto; text-align: center; font-size: 2.2rem; font-weight: 700;
             color: rgba(192,57,43,.45); transform: rotate(-18deg); pointer-events: none; }
.receipt-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.receipt-actions form { margin: 0; }

@media print {
  @page { margin: 4mm; }
  .no-print, .topbar { display: none !important; }
  body { background: #fff; }
  main, main.receipt-main { max-width: none; margin: 0; padding: 0; }
  .receipt { border: 0; max-width: 76mm; width: 76mm; padding: 0; font-size: 12px; }
}

/* ---------------- dashboard ---------------- */
.filters-card { padding-bottom: .6rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.kpi .l { color: var(--muted); font-size: .85rem; }
.kpi .v { font-size: 1.7rem; font-weight: 700; color: var(--dark); font-variant-numeric: tabular-nums; }
.kpi .d { font-size: .85rem; }
.up { color: var(--ok); } .down { color: var(--danger); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media screen and (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--primary); } .chart .bar:hover { fill: var(--dark); }
.chart .axis { stroke: var(--line); } .chart text { fill: var(--muted); font-size: 10px; font-family: inherit; }
.rank { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .2rem .6rem; align-items: center; padding: .3rem 0;
        border-bottom: 1px solid var(--line); }
.rank .i { color: var(--muted); text-align: right; font-size: .85rem; }
.rank .bar-bg { grid-column: 2 / 4; height: 6px; background: #f0ece0; border-radius: 3px; overflow: hidden; }
.rank .bar-fg { height: 100%; background: var(--accent); }
.rank .val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank .sub { color: var(--muted); font-weight: 400; font-size: .85rem; }
.donut-wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.donut-wrap svg { width: 130px; height: 130px; flex: none; }
.legend { list-style: none; margin: 0; padding: 0; font-size: .9rem; flex: 1; min-width: 130px; }
.legend li { display: flex; justify-content: space-between; gap: .6rem; padding: .15rem 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .4rem; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills span { background: #f0ece0; border-radius: 999px; padding: .15rem .7rem; font-size: .88rem; }

/* ---------------- first-run wizard & settings ---------------- */
.wizard { max-width: 780px; margin: 0 auto; padding-bottom: 6rem; }
.wiz-top { background: var(--primary); color: var(--on-primary); padding: .9rem 1rem;
           display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.wiz-top .brand { font-size: 1.3rem; }
.wiz-top .motto { opacity: .9; font-size: .95rem; }
.steps { list-style: none; display: flex; gap: .35rem; padding: 0; margin: 1rem 0; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); counter-increment: s; }
.steps li::before { content: counter(s); display: flex; align-items: center; justify-content: center;
                    width: 28px; height: 28px; margin: 0 auto .25rem; border-radius: 50%;
                    background: #fff; border: 2px solid var(--line); font-weight: 700; }
.steps li.on { color: var(--dark); font-weight: 700; }
.steps li.on::before { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.steps li.done::before { content: "✓"; background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
@media screen and (max-width: 600px) { .steps li span { display: none; } }
.step { display: none; } .step.on { display: block; }
.step h1 { margin-bottom: .2rem; }
.wiz-nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1rem; }
.wiz-nav .btn { min-width: 7rem; }
.hint { color: var(--muted); font-size: .85rem; margin: -.4rem 0 .8rem; }
.field-error { color: var(--danger); font-weight: 600; margin: .4rem 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media screen and (max-width: 600px) { .row2, .row3 { grid-template-columns: 1fr; } }
/* (v6.16: no red star – the optional boxes say "Optional") */
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 700; color: var(--dark); padding: 0; margin-bottom: .5rem; }
.sub-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; background: #fcfbf7; }
.sub-card h2 { margin-bottom: .4rem; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.swatch, .fontopt { position: relative; display: block; margin: 0; cursor: pointer; color: var(--ink); }
.swatch input, .fontopt input { position: absolute; opacity: 0; pointer-events: none; }
.swatch .box, .fontopt .box { display: block; border: 2px solid var(--line); border-radius: 10px; padding: .5rem; background: #fff; }
.swatch input:checked + .box, .fontopt input:checked + .box { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.swatch input:focus-visible + .box, .fontopt input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatch .bars { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin-bottom: .35rem; }
.swatch .bars i { flex: 1; }
.swatch .nm { font-size: .85rem; font-weight: 600; }
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.fontopt .big { display: block; font-size: 1.2rem; line-height: 1.3; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fontopt .nm { display: block; font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.custom-colors { display: none; gap: 1rem; align-items: flex-end; margin-top: .8rem; flex-wrap: wrap; }
.custom-colors.show { display: flex; }
.custom-colors label { margin: 0; }
.custom-colors input[type=color] { width: 70px; height: 42px; padding: 2px; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.checks .check { margin: 0; }
.summary { display: grid; grid-template-columns: 9rem 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.summary dt { color: var(--muted); } .summary dd { margin: 0; font-weight: 600; word-break: break-word; }
.code-box input { font-size: 1.4rem; letter-spacing: .25em; text-transform: uppercase; text-align: center; }
.tabbar { display: flex; gap: .4rem; margin-bottom: .8rem; flex-wrap: wrap; }
.tabbar button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .4rem .9rem; font: inherit; cursor: pointer; }
.tabbar button.on { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.panel { border: 1px dashed #cfc9b6; border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; background: #fff; }
.panel textarea { width: 100%; min-height: 8rem; font: inherit; padding: .6rem; border: 1px solid #cfc9b6; border-radius: 8px; }
.status { margin: .5rem 0 0; font-size: .92rem; }
.status.err { color: var(--danger); font-weight: 600; } .status.okmsg { color: #1d5a3a; font-weight: 600; }
.spin { display: inline-block; width: .9em; height: .9em; border: 2px solid var(--line); border-top-color: var(--primary);
        border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -.1em; margin-right: .4rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- menu editor ---------------- */
.me-tabs { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.me-tabs button { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: .45rem .9rem; font: inherit; font-weight: 600; cursor: pointer; color: var(--dark); }
.me-tabs button.on { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.me-menu-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.me-menu-tools input { width: 14rem; }
.me-summary { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.me-cat { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; background: #fff; overflow: hidden; }
.me-cat-head { display: flex; gap: .5rem; align-items: center; padding: .5rem .6rem; background: var(--bg); border-bottom: 1px solid var(--line); }
.me-cat-head input { flex: 1; font-weight: 700; min-width: 0; }
.me-row { display: grid; grid-template-columns: 38px 1fr 7.5rem 34px; gap: .4rem; align-items: center; padding: .3rem .6rem; border-bottom: 1px solid #f1eee3; }
.me-row input { width: 100%; min-width: 0; }
.me-row input.price { text-align: right; }
.me-row input.bad { border-color: var(--danger); background: #fdf3f2; }
.vegbtn { width: 38px; height: 38px; border: 1px solid #cfc9b6; background: #fff; border-radius: 8px; cursor: pointer; padding: 0; }
.vegbtn .dot { width: 14px; height: 14px; }
.xbtn { width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; border-radius: 8px; line-height: 1; }
.xbtn:hover { background: #fdecea; color: var(--danger); }
.me-add { display: flex; gap: .5rem; padding: .5rem .6rem; }
.me-cat + .btn, .me-empty + .btn { margin-bottom: 1rem; }
.me-empty { text-align: center; color: var(--muted); padding: 1.2rem; border: 1px dashed #cfc9b6; border-radius: var(--radius); margin-bottom: .8rem; }
.savebar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: .7rem 0; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
@media screen and (max-width: 600px) { .me-row { grid-template-columns: 38px 1fr 5.5rem 30px; padding: .3rem .4rem; } }

/* ---------------- settings sub-navigation ---------------- */
.subnav { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 2px solid var(--line); }
.subnav a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600;
            border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subnav a:hover { color: var(--dark); }
.subnav a.on { color: var(--dark); border-bottom-color: var(--primary); }

/* ---------------- floor plan (billing + editor) ---------------- */
.plan { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: 720px; margin: 0 auto; }
.plan .cell { aspect-ratio: 1; border-radius: 10px; }
.plan.edit .cell { border: 1px dashed #d8d2bf; background: #fcfbf7; }
.plan .tbl { z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
             border: 2px solid var(--line); background: #fff; color: var(--dark); border-radius: 12px; padding: 2px;
             font: inherit; cursor: pointer; min-width: 0; touch-action: manipulation; }
.plan .tbl b { font-size: 1.15rem; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan .tbl small { font-size: .7rem; color: var(--muted); }
.plan .tbl:hover { border-color: var(--primary); }
.plan .tbl.busy { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.plan .tbl.busy small { color: inherit; opacity: .9; }
.plan.edit .tbl { touch-action: none; cursor: grab; user-select: none; }
.plan.edit .tbl.sel { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent); }
.plan.edit .tbl.drag { z-index: 5; cursor: grabbing; box-shadow: 0 8px 20px rgba(0,0,0,.25); opacity: .92; }
.floor-head { display: flex; justify-content: flex-end; max-width: 720px; margin: 0 auto .6rem; }
.table-bar { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.table-bar b { font-size: 1.15rem; color: var(--dark); }
.table-bar #tb-guests { margin-left: auto; }
.te-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; color: var(--muted); }
.te-bar input { width: 4.5rem; text-align: center; }
.te-empty { text-align: center; color: var(--muted); margin: .8rem 0 0; }
.te-panel { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.te-panel input { width: 8rem; }
.te-panel .btn { margin-left: auto; }
.stepper { display: flex; align-items: center; gap: .3rem; }
.stepper button { width: 38px; height: 38px; border-radius: 8px; border: 1px solid #cfc9b6; background: #fff; font-size: 1.2rem; cursor: pointer; }
.stepper .val { min-width: 4.5rem; text-align: center; font-weight: 600; }
#table-editor { margin-top: .8rem; }

/* ---------------- pop-up questions ---------------- */
dialog.ask { border: 0; border-radius: 16px; padding: 1.2rem; width: min(92vw, 380px); box-shadow: 0 20px 50px rgba(0,0,0,.3); color: var(--ink); font: inherit; }
dialog.ask::backdrop { background: rgba(0,0,0,.45); }
dialog.ask h2 { font-size: 1.3rem; margin: 0 0 .2rem; }
dialog.ask .q { margin: 0 0 .8rem; color: var(--muted); }
dialog.ask input { width: 100%; font-size: 1.4rem; text-align: center; margin: .8rem 0; }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .8rem; }
.nums button { padding: .9rem 0; font: inherit; font-size: 1.3rem; font-weight: 700; border: 2px solid var(--line); background: #fff;
               border-radius: 12px; cursor: pointer; color: var(--dark); }
.nums button:hover, .nums button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.nums button.more { color: var(--muted); }
dialog.ask .actions { display: flex; gap: .6rem; }
dialog.ask .actions .btn { flex: 1; }

/* ---------------- stock ---------------- */
.badge { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: var(--on-primary);
         color: var(--primary); font-size: .75rem; font-weight: 700; text-align: center; line-height: 1.3em; margin-left: .15rem; }
.page-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.page-head h1 { margin: 0; flex: 1; }
#alerts-btn.on { color: var(--ok); border-color: #b6dfc6; }
.stock-bar { display: flex; gap: .5rem; margin-bottom: .8rem; }
.stock-bar input { flex: 1; min-width: 0; }
.mode-head { color: var(--muted); margin: -.2rem 0 .6rem; }
.card.flush, .stock-list { padding: 0; overflow: hidden; }
.stock-list { list-style: none; margin: 0 0 1rem; }
.s-item + .s-item { border-top: 1px solid var(--line); }
.s-row { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .75rem 1rem; background: none; border: 0;
         font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.s-row:hover { background: #fcfbf7; }
.s-row .nm { flex: 1; min-width: 0; font-weight: 600; }
.s-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.s-row .qty { font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-item.low .qty, .s-item.out .qty { color: var(--danger); font-weight: 700; }
.pill { font-size: .72rem; font-weight: 700; color: var(--danger); background: #fdecea; border-radius: 999px; padding: .1rem .5rem; }
.s-row.edit { cursor: default; padding: .5rem 1rem; }
.with-unit { display: flex; align-items: center; gap: .3rem; }
.with-unit .u { color: var(--muted); width: 2rem; font-size: .9rem; }
.s-row.edit input { width: 6.5rem; text-align: right; }
.s-row.edit input.c { width: 6.5rem; }
.s-empty { padding: 1rem; text-align: center; color: var(--muted); }
.savebar.sticky { z-index: 5; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--dark); color: var(--on-dark);
         padding: .6rem 1rem; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: opacity .5s; z-index: 50; }
.toast.go { opacity: 0; }
dialog.ask.wide { width: min(94vw, 560px); }
.hist { max-height: 55vh; overflow-y: auto; margin-bottom: .8rem; }
.hist td { padding: .4rem .3rem; font-size: .88rem; }
.hist td.plus { color: var(--ok); }
@media screen and (max-width: 520px) {
  .s-row.edit { flex-wrap: wrap; }
  .s-row.edit .nm { flex-basis: 100%; }
  .s-row.edit input, .s-row.edit input.c { width: 100%; }
  .s-row.edit .with-unit, .s-row.edit input.c { flex: 1; }
}

/* settings: recipes & ingredients */
.rec-cat { margin-bottom: .8rem; }
.rec-cat-h { margin: 0; padding: .55rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); font-size: .95rem; }
.rec-row { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .6rem 1rem; border: 0; background: none;
           font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rec-row + .rec-row { border-top: 1px solid #f1eee3; }
.rec-row:hover { background: #fcfbf7; }
.rec-main { flex: 1; min-width: 0; }
.rec-main b { display: block; }
.rec-main small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-row.none .rec-main small { color: var(--primary-text); }
.rec-cost { white-space: nowrap; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-lines { margin-bottom: .5rem; }
.rec-line { display: grid; grid-template-columns: 1fr 5.5rem 4.8rem 34px; gap: .4rem; margin-bottom: .4rem; align-items: center; }
.rec-line input, .rec-line select { width: 100%; min-width: 0; }
dialog.ask .rec-line input { font-size: 1rem; text-align: left; margin: 0; }
dialog.ask .actions { margin-top: .8rem; }
.ing-head, .ing-row { display: grid; grid-template-columns: 1fr 5.5rem 6rem 34px; gap: .4rem; align-items: center; }
.ing-head { margin-bottom: .3rem; }
.ing-row { margin-bottom: .4rem; }
.ing-row input, .ing-row select { width: 100%; min-width: 0; }
.row-btns { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
#st-text { width: 100%; font: .92rem/1.4 ui-monospace, Menlo, Consolas, monospace; padding: .6rem; border: 1px solid #cfc9b6; border-radius: 8px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--primary-text); text-decoration: underline; cursor: pointer; }
.s-item.new .qty { color: var(--muted); }
.hint-line { margin: -.2rem 0 .6rem; color: var(--primary-text); font-weight: 600; }

/* ---------------- payments: split, UPI QR ---------------- */
.pay-extra { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: -.2rem 0 .6rem; }
.pay-extra .linkbtn { font-size: .9rem; text-align: left; }
.linkbtn.bad, .q.bad { color: var(--danger); }
.q.good { color: var(--ok); font-weight: 600; }
.split-rows { display: grid; gap: .5rem; margin-bottom: .4rem; }
.split-row { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--ink); font-weight: 600; }
.split-row span { flex: 1; }
dialog.ask .split-row input { width: 8rem; margin: 0; font-size: 1.15rem; text-align: right; }
dialog.ask.qr { width: min(92vw, 360px); text-align: center; }
dialog.ask.qr h2 { font-size: 1.8rem; }
.qr-img { width: 100%; max-width: 280px; aspect-ratio: 1; display: block; margin: .4rem auto; image-rendering: pixelated; }
.r-title { font-weight: 700; letter-spacing: .08em; margin-top: .3rem; }
.r-small { font-size: .78em; }
.r-qr { text-align: center; font-size: .85em; }
.r-qr svg { width: 42mm; height: 42mm; display: block; margin: 0 auto .2rem; }

/* ---------------- cash drawer ---------------- */
.c-open { display: flex; gap: .5rem; }
.c-open input { flex: 1; min-width: 0; font-size: 1.1rem; }
.c-big { text-align: center; margin: .2rem 0 1rem; }
.c-big small { display: block; color: var(--muted); }
.c-big b { font-size: 2.2rem; color: var(--dark); font-variant-numeric: tabular-nums; }
.c-line { display: flex; justify-content: space-between; gap: .8rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.c-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-line.muted b { font-weight: 400; }
.c-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.c-actions .btn { flex: 1; }
dialog.ask input.c-count { font-size: 1.6rem; margin: .4rem 0 .6rem; }
.c-notes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .8rem; margin: .6rem 0; }
.c-note { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--ink); }
.c-note span { flex: 1; white-space: nowrap; }
dialog.ask .c-note input { width: 4.5rem; margin: 0; font-size: 1rem; }
dialog.ask input[type=text] + input[type=text] { margin-top: 0; }
td.short { color: var(--danger); font-weight: 600; } td.extra { color: #8a6d00; font-weight: 600; } td.even { color: var(--ok); }
dialog.ask input.plain { font-size: 1rem; text-align: left; margin-top: 0; }
dialog.ask .q.good { color: var(--ok); font-weight: 600; }
dialog.ask .q.bad { color: var(--danger); font-weight: 600; }
.pay-extra .linkbtn { color: var(--ink); }
.pay-extra .linkbtn.bad { color: var(--danger); }

/* ---------------- languages, practice, users ---------------- */
.lang-form { margin: 0; }
.lang-select { font-size: .95rem; }
.login-lang { text-align: center; margin-top: 1rem; }
.login-lang .lang-select { background: #fff; color: var(--ink); border-color: var(--line); font-size: .95rem; max-width: none; }
.practice-bar { background: #fef3c7; color: #7a4b00; text-align: center; font-weight: 600; font-size: .88rem; padding: .4rem 1rem; }
.item .nm-en { display: block; font-size: .72rem; color: var(--muted); margin-top: .1rem; }
.more-btn { margin: .2rem 0 .5rem; font-size: .92rem; }
.pill.practice { background: #fff4dc; color: #8a5a00; }
.practice-mark { color: #b45309; border-color: #b45309; }
.receipt.is-void .practice-mark { opacity: 1; }
.user-card .user-head { display: flex; align-items: center; gap: .6rem; }
.user-card .user-head h2 { margin: 0; flex: 1; }
.user-card.off { opacity: .6; }
.user-perms { display: grid; gap: .6rem; margin: .7rem 0; }
.user-perms label { margin: 0; }
.user-perms select { max-width: 20rem; }
.user-perms .checks { flex-direction: column; gap: .1rem; }
.user-perms .btn { justify-self: start; }
.user-tools { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: .7rem; }
.names-card summary { cursor: pointer; }
.names-card textarea { width: 100%; margin-top: .8rem; font: .92rem/1.4 ui-monospace, Menlo, Consolas, monospace;
                       padding: .6rem; border: 1px solid #cfc9b6; border-radius: 8px; }
.practice-mark { font-size: 1.45rem; }

/* ---------------- plan / licence ---------------- */
.plan-bar { background: #fde68a; color: #3d2c00; text-align: center; font-weight: 600; font-size: .88rem; padding: .4rem 1rem; }
.plan-bar.stop { background: #b91c1c; color: #fff; }
.plan-bar.soft { background: #fff7d6; font-weight: 400; }
.plan-bar a { color: inherit; text-decoration: underline; font-weight: 700; margin-left: .4rem; }
.plan-head { display: flex; align-items: center; gap: .6rem; }
.plan-head h2 { margin: 0; flex: 1; }
.pill.ok { background: #e3f4ea; color: var(--ok); }
.pill.warn { background: #fff4dc; color: #8a5a00; }
.modules { list-style: none; padding: 0; margin: .8rem 0 0; }
.modules li { padding: .35rem 0 .35rem 1.6rem; position: relative; }
.modules li::before { position: absolute; left: 0; font-weight: 700; }
.modules li.on::before { content: "✓"; color: var(--ok); }
.modules li.off { color: var(--muted); }
.modules li.off::before { content: "–"; }
.card textarea[name=licence] { width: 100%; font: .85rem/1.4 ui-monospace, Menlo, Consolas, monospace; padding: .5rem;
  border: 1px solid #cfc9b6; border-radius: 8px; }

/* ---------------- phone layout: bottom tab bar ---------------- */
:root { --nav-h: 0px; }
@media screen and (max-width: 900px) {
  :root { --nav-h: calc(60px + env(safe-area-inset-bottom)); }
  .topbar { height: 56px; }
  .tabnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--card);
            border-top: 1px solid var(--line); height: var(--nav-h); padding: 0 .25rem env(safe-area-inset-bottom);
            gap: 0; justify-content: space-around; }
  .tabnav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: .15rem;
              padding: .35rem .1rem; border-radius: 0; font-size: .68rem; font-weight: 600; position: relative;
              overflow: hidden; text-overflow: ellipsis; }
  .tabnav a, .tabnav a:hover { background: none; }
  .tabnav a.on { background: none; }
  .tabnav a.on .ic { background: color-mix(in srgb, var(--primary) 12%, transparent); border-radius: 999px;
                     padding: 2px 14px; box-sizing: content-box; }
  .tabnav .ic { width: 22px; height: 22px; }
  .tabnav .badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
  .has-nav main { padding-bottom: calc(var(--nav-h) + 2rem); }
  .who { display: none; }
  .bell span { display: none; }
  .bell { padding: .5rem; }
  .subnav { overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .subnav::-webkit-scrollbar { display: none; }
  .toast { bottom: calc(var(--nav-h) + 1rem); }
}
@media screen and (max-width: 600px) {
  main { margin-top: .75rem; padding-left: .75rem; padding-right: .75rem; }
  .card { padding: .9rem; border-radius: 14px; }
  h1 { font-size: 1.3rem; }
  .items { grid-template-columns: 1fr 1fr; }
  .item .nm { font-size: .95rem; }
}
@media print { .tabnav, .usermenu, .mobile-bar, .sheet-backdrop { display: none !important; } }

/* ---------------- alerts page ---------------- */
.al-list { list-style: none; margin: 0; padding: 0; }
.al-row { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; margin: 0; border-top: 1px solid var(--line);
          color: var(--ink); cursor: pointer; font-size: 1rem; }
.al-list li:first-child .al-row { border-top: 0; }
.al-row .txt { flex: 1; min-width: 0; }
.al-row .txt b { display: block; font-weight: 600; }
.al-row .txt small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #d6d3c8; transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
                   background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }
.device-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.device-row p { flex: 1; min-width: 12rem; margin: 0; }
#alerts-page.on { color: var(--ok); border-color: #b6dfc6; }
.limits .row3 label { margin-bottom: .6rem; }

/* ---------------- money (cash drawer, paid out, profit) ---------------- */
.m-seg { margin-bottom: .8rem; width: max-content; }
.m-seg button.on, .pay-by button.on { background: var(--dark); color: var(--on-dark); }
.m-sum .c-line:first-child { border-top: 0; }
.m-sub { color: var(--muted); font-size: .85rem; margin: -.3rem 0 .3rem; }
.m-profit { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink);
            margin-top: .3rem; padding-top: .5rem; }
.m-profit small { font-weight: 700; font-size: 1rem; color: var(--ink); }
.m-profit b { font-size: 1.6rem; color: var(--ok); font-variant-numeric: tabular-nums; }
.m-profit.neg b { color: var(--danger); }
.m-main .c-actions { margin: 0 0 .8rem; }
.m-main .c-big { margin-bottom: 0; }
.m-main .c-big span { display: block; margin-top: .2rem; }
.m-row, .m-bar { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.card h2 + .m-row, .card h2 + .m-bar { border-top: 0; }
.m-ic { font-size: 1.3rem; width: 1.8rem; text-align: center; flex: none; }
.m-txt { flex: 1; min-width: 0; }
.m-txt b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-txt small { display: block; color: var(--muted); font-size: .8rem; }
.m-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-amt.muted { color: var(--muted); font-weight: 400; }
.m-del { border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: .3rem .4rem; }
.m-bar .bar { display: block; height: 6px; border-radius: 3px; background: var(--primary); opacity: .7; margin-top: .3rem; }
.m-missing { border-color: #f0c36b; background: #fffaf0; }
dialog.ask .cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .3rem 0 .7rem; }
dialog.ask .cat { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .5rem .2rem;
                  border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: .78rem;
                  line-height: 1.2; color: var(--ink); cursor: pointer; text-align: center; min-height: 64px; }
dialog.ask .cat .ic { font-size: 1.4rem; }
dialog.ask .cat.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary);
                     background: color-mix(in srgb, var(--primary) 8%, #fff); font-weight: 600; }
dialog.ask .cat.owner { border-style: dashed; }
dialog.ask .pay-by { width: 100%; margin-bottom: .6rem; }
dialog.ask .pay-by button { flex: 1; justify-content: center; padding: .55rem; font-weight: 600; }

/* ---------------- vendor orders ---------------- */
.head-btns { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.btn .count, .o-h .count { display: inline-block; min-width: 1.4em; padding: 0 .4em; margin-left: .3rem; border-radius: 999px;
  background: var(--on-primary); color: var(--primary-text); font-size: .8rem; text-align: center; }
.o-h .count { background: var(--primary); color: var(--on-primary); }
.o-top { display: flex; justify-content: flex-end; margin-bottom: .2rem; }
.o-h { font-size: 1.05rem; margin: 1.2rem 0 .6rem; display: flex; align-items: center; }
.o-card { padding: 1rem; }
.o-card.draft { border-color: var(--primary); }
.o-card.done { padding: .7rem 1rem; }
.o-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .5rem; }
.o-head b { display: block; font-size: 1.05rem; }
.o-head small { display: block; }
.o-line { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.o-lines .o-line:first-child { border-top: 0; }
.o-line .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-line input.qty { width: 5.5rem; text-align: right; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.o-line input.price { width: 5rem; }
.o-line .unit { width: 2.2rem; color: var(--muted); font-size: .9rem; }
.o-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: .3rem; }
.o-add select { width: 100%; margin: .5rem 0; }
.o-card input.plain { width: 100%; margin-bottom: .6rem; }
.o-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.o-list { margin: .2rem 0 .6rem; padding-left: 1.2rem; }
details.vendor { border-top: 1px solid var(--line); padding: .6rem 0; }
details.vendor:first-of-type { border-top: 0; }
details.vendor summary { cursor: pointer; }
details.vendor .form { margin-top: .6rem; }
table.supplies select { max-width: 12rem; }
table.supplies .upto { white-space: nowrap; }
table.supplies .upto input { width: 5rem; }
dialog.ask .o-line { padding: .45rem 0; }

/* ---------------------------------------------------------- v6.0: AI assistant & WhatsApp */
.ai-link + .bell { margin-left: .25rem; }
.card-head { display: flex; align-items: center; gap: .6rem; justify-content: space-between; flex-wrap: wrap; margin-bottom: .4rem; }
.card-head h2 { margin: 0; }
.ask-form { display: flex; gap: .5rem; align-items: flex-end; }
.ask-form textarea { flex: 1; min-height: 2.8rem; resize: vertical; font: inherit; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 10px; }
.ask-ideas { margin-top: .6rem; }
.ask-ideas button { font-size: .85rem; }
.ask-list { display: flex; flex-direction: column; gap: .7rem; margin-top: .4rem; }
.qa { border-top: 1px solid var(--line); padding-top: .7rem; }
.qa .q { font-weight: 700; margin: 0 0 .3rem; color: var(--dark); }
.qa .a, .note-text { white-space: pre-wrap; margin: 0 0 .2rem; line-height: 1.5; }
.qa.thinking .a { animation: ai-pulse 1.2s ease-in-out infinite; }
@keyframes ai-pulse { 50% { opacity: .4; } }
.shop-list { list-style: none; padding: 0; margin: .6rem 0; }
.shop-list li { padding: .5rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .1rem; }
.shop-row { display: flex; justify-content: space-between; gap: .6rem; }
.shop-row .qty { font-weight: 700; white-space: nowrap; }
.cust-phone { display: flex; flex-direction: column; gap: .25rem; margin: .6rem 0 .2rem; font-size: .9rem; }
.cust-phone input { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.wa-form > label, .wa-form details label { display: block; margin: .6rem 0; }
.wa-form h3 { margin: 1rem 0 .2rem; font-size: 1rem; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 10rem; }
.wa-log { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.wa-log li { display: grid; grid-template-columns: 6.5rem 1fr 1fr; gap: .2rem .6rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.wa-log li span:last-child { grid-column: 1 / -1; color: var(--muted); }
.wa-log li.bad span:last-child { color: var(--danger); }
.ai-recipes { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ai-recipes p { margin: 0; }
.chips.ask-ideas { position: static; background: none; margin: .6rem 0 0; padding: 0 0 .3rem; top: auto; z-index: auto; }

/* ---------------------------------------------------------- v6.1: printing */
.pr-choice input[type=radio], .pr-form .al-row input[type=radio] { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--primary); }
.pr-paper { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .4rem 0; }
.pr-paper > span { font-weight: 600; margin-right: .3rem; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; background: #fff; cursor: pointer; }
.seg input:checked + span { background: var(--dark); border-color: var(--dark); color: var(--on-dark); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.pr-form h3 { margin: 1rem 0 .2rem; font-size: 1rem; }
.pr-copies { display: flex; align-items: center; gap: .6rem; margin: .8rem 0; }
.pr-copies select { width: auto; }
.pr-steps { padding-left: 1.2rem; line-height: 1.6; }
.r-edge { display: flex; justify-content: space-between; border-top: 2px solid #000; padding-top: 2px; font-weight: 700; }
.usermenu-box > a.btn { margin-bottom: .4rem; }
.wa-print-note { margin: .4rem 0 .2rem; }
.pr-paper > span { flex-basis: 100%; }

/* ---------------------------------------------------------- v6.2: alerts strip, kitchen, roles */
.alerts-strip { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .55rem 1rem;
  background: #fff4d6; border-bottom: 1px solid #f0d58a; color: #5a4300; font-size: .92rem; }
.alerts-strip span { flex: 1 1 12rem; }
.alerts-strip .linkbtn { color: #5a4300; }
.kitchen-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.kitchen-head .btn.on { background: var(--dark); color: var(--on-dark); }
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.k-card { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem;
  display: flex; flex-direction: column; gap: .4rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.k-card.done { opacity: .75; }
.k-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.k-title { font-size: 1.35rem; color: var(--dark); }
.k-age { font-weight: 700; color: var(--muted); white-space: nowrap; }
.k-age.late { color: var(--danger); }
.k-items { list-style: none; padding: 0; margin: .2rem 0; display: flex; flex-direction: column; gap: .3rem; }
.k-items li { display: flex; gap: .6rem; font-size: 1.15rem; line-height: 1.3; }
.k-qty { min-width: 2.2rem; text-align: right; }
.k-items li.cancel { color: var(--danger); text-decoration: line-through; }
.k-items li.cancel .k-qty { text-decoration: none; min-width: auto; }
.k-note { margin: 0; padding: .35rem .6rem; background: #fff4d6; border-radius: 8px; font-weight: 600; }
.k-btn { margin-top: auto; font-size: 1.15rem; padding: .8rem; }
.k-sub { margin: 1.4rem 0 .6rem; font-size: 1.05rem; color: var(--muted); }
.k-empty { padding: 2rem 0; text-align: center; font-size: 1.1rem; }
.tbl.busy.ready, .tbl.ready { background: #1f7a45; border-color: #1f7a45; color: #fff; }
.tbl.ready small { color: rgba(255,255,255,.85); }
.tbl .ready-tag { display: inline-block; margin-top: .15rem; padding: .05rem .45rem; border-radius: 999px; background: #fff;
  color: #1f7a45; font-size: .6rem; font-weight: 800; white-space: nowrap; }
.kitchen-bar { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; margin: .4rem 0; border-radius: 10px;
  background: #e6f6ec; color: #1f5f3a; font-weight: 600; }
.kitchen-bar span { flex: 1; }
.send-kitchen { width: 100%; margin-top: .5rem; }
.r-token { font-size: 1.6em; font-weight: 800; letter-spacing: .05em; margin: .2rem 0; }

/* credits (plan page) */
.credit-list { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .9rem; }
.credit-list li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: baseline; }
.credit-list small { grid-column: 1 / -1; }
.credit-num { font-weight: 700; color: var(--ok); }
.credit-num.warn { color: #b7791f; }
.credit-num.bad { color: var(--danger); }
.credit-bar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.credit-bar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }

/* sold out today (press and hold a dish) */
.item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.item.sold { background: #f1efe9; border-style: dashed; color: var(--muted); }
.item.sold .nm { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.35); }
.item.sold .pr { color: var(--danger); text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.item.sold .dot { opacity: .4; }
.so-tag { margin-left: .4rem; font-size: .7rem; font-weight: 700; color: var(--danger); text-transform: uppercase; }
.hold-tip { display: block; margin-top: .4rem; font-size: .78rem; }

/* quick notes for the cook */
.knote { margin-top: .15rem; font-size: .85rem; font-weight: 600; color: #8a5a00; }
.note-btn { font-size: .8rem; padding: .1rem 0; }
.note-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .4rem 0 .7rem; }
.note-chips .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .85rem;
  font: inherit; font-size: .95rem; cursor: pointer; color: var(--ink); }
.note-chips .chip.on { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
dialog.ask.note-ask input { font-size: 1rem; text-align: left; margin: 0 0 .4rem; }
dialog.ask textarea { width: 100%; }
dialog.ask textarea { font: inherit; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; }
.k-what { display: flex; flex-direction: column; }
.k-dish-note { display: inline-block; margin-top: .15rem; padding: .05rem .5rem; border-radius: 6px; background: #fff4d6;
  font-size: 1rem; font-weight: 700; color: #7a4f00; }
.k-items li.note-only .k-qty { font-size: .8rem; color: #7a4f00; }

/* GSTIN box: live check + "exactly as on the certificate" */
.gstin-box { display: flex; flex-direction: column; gap: .25rem; }
.gstin-check { font-size: .82rem; }
.gstin-check.ok { color: var(--ok); font-weight: 600; }
.gstin-check.bad { color: var(--danger); font-weight: 600; }
.gstin-confirm { font-size: .88rem; }
.gstin-box { margin-bottom: .4rem; }

/* parcel / packing charge (counter bills) */
.parcel-row label.check { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
.totals .parcel-row input { width: 1.15rem; height: 1.15rem; padding: 0; }
fieldset.parcel-box { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem .8rem; margin: .6rem 0; }
fieldset.parcel-box legend { font-weight: 700; padding: 0 .3rem; }

/* billing without internet */
.offline-strip { margin: 0 0 .6rem; padding: .55rem .8rem; border-radius: 10px; background: #e8f3ec; color: #1d5b36;
  font-weight: 600; font-size: .92rem; }
.offline-strip.off { background: #fff4d6; color: #7a4f00; }
.offline-strip.bad { background: #fde8e6; color: var(--danger); }
.offline-receipt { border: 1px dashed var(--line); border-radius: 8px; padding: .7rem .8rem; margin: .4rem 0 .8rem;
  font-size: .9rem; background: #fff; max-height: 50vh; overflow: auto; }
.offline-receipt .rname { font-weight: 700; text-align: center; font-size: 1.05rem; }
.offline-receipt .rsmall { text-align: center; font-size: .8rem; color: var(--muted); }
.offline-receipt .rtitle { text-align: center; font-weight: 700; margin: .3rem 0; }
.offline-receipt .r { display: flex; justify-content: space-between; gap: .6rem; padding: .1rem 0; }
.offline-receipt .r.top { border-top: 1px dashed var(--line); margin-top: .3rem; padding-top: .3rem; }
.offline-receipt .r.grand { font-weight: 700; font-size: 1.05rem; }
@media print {
  body:has(dialog.offline-bill[open]) > *:not(dialog.offline-bill) { display: none !important; }
  dialog.offline-bill { position: static; border: 0; box-shadow: none; max-width: none; width: 100%; }
  dialog.offline-bill h2, dialog.offline-bill .q, dialog.offline-bill .actions { display: none; }
  dialog.offline-bill .offline-receipt { border: 0; max-height: none; overflow: visible; }
}

/* reports (v6.9) */
.reports-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.reports-head h1 { margin: 0; }
.crumbs { margin: 0 0 .4rem; font-size: .9rem; }
.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li + li { border-top: 1px solid var(--line); }
.report-list a { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .2rem; color: inherit; text-decoration: none; }
.report-list a:active, .report-list a:hover { background: rgba(0,0,0,.03); }
.report-list b { color: var(--primary-text); }
.report-filters.custom .custom-date { display: block; }
.report-card { padding: .4rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.report-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.report-table th, .report-table td { padding: .5rem .55rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.report-table th { background: #f3eadb; font-weight: 700; position: sticky; top: 0; }
.report-table td:first-child, .report-table th:first-child { white-space: normal; min-width: 7rem; }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table tfoot td { font-weight: 700; background: #f8f3ea; border-top: 2px solid var(--dark); }
/* day-end summary */
.dayend { max-width: 30rem; }
.de-head { display: flex; flex-direction: column; align-items: center; gap: .1rem; margin-bottom: .6rem; text-align: center; }
.de-head b { font-size: 1.15rem; }
.de-big { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem .2rem; border-top: 2px solid var(--dark);
  border-bottom: 2px solid var(--dark); margin-bottom: .4rem; }
.de-big b { font-size: 1.6rem; }
.dayend h3 { margin: .9rem 0 .2rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.de-list { display: grid; grid-template-columns: 1fr auto; gap: .25rem .8rem; margin: 0; }
.de-list dt { margin: 0; } .de-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.de-list .bad { color: var(--danger); font-weight: 700; }
@media print {
  .dayend { box-shadow: none; border: 0; max-width: 80mm; margin: 0; padding: 0; font-size: 11px; }
}

/* ---- version 6.9: portions on one tile, popular row, quantity, bills on hold */
.item .sz { display: block; font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.pop-title { color: var(--primary); }
.size-ask h2 { margin-bottom: .6rem; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.size-grid .size { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
                   padding: .8rem .7rem; border: 2px solid var(--line); border-radius: 12px; background: #fff;
                   font: inherit; cursor: pointer; text-align: left; min-height: 64px;
                   -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.size-grid .size b { font-size: 1.05rem; }
.size-grid .size .pr { color: var(--muted); font-weight: 600; font-size: .9rem; }
.size-grid .size.in { border-color: var(--primary); }
.size-grid .size .badge { position: absolute; top: .45rem; right: .45rem; background: var(--primary); color: var(--on-primary);
                          font-weight: 700; }
.size-grid .size.sold { background: #f1efe9; border-style: dashed; color: var(--muted); }
.size-grid .size.sold b { text-decoration: line-through; }
.size-grid .size.sold .pr { color: var(--danger); text-transform: uppercase; font-size: .75rem; }
.qty button.q { min-width: 2.2em; border: 1px dashed var(--line); background: #fff; border-radius: 8px; font: inherit;
                font-weight: 700; padding: .25rem .3rem; cursor: pointer; }
.qty-input { width: 100%; margin: .2rem 0 .4rem; font-size: 1.1rem; text-align: center; }
.held-bar { display: flex; align-items: center; gap: .5rem; overflow-x: auto; padding: .1rem 0 .6rem; white-space: nowrap; }
.held-bar[hidden] { display: none; }
.held-bar > span:last-child { display: flex; gap: .4rem; }
.held-chip { display: inline-flex; flex-direction: column; align-items: flex-start; padding: .35rem .7rem; line-height: 1.2;
             border: 2px dashed var(--primary); background: #fff; border-radius: 10px; font: inherit; cursor: pointer; }
.held-chip span { font-size: .75rem; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.actions #hold { flex: 0 0 auto; }

/* ===================================================================================
   Version 6.10 look: one main colour (the restaurant's theme colour) for actions and
   selected things; calm neutrals for everything else.  Overrides the rules above.
   =================================================================================== */
:root { --ink: #1d2125; --muted: #687076; --primary-soft: color-mix(in srgb, var(--primary) 11%, #fff);
        --shadow-1: 0 1px 2px rgba(16,24,40,.05); --shadow-2: 0 10px 28px rgba(16,24,40,.12); }
h1, h2, legend, .kpi .v, .c-big b, .k-title, .table-bar b, .qa .q, .fontopt .big, .steps li.on,
.subnav a.on, .subnav a:hover, .tabs button, .me-tabs button, .tbl, .nums button { color: var(--ink); }
h1 { letter-spacing: -.01em; }
.card { border-color: #ebe7de; border-radius: 14px; box-shadow: var(--shadow-1); }

/* selected things: a soft tint of the main colour */
.tabs button.on, .seg button.on, .chips button.on, .tabbar button.on, .me-tabs button.on,
.m-seg button.on, .pay-by button.on, .note-chips .chip.on, .seg input:checked + span, .kitchen-head .btn.on,
.pay button.on {
  background: var(--primary-soft); color: var(--primary-text); border-color: var(--primary); }
.chips button, .tabs button { transition: background .15s, border-color .15s; }
.totals .grand, .report-table tfoot td { border-top-color: var(--ink); }
.de-big { border-color: var(--ink); }
.toast { background: var(--ink); color: #fff; }
.steps li.done::before { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chart .bar:hover { fill: var(--primary-dark); }

/* header: the restaurant's logo (or first letter) and name */
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-size: 1rem; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; flex: none; display: flex; align-items: center;
              justify-content: center; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 1rem; }
img.brand-mark { background: #fff; border: 1px solid var(--line); object-fit: contain; padding: 2px; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* alerts off on this phone: a small dot on the bell and the account button (the message is in the menu) */
.bell, .avatar { position: relative; }
.bell.attn::after, .avatar.attn::after { content: ""; position: absolute; top: 5px; right: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--card); }
.avatar.attn::after { top: 0; right: 0; }
.usermenu-box .alerts-strip { display: grid; gap: .45rem; padding: .65rem .7rem; border-radius: 10px; font-size: .86rem;
  background: #fff7e0; color: #5a4300; border: 1px solid #f1dfa6; }

/* billing: dish tiles */
.item { border-color: #ebe7de; border-radius: 14px; box-shadow: var(--shadow-1); padding-left: .95rem;
        transition: transform .08s ease, border-color .15s; }
.item::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
                background: var(--veg); }
.item.is-nonveg::before { background: var(--nonveg); }
.item.sold::before { opacity: .3; }
.item .pr { color: var(--ink); font-weight: 700; }
.item .sz { color: var(--muted); }
.item:active { transform: scale(.97); }
.item.in { background: color-mix(in srgb, var(--primary) 4%, #fff); }
.item.pop { animation: tile-pop .28s ease-out; }
.item.pop .badge { animation: badge-pop .3s ease-out; }
@keyframes tile-pop { 0% { transform: scale(.95); } 60% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes badge-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .item.pop, .item.pop .badge { animation: none; } .item:active { transform: none; } }
.cat-title { letter-spacing: .06em; font-size: .78rem; }

/* billing: the bottom bar is one piece - the bill, then Cash and UPI */
.mobile-bar { background: var(--primary); color: var(--on-primary); border-radius: 16px; gap: 0; overflow: hidden;
              box-shadow: 0 10px 28px rgba(16,24,40,.25); }
.mobile-bar .mb-open { background: transparent; box-shadow: none; border-radius: 0; }
.mb-pay { gap: 0; }
.mb-q { background: transparent; color: var(--on-primary); border: 0; border-left: 1px solid var(--on-primary-soft);
        border-radius: 0; box-shadow: none; min-width: 80px; padding: .4rem .7rem; }
.mb-q small { color: inherit; opacity: .8; }
.mb-q:active, .mobile-bar .mb-open:active { background: rgba(0,0,0,.14); }
.pay button { border-width: 2px; }

/* login */
.login-page { min-height: 100vh;
  background: radial-gradient(1100px 520px at 50% -12%, color-mix(in srgb, var(--primary) 20%, var(--bg)), var(--bg) 70%); }
.login-page main { margin-top: 9vh; }
.login-card { padding: 1.9rem 1.5rem 1.4rem; border: 0; border-radius: 22px; box-shadow: var(--shadow-2); }
.login-head { margin-bottom: 1.3rem; }
.login-head h1 { color: var(--ink); font-size: 1.5rem; margin: 0 0 .15rem; }
.login-head p { margin: 0; }
.login-mark { width: 64px; height: 64px; border-radius: 18px; background: var(--primary); color: var(--on-primary);
              display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800;
              margin-bottom: .8rem; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent); }
.login-logo { display: block; max-width: 140px; max-height: 96px; object-fit: contain; margin: 0 auto .8rem; }
.login-go { padding: .8rem; font-size: 1.05rem; margin-top: .3rem; border-radius: 12px; }

/* the bill (screen and browser printing) */
.r-logo { display: block; max-width: 45%; max-height: 72px; object-fit: contain; margin: 0 auto .45rem; }
@media print { .r-logo { filter: grayscale(1) contrast(1.4); } }

/* Settings: logo */
.logo-row { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 96px; height: 96px; flex: none; border-radius: 16px; border: 1px dashed #d6d0c2; background: #fff;
                display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-preview img { max-width: 84px; max-height: 84px; object-fit: contain; }
.logo-preview span { font-size: 2.4rem; font-weight: 800; color: var(--primary-text); }
.logo-actions { flex: 1 1 16rem; display: grid; gap: .6rem; }
.logo-actions p { margin: 0; }
.logo-actions form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.logo-actions input[type=file] { flex: 1 1 12rem; width: auto; font-size: .9rem; }
.logo-actions .check { margin: 0; flex: 1 1 14rem; }
.danger-link { color: var(--danger); }

/* Dashboard: today's sales on top */
.page-head { flex-wrap: wrap; }
.hero { display: grid; gap: .1rem; padding: 1.1rem 1.25rem; margin-bottom: 1rem; border-radius: 18px; color: var(--on-primary);
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 28%, transparent); }
.hero-k { font-size: .9rem; font-weight: 600; opacity: .85; }
.hero-v { font-size: 2.4rem; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hero-sub { font-size: .9rem; opacity: .95; }
.hero-up, .hero-down { font-weight: 700; white-space: nowrap; }
.item:hover { border-color: color-mix(in srgb, var(--primary) 45%, #fff); }
.csv-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.csv-links summary { list-style: none; font-size: .9rem; }
.csv-links summary::-webkit-details-marker { display: none; }
.csv-links[open] { flex-basis: 100%; }
.csv-links[open] summary { margin-bottom: .3rem; }
.csv-links .btn { margin: 0 .3rem .3rem 0; }
#logo { scroll-margin-top: 72px; }
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent); outline-offset: 1px; }
.seg button span { border: 0; padding: 0; background: none; border-radius: 0; display: inline; }
.me-nogst { margin: 0; font-size: .92rem; color: var(--ink); }
.me-menu-tools .me-nogst input { width: auto; }
.totals .eco-row { font-size: .85rem; color: var(--ok); justify-content: flex-start; }
.powered { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.4rem;
           font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.powered img { width: 16px; height: 16px; }

/* ---- version 6.13: smart stock */
.smart-due, .smart-check { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; padding: .7rem .9rem;
  border-radius: 12px; margin-bottom: .8rem; font-size: .95rem; }
.smart-due { background: color-mix(in srgb, var(--primary) 8%, #fff); border: 1px solid color-mix(in srgb, var(--primary) 30%, #fff); }
.smart-check { background: #fff4e5; border: 1px solid #f3c98b; color: #6b3f00; }
.smart-h { margin: 1.4rem 0 .6rem; }
.smart-card h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.smart-table { margin: .6rem 0; }
.smart-table input[type=checkbox] { width: auto; }
.smart-actions { margin-top: .4rem; }
.smart-actions .btn { flex: 0 1 auto; }
.smart-ings { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .2rem .8rem; border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .8rem; margin: 0 0 .8rem; }
.smart-ings .check { margin: .2rem 0; }
.smart-settings .check input { width: auto; }
.smart-history { list-style: none; padding: .6rem 1rem; }
.smart-history li { padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.smart-history li:last-child { border: 0; }
.waste-why { margin-top: .5rem; flex-wrap: wrap; }
td.bad { color: var(--danger); font-weight: 600; }
.smart-sum { font-size: .9rem; }
.smart-sum td.n { white-space: nowrap; }
.waste-why { border: 0; background: none; gap: .4rem; overflow: visible; }
.waste-why button { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .45rem .9rem; }

/* ---- version 6.14: free WhatsApp bill (tap to send) */
.btn.wa-btn { background: #1d7f4f; border-color: #1d7f4f; color: #fff; }
.btn.wa-btn:hover { background: #166a41; }
.ask .linkbtn.small { display: block; margin-top: .9rem; }

/* ---- version 6.16: tidier pages on phone, tablet and PC */
.nowrap { white-space: nowrap; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: color-mix(in srgb, var(--primary) 4%, transparent); }
tr.void td { color: var(--muted); }
/* floor plan: a title, a clear Takeaway button, tables filling the width */
.floor-head { align-items: center; gap: .6rem; }
.floor-head h1 { margin: 0; flex: 1; }
.floor-head #takeaway { padding: .65rem 1.2rem; font-size: 1rem; }
.plan .tbl b { font-size: 1.35rem; }
.plan .tbl small { font-size: .78rem; }
/* receipt: one row of main actions; cancelling is a quiet link under it */
.receipt-actions.main-actions .btn { min-width: 6.5rem; }
.receipt-cancel { text-align: center; margin: .9rem 0 0; }
.linkbtn.danger-link { color: var(--danger); font-size: .9rem; }
.rate .note-btn { margin-left: .6rem; }
/* settings: a white card's padded parts when the card itself has no padding */
.card.flush .pad { padding-left: 1rem; padding-right: 1rem; }
.card.flush h2.pad { padding-top: 1rem; }
.card.flush div.pad { padding-bottom: 1rem; }
table.supplies td { vertical-align: middle; }
@media screen and (max-width: 600px) {
  .hide-phone { display: none; }
  /* bills: filters in two columns, the list fits without sideways scrolling */
  .bill-filters { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: end; }
  .bill-filters label select, .bill-filters label input { width: 100%; }
  .bill-filters .btn { grid-column: 1 / -1; }
  .bill-filters input.short { width: 100%; }
  table.data td, table.data th { padding: .5rem .35rem; }
  /* dashboard: two figures side by side */
  .kpis { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .kpi { padding: .7rem .8rem; }
  .kpi .v { font-size: 1.35rem; }
  .kpi .d { font-size: .75rem; }
  /* stock: the search box on its own row, buttons under it */
  .stock-bar { flex-wrap: wrap; }
  .stock-bar input { flex: 1 1 100%; }
  .stock-bar .btn { flex: 1 1 0; }
  /* receipt: Print / WhatsApp / New bill stay in reach above the tab bar */
  .receipt-actions.main-actions { position: fixed; left: .75rem; right: .75rem; bottom: calc(var(--nav-h) + .5rem); z-index: 20;
    flex-wrap: nowrap; gap: .5rem; background: var(--card); padding: .5rem; border-radius: 14px; border: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(0,0,0,.12); }
  .receipt-actions.main-actions .btn { flex: 1 1 0; min-width: 0; padding: .7rem .3rem; white-space: nowrap; }
  .receipt-cancel { margin-bottom: 6rem; }
  /* menu editor: more room for the dish name */
  .me-row { grid-template-columns: 30px 1fr 4.2rem 26px; gap: .3rem; padding: .3rem .35rem; }
  .me-row .vegbtn { width: 30px; height: 34px; }
  .me-row input { padding-left: .45rem; padding-right: .45rem; }
  .me-row .xbtn { width: 26px; }
  table.supplies select { max-width: 9rem; }
  table.supplies .upto input { width: 3.6rem; }
  .floor-head #takeaway { padding: .6rem 1rem; }
}

/* ---- version 6.17: kitchen slip (KOT) and "the table wants the bill" */
.kot { font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace; color: #000; background: #fff; padding: .4rem 0; }
.kot hr { border: 0; border-top: 2px dashed #000; margin: .4rem 0; }
.kot-title { font-size: 1.7em; font-weight: 800; text-align: center; letter-spacing: .03em; }
.kot-meta { text-align: center; font-size: .9em; }
.kot-note { font-weight: 700; margin-top: .3rem; }
.kot-line { font-size: 1.25em; font-weight: 700; margin: .25rem 0; }
.kot-line small { display: block; font-size: .75em; font-weight: 600; padding-left: 1em; }
.kot-line.cancel { text-decoration: underline; }
.kot-print { display: none; }
@media print {
  .kot-print { display: block; break-before: page; }
  .kot-only .receipt { display: none !important; }
  .kot-only .kot-print { break-before: auto; }
}
.plan .tbl .bill-tag { display: inline-block; margin-top: .15rem; padding: .05rem .45rem; border-radius: 999px;
  background: #f5a524; color: #3b2600; font-size: .64rem; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.plan .tbl.asked { box-shadow: 0 0 0 3px #f5a524; }
.btn.ask-bill { width: 100%; margin-bottom: .6rem; }
.pr-kitchen small { display: block; }
.print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
@media print { .print-frame { display: none; } }
.pay-choice { border: 1px solid var(--line); border-radius: 10px; padding: .35rem .8rem .5rem; margin: .3rem 0; }
.pay-choice legend { font-size: .85rem; color: var(--muted); padding: 0 .3rem; font-weight: 600; }
.pay-choice .check { margin: .25rem 0; }
.pay-choice input { width: auto; }

/* ---- version 6.18: boxes that open and close (Settings → Restaurant, Printer, Users) */
details.card.fold { padding: 0; margin-bottom: .7rem; overflow: hidden; }
details.fold > summary { list-style: none; display: flex; align-items: center; gap: .8rem; padding: .95rem 1.1rem;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; flex: none; width: .5rem; height: .5rem; margin: 0 .2rem 0 0;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg);
  transition: transform .15s; }
details.fold[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
details.fold > summary:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.fold-t { flex: 0 1 auto; min-width: 0; font-weight: 700; font-size: 1.05rem; color: var(--dark); line-height: 1.3; }
.fold-h { flex: 1 1 0; min-width: 0; color: var(--muted); font-size: .88rem; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-body { border-top: 1px solid var(--line); padding: .9rem 1.1rem 1.1rem; }
.fold-body > fieldset:first-child { margin-top: 0; }
.fold-body .logo-row { margin-top: .1rem; }
details.fold .savebar { margin-top: .4rem; }
/* Users: the password box with a tick button joined to it */
.user-card .user-tools { display: flex; flex-direction: column; align-items: stretch; gap: .6rem; border-top: 1px solid var(--line);
  padding-top: .8rem; margin-top: .8rem; }
.pw-form { margin: 0; }
.pw-label { margin: 0; }
.pw-row { display: flex; margin-top: .3rem; }
.pw-row input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pw-row .pw-ok { flex: none; width: 3rem; padding: 0; font-size: 1.25rem; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.user-toggle { margin: 0; text-align: right; }
.user-toggle .linkbtn { font-size: .9rem; }
.add-login { align-items: flex-end; }
.fold-t:only-child { flex: 1 1 auto; }
.pw-row { max-width: 26rem; }

/* ---- version 6.21: the counter prints for waiters (print station) */
.pj-page + .pj-page { break-before: page; }
.prebill .pb-name { text-align: center; font-weight: 800; font-size: 1.1em; }
.prebill .kot-title { font-size: 1.4em; }
.pb-row { display: flex; justify-content: space-between; gap: .5rem; }
.pb-total { font-weight: 800; font-size: 1.25em; margin-top: .2rem; }
.pb-items { width: 100%; border-collapse: collapse; font-size: .95em; }
.pb-items th { text-align: right; font-weight: 700; border-bottom: 1px solid #000; }
.pb-items th:first-child, .pb-items td:first-child { text-align: left; }
.pb-items td { text-align: right; vertical-align: top; padding: .1rem 0; }
.pb-small { text-align: center; font-size: .85em; }
.pb-qr { text-align: center; }
.pb-qr svg { width: 45mm; height: auto; }
.station-bar { position: fixed; left: .75rem; right: .75rem; top: .6rem; z-index: 60; display: flex; align-items: center;
  gap: .8rem; padding: .8rem 1rem; border-radius: 14px; background: var(--dark); color: var(--on-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 600; }
.station-bar span { flex: 1; min-width: 0; }
.station-bar .btn { flex: none; }
@media print { .station-bar { display: none !important; } }
.plan .tbl .late-tag { display: inline-block; margin-top: .15rem; padding: .05rem .45rem; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .64rem; font-weight: 700; white-space: nowrap; }

/* ---- version 6.22: the saved bill says whether the automatic WhatsApp went */
.wa-status { flex: 0 0 100%; text-align: center; font-weight: 600; font-size: .95rem; margin: 0; }
.receipt-actions.main-actions { flex-wrap: wrap; }
.wa-status.sent { color: #1f7a3d; }
.wa-status.sending { color: var(--muted); }
.wa-status.failed { color: var(--danger); }
.btn.ghost.wa-again { color: #1f7a3d; border-color: #1f7a3d55; }

/* ---- version 6.25: changes to an order the kitchen already has */
.k-card.changed { border: 2px solid #c2410c; box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.k-card.gone { border: 2px dashed var(--danger); }
.k-flag { margin: 0 0 .4rem; align-self: flex-start; font-weight: 800; font-size: .85rem; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; background: #c2410c; border-radius: 6px; padding: .1rem .55rem; }
.k-card.gone .k-flag { background: var(--danger); }
.k-items li.struck { color: var(--danger); }
.k-items li.struck .k-qty, .k-items li.struck .k-name { text-decoration: line-through; }
.k-cut { display: inline-block; margin-left: .4rem; padding: .02rem .45rem; border-radius: 6px; font-size: .8rem;
  font-weight: 700; color: var(--danger); border: 1px solid var(--danger); }
.k-seen { margin-bottom: .4rem; }
.kot-changed { text-align: center; font-weight: 800; font-size: 1.2em; border: 2px solid #000; margin: .3rem 0; padding: .1rem 0; }

/* ---- version 6.26: delete a login permanently */
.user-links { display: flex; justify-content: flex-end; gap: 1.2rem; flex-wrap: wrap; }
.user-links-hint { text-align: right; margin: .2rem 0 0; }

/* ---- version 6.27: the row of dish groups shows there is more, with arrows at its edges
   (.chips-wrap is position: relative near .chips above, so the phone layout can make it sticky) */
.chip-arrow { position: absolute; top: 0; bottom: .5rem; width: 3rem; padding: 0; border: 0; z-index: 2; cursor: pointer;
  display: flex; align-items: center; font: inherit; font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--dark); }
.chip-arrow[hidden] { display: none; }
.chip-arrow.left { left: 0; justify-content: flex-start; padding-left: .15rem;
  background: linear-gradient(to right, var(--bg) 55%, transparent); }
.chip-arrow.right { right: 0; justify-content: flex-end; padding-right: .15rem;
  background: linear-gradient(to left, var(--bg) 55%, transparent); }

/* ---- version 6.28: takeaway parcels ready to hand over (New bill) */
.ready-bar { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; margin: .2rem 0 .6rem;
  border-radius: 10px; background: #e6f6ec; color: #1f5f3a; overflow-x: auto; white-space: nowrap; }
.ready-bar[hidden] { display: none; }
.ready-label { font-weight: 700; }
.ready-list { display: flex; gap: .4rem; }
.ready-chip { border: 1px solid #1f7a3d; background: #fff; color: #1f5f3a; border-radius: 999px; padding: .3rem .8rem;
  font: inherit; font-weight: 700; cursor: pointer; }
.k-handed { margin-top: .3rem; }

/* ---- version 6.29: a table that paid while its food is still coming */
.tbl.paid { border: 2px dashed #1f7a3d; background: #f1faf4; }
.paid-tag { display: inline-block; margin-top: .2rem; padding: .05rem .45rem; border-radius: 6px; font-size: .75rem;
  font-weight: 700; color: #fff; background: #1f7a3d; }
.kitchen-choice { flex-wrap: wrap; }
.kitchen-choice .btn { flex: 1 1 30%; }
.k-flag.paid { background: #1f7a3d; }

/* ---- customer loyalty (version 6.32) */
.cust-info { margin: .35rem 0 .2rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px;
  background: #fbf8f1; display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; }
.cust-info[hidden] { display: none; }
.cust-info .ci-use { align-self: flex-start; }
.cust-info .ci-name { font: inherit; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.cust-info .ci-offers { display: flex; gap: .4rem; align-items: center; margin: 0; }
.cust-info .ci-offers input { width: auto; margin: 0; }
.pts-row b { color: #1d7f4f; }
.r-pts { border-top: 1px dashed currentColor; margin-top: .4rem; padding-top: .3rem; }
.r-pts div { display: flex; justify-content: space-between; gap: .5rem; }
.cust-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .2rem 0 .6rem; }
.cust-tabs a { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .8rem;
  text-decoration: none; color: inherit; font-size: .9rem; }
.cust-tabs a.on { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.cust-search { display: flex; gap: .5rem; margin-bottom: .6rem; }
.cust-search input { flex: 1; min-width: 0; font: inherit; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.cust-table td a { text-decoration: none; }
.cust-rules, .cust-details { display: flex; flex-direction: column; gap: .7rem; }
.cust-rules label, .cust-details label, .cust-adjust label { display: flex; flex-direction: column; gap: .25rem; }
.cust-rules label.check, .cust-details label.check { flex-direction: row; align-items: center; gap: .5rem; }
.cust-rules .check input, .cust-details .check input { width: auto; }
.cust-adjust { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .8rem; }
.cust-adjust label { flex: 1 1 9rem; }
.cust-forget { margin-top: 1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

/* ---- change how a bill was paid, cash put in, drawer below zero (version 6.33) */
.pay-fix { max-width: 420px; margin: .6rem auto 0; text-align: center; }
.pay-fix summary { list-style: none; cursor: pointer; display: inline-block; }
.pay-fix summary::-webkit-details-marker { display: none; }
.pay-fix form { display: flex; flex-direction: column; gap: .6rem; align-items: center; margin-top: .5rem;
  padding: .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pay-fix-modes { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.pay-fix-modes label { margin: 0; }
.pay-fix-modes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pay-fix-modes span { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.pay-fix-modes input:checked + span { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.pay-fix-modes input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.c-warn { margin: .6rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: #fdf0e6; color: #8a3b0c;
  display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.c-added { margin-top: .5rem; display: flex; flex-direction: column; gap: .2rem; }
.c-added .m-row { padding: .25rem 0; }
.c-q-btns { display: flex; flex-direction: column; gap: .5rem; }
.c-q-btns .btn { width: 100%; }

/* ---- vendor dues and stock value (version 6.34) */
.o-dues { display: flex; flex-direction: column; gap: 0; padding: .3rem .9rem; }
.o-due { display: flex; align-items: center; gap: .7rem; padding: .65rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.o-due:first-child { border-top: none; }
.o-due-txt { flex: 1 1 8rem; display: flex; flex-direction: column; min-width: 0; }
.o-due-amt { font-size: 1.1rem; }
.o-due-btns { display: flex; gap: .4rem; }
.o-money { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .4rem; }
.o-money label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.o-ledger { display: flex; flex-direction: column; max-height: 55vh; overflow: auto; }
.o-led { display: flex; justify-content: space-between; gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.o-led:first-child { border-top: none; }
.o-led > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.o-led .n { text-align: right; display: flex; flex-direction: column; white-space: nowrap; }
.o-led .good { color: #1d7f4f; }
.s-val { display: block; font-size: .85rem; }
.s-val .linkbtn { font-size: .85rem; }
.s-row .qty { display: flex; flex-direction: column; align-items: flex-end; }
.s-row .qty .s-val { font-size: .8rem; font-weight: 400; }
.s-price { display: flex; flex-direction: column; gap: .4rem; margin: .2rem 0 .6rem; }
.s-price-row { display: flex; gap: .5rem; align-items: center; }
.s-price-row input { max-width: 9rem; }
.s-sortline { display: flex; justify-content: flex-end; margin: 6px 0 0; }
.s-sortline .btn { white-space: nowrap; }
.tax-history { margin-top: 14px; border-top: 1px solid var(--line, #e5e0d6); padding-top: 10px; }
.tax-history summary { cursor: pointer; font-weight: 600; }
.tax-log { list-style: none; margin: 8px 0 0; padding: 0; }
.tax-log li { padding: 8px 0; border-bottom: 1px solid var(--line, #e5e0d6); }
.tax-log li:last-child { border-bottom: 0; }
/* long lists (version 6.36) */
.ll-hide { display: none !important; }
.ll-more { display: flex; justify-content: center; padding: 8px 0 4px; }
.ll-search { width: 100%; margin: 4px 0 10px; }
.ll-none { padding: 8px 12px; }
.m-rows > .m-row:first-child { border-top: 0; }
/* menu editor: folded categories and dish search (version 6.36) */
.me-find { width: 100%; margin: 0 0 .8rem; }
.me-cat-shut { margin-bottom: .5rem; }
.me-cat-toggle { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .75rem .8rem; border: 0;
  background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.me-cat-name { font-weight: 700; flex: 1; min-width: 0; }
.me-cat-count { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.me-cat-chev { color: var(--muted); font-size: 1.3rem; line-height: 1; }
.me-cat-fold { font-size: 1rem; }
/* recipes: folded categories */
details.rec-cat > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; background: var(--bg); }
details.rec-cat:not([open]) > summary .rec-cat-h { border-bottom: 0; }
details.rec-cat > summary::-webkit-details-marker { display: none; }
details.rec-cat > summary .rec-cat-h { flex: 1; margin: 0; }
details.rec-cat > summary .rec-cat-n { color: var(--muted); font-size: .85rem; white-space: nowrap; padding-right: .9rem; }
details.rec-cat > summary .rec-cat-n.todo { color: var(--primary, #c2410c); }
details.rec-cat > summary::after { content: "›"; color: var(--muted); font-size: 1.3rem; padding-right: .9rem; transition: transform .15s; }
details.rec-cat[open] > summary::after { transform: rotate(90deg); }
.rec-find { width: 100%; margin: 0 0 .8rem; }
.add-vendor > form { padding-top: .4rem; }
.table-wrap > .ll-search { margin: 4px 16px 10px; width: calc(100% - 32px); }
/* network printers (version 6.39) */
.pr-addr { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pr-addr input { width: 100%; }
/* 'Powered by MachMind360' at the end of bills and slips (version 6.40) */
.powered { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 10px 0 2px;
  font-size: 10px; color: #6B726B; letter-spacing: .02em; }
.powered img { width: 10px; height: auto; opacity: .75; }
@media print { .powered { color: #000; } .powered img { opacity: 1; } }
