/* Madhuram cloud – light blue theme (same look as the shop PC version). */
:root {
  --brand: #1f56c8; --brand-2: #2f6fed; --soft: #e8f0fe; --paper: #eef2f8; --ink: #1c2433; --muted: #6b7689; --line: #e3e8f0;
  --ok: #16a34a; --warn: #b45309; --danger: #dc2626; --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 38, 82, .05), 0 4px 14px rgba(16, 38, 82, .06);
  font-family: "Segoe UI", "Nirmala UI", "Noto Sans Tamil", "Latha", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15.5px; }
a { color: var(--brand); }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 18px 0 8px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.r, td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.ta { font-family: "Nirmala UI", "Noto Sans Tamil", "Latha", sans-serif; }
.ok { color: var(--ok); } .bad { color: var(--danger); } .warn { color: var(--warn); }
kbd { background: #e9eef7; border: 1px solid #d6deea; border-radius: 5px; padding: 0 5px; font-size: .75em; color: #3b4658; }

button, .btn { font: inherit; border: 1px solid #b9cdf7; background: #fff; color: var(--brand); border-radius: 10px; padding: 8px 14px;
  cursor: pointer; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
button:hover, .btn:hover { background: var(--soft); }
button.primary, .btn.primary { background: var(--brand-2); color: #fff; border-color: var(--brand-2); box-shadow: 0 2px 6px rgba(47, 111, 237, .25); }
button.primary:hover { background: var(--brand); }
button.danger { color: var(--danger); border-color: #f3c4c4; }
button.big { padding: 14px 18px; font-size: 1.05rem; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; border: 1px solid #d6deea; border-radius: 10px; padding: 8px 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 111, 237, .18); }
:focus-visible { outline: 3px solid rgba(47, 111, 237, .55); outline-offset: 2px; }
label { display: block; font-size: .88rem; color: #3b4658; margin: 8px 0 4px; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat .v { font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .86rem; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; background: #f7f9fc; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--soft); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .78rem; background: var(--soft); color: var(--brand); }
.pill.off { background: #f1f3f6; color: var(--muted); } .pill.bad { background: #fde8e8; color: var(--danger); }
.notice { background: #fff8e6; border: 1px solid #f6d58b; color: #7a4d00; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.error { background: #fde8e8; border: 1px solid #f3c4c4; color: #9b1c1c; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }

/* app frame */
.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side img { width: 100%; max-width: 170px; display: block; margin: 0 auto 4px; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 10px; color: #3b4658; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--soft); color: var(--brand); }
.nav a.active { background: var(--brand-2); color: #fff; box-shadow: 0 3px 10px rgba(47, 111, 237, .3); }
.side .who { margin-top: auto; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.main { padding: 16px 20px 40px; min-width: 0; }
.topbar { display: none; }
.install-btn { display: none !important; } .install-btn.show { display: inline-flex !important; }

/* login */
.login { max-width: 400px; margin: 7vh auto; }
.login img { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 auto 14px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #1c2433; color: #fff; padding: 10px 18px;
  border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; max-width: 90vw; }
#toast.show { opacity: .95; } #toast.bad { background: var(--danger); }

/* dialogs */
dialog { border: none; border-radius: 16px; box-shadow: 0 20px 60px rgba(16, 38, 82, .3); padding: 18px 20px; width: min(520px, 94vw); }
dialog::backdrop { background: rgba(28, 36, 51, .45); }
dialog h3 { margin: 0 0 10px; }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

/* billing */
.pos { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 14px; height: calc(100vh - 32px); }
.pos-left, .pos-right { display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.pos-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.counter-btn { font-weight: 600; font-size: .8rem; padding: 4px 10px; min-height: 30px; }
.held-strip { flex: 1 1 200px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-width: 0; }
.hchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; min-height: 30px; border-radius: 16px; font-size: .85rem;
  background: #fff7e6; border: 1px solid #f3c56b; max-width: 220px; }
.hchip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.hnum { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: #1f2a44; color: #fff; font-weight: 700;
  font-size: .78rem; margin-right: 6px; }
.hchip .hnum { margin-right: 0; }
.held-pick div[data-i] { align-items: flex-start; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pay-head h3 { margin: 0; }
.pay-cust { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.pay-cust .ico { width: 16px; height: 16px; }
.scan { font-size: 1.25rem; padding: 12px 14px; border: 2px solid var(--brand-2); }
.results { background: #fff; border-radius: 12px; border: 1px solid var(--line); overflow: auto; max-height: 40vh; }
.results div { padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.results div.sel, .results div:hover { background: var(--soft); }
.cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cats button { padding: 5px 10px; font-size: .86rem; }
.cats button.on { background: var(--brand-2); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); grid-auto-rows: max-content; gap: 8px; overflow: auto; flex: 1; align-content: start; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px; text-align: left; display: block; color: var(--ink); min-height: 74px; }
.tile:hover { border-color: var(--brand-2); background: #fff; }
.tile b { display: block; font-size: .9rem; line-height: 1.2; }
.tile .p { color: var(--brand); font-weight: 700; margin-top: 4px; display: block; }
.tile .s { color: var(--muted); font-size: .75rem; }
.bill { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; flex: 1; min-height: 0; }
.bill-lines { flex: 1; overflow: auto; }
.bill-lines table td { padding: 7px 8px; }
.bill-lines tr.sel td { background: var(--soft); }
.bill-lines .nm { font-weight: 600; }
.bill-lines .sub { font-size: .78rem; color: var(--muted); }
.bill-total { border-top: 2px solid var(--line); padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; }
.bill-total .t { font-size: 2.1rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.keys { font-size: .78rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.cust { font-size: .9rem; }
.empty-bill { text-align: center; color: var(--muted); padding: 40px 10px; }
.change { font-size: 1.6rem; font-weight: 800; color: var(--ok); }

/* receipt: only this prints */
#print-area { display: none; }
@media print {
  @page { margin: 0; }
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; left: 0; top: 0; }
}
.receipt { width: 72mm; padding: 2mm 3mm; font: 12px/1.3 "Segoe UI", "Nirmala UI", Arial, sans-serif; color: #000; }
.receipt.w58 { width: 50mm; font-size: 11px; }
.receipt .c { text-align: center; }
.receipt h2 { font-size: 15px; margin: 0; }
.receipt table { width: 100%; background: none; }
.receipt td, .receipt th { padding: 1px 0; border: none; font-size: inherit; background: none; color: #000; }
.receipt hr { border: none; border-top: 1px dashed #000; margin: 4px 0; }
.receipt .tot { font-size: 16px; font-weight: 800; }
/* the shop's bill: the same lines, columns and words as its printed bills (MU/1126/T2/107) */
.receipt.rb { font: 12px/1.32 Arial, "Helvetica Neue", Helvetica, "Nirmala UI", sans-serif; }
.rb .rb-hd { text-align: center; }
.rb .rb-name { font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.rb .rb-b { font-weight: 700; font-size: 12.5px; }
.rb .rb-rule { border-top: 1px solid #000; margin: 5px 0; }
.rb .rb-short { border-top: 1px solid #000; margin: 4px 0 4px auto; width: 38%; }
.rb table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rb td, .rb th { padding: 1px 0; text-align: right; font-weight: 400; white-space: nowrap; overflow: hidden; text-transform: none; letter-spacing: 0;
  font-size: inherit; color: #000; background: none; border: none; position: static; }
.rb .rb-hd .rb-ph { white-space: nowrap; font-size: 11px; }
.rb .l { text-align: left; }
.rb .c { text-align: center; }
.rb .rb-t tr.nm td { white-space: normal; padding-top: 4px; }
.rb .rb-tt td, .rb .rb-t thead th.l, .rb .rb-g th, .rb .rb-g td { overflow: visible; }
.rb col.k1 { width: 7%; } .rb col.k2 { width: 18%; } .rb col.k3 { width: 14%; } .rb col.k4 { width: 22%; } .rb col.k5 { width: 18%; } .rb col.k6 { width: 21%; }
.rb .rb-net { display: flex; justify-content: flex-end; gap: 14px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.rb .rb-net span:first-child { margin-right: auto; padding-left: 39%; }
.rb .rb-words { white-space: pre-wrap; margin: 4px 0 8px; }
.rb .rb-g th { padding: 0 0 2px; }
.rb .rb-g th span { display: block; border-bottom: 1px solid #000; margin: 0 2px 2px; padding-bottom: 1px; }
.rb .rb-g th.l span { margin-left: 0; }
.rb .rb-g th:last-child span { margin-right: 0; }
.rb .rb-pts { margin-top: 4px; text-align: center; }
.rb .rb-foot { text-align: center; margin-top: 10px; font-size: 12.5px; }
.rb .rb-no { text-align: center; font-size: 17px; margin-top: 2px; letter-spacing: .02em; }
.receipt.rb.w58 { font-size: 10.5px; }
.rb.w58 .rb-t { font-size: 9.5px; }
.rb.w58 .rb-t th { font-size: 8.5px; padding-left: 3px; overflow: visible; }
.rb.w58 col.k1 { width: 6%; } .rb.w58 col.k2 { width: 21%; } .rb.w58 col.k3 { width: 16%; } .rb.w58 col.k4 { width: 16%; } .rb.w58 col.k5 { width: 19%; } .rb.w58 col.k6 { width: 22%; }
.rb.w58 .rb-net span:first-child { padding-left: 0; }
.rb.w58 .rb-name { font-size: 12.5px; }
.rb.w58 .rb-net { font-size: 13px; }
.rb.w58 .rb-no { font-size: 14px; }
.rb.w58 .rb-hd .rb-ph { white-space: normal; font-size: inherit; }

/* phones and small screens */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 240px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .topbar b { flex: 1; }
  .main { padding: 12px; }
  .pos { grid-template-columns: 1fr; height: auto; }
  .tiles { max-height: 46vh; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}

/* ---------- round 3 ---------- */
dialog.wide { width: min(560px, 96vw); }
.preview { display: flex; justify-content: center; background: #f7f9fc; border-radius: 10px; padding: 8px; max-height: 60vh; overflow: auto; margin: 10px 0; }
.preview .receipt { background: #fff; box-shadow: var(--shadow); }
.openbox { display: flex; flex-direction: column; gap: 4px; background: #fff8e6; border: 1px solid #f6d58b; border-radius: 10px; padding: 8px 10px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.bad-dot { background: var(--danger); box-shadow: 0 0 0 3px #fde8e8; } .ok-dot { background: var(--ok); }
.btn.badbtn { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.okbtn { background: var(--ok); color: #fff; border-color: var(--ok); }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { background: var(--soft); color: var(--brand); border-radius: 99px; padding: 3px 4px 3px 10px; font-size: .88rem; }
.chip button { padding: 0 7px; border: none; background: transparent; color: var(--danger); font-weight: 700; }
tr.struck td:first-child, tr.struck td:nth-child(2), tr.struck td:nth-child(3) { text-decoration: line-through; color: var(--muted); }
input.price-in.changed { border: 2px solid var(--danger); background: #fde8e8; }
input.price-in.saved { border: 2px solid var(--ok); background: #e7f7ec; }
.periods { margin: 6px 0 12px; } .periods .btn { padding: 6px 12px; font-size: .9rem; }
.card.plain { line-height: 1.6; }
.stat.big1 .v { font-size: 1.9rem; color: var(--brand); }
.tablewrap { overflow-x: auto; }
.barrow { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin: 4px 0; }
.barrow .bl { width: 90px; flex: none; color: var(--muted); }
.barrow .bb { flex: 1; background: var(--soft); border-radius: 6px; height: 16px; overflow: hidden; }
.barrow .bb span { display: block; height: 16px; background: var(--brand-2); border-radius: 6px; }
.barrow .bv { width: 150px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.tile .s.warn, .results .warn { color: var(--warn); }
.cats button.on, .cats .btn.primary { background: var(--brand-2); color: #fff; }
/* price board: big cards to pick */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.board { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: #fff; border: 2px solid var(--line);
  border-radius: 14px; padding: 14px 8px; min-height: 150px; color: var(--ink); }
.board.on { border-color: var(--brand-2); background: var(--soft); box-shadow: 0 0 0 3px rgba(47, 111, 237, .25); }
.board .bn { font-weight: 700; font-size: 1.05rem; } .board .bt { font-size: .9rem; color: var(--muted); }
.board .bp { font-size: 2rem; font-weight: 900; color: var(--brand); margin-top: auto; } .board .bp small { font-size: .9rem; }
/* price labels printed on the thermal bill printer (one per product) */
.pricelabel { width: 72mm; padding: 4mm 3mm 6mm; text-align: center; font-family: "Segoe UI", "Nirmala UI", Arial, sans-serif; color: #000;
  border-bottom: 1px dashed #000; page-break-after: always; break-after: page; }
.pricelabel .pl-shop { font-size: 12px; } .pricelabel .pl-name { font-size: 22px; font-weight: 800; line-height: 1.15; margin-top: 2mm; }
.pricelabel .pl-ta { font-size: 18px; } .pricelabel .pl-price { font-size: 54px; font-weight: 900; line-height: 1.1; margin-top: 2mm; }
.pricelabel .pl-price span { font-size: 22px; } .pricelabel .pl-mrp { font-size: 14px; } .pricelabel .pl-date { font-size: 11px; margin-top: 2mm; }

/* phones: bigger touch targets, billing in one column with the total always visible */
@media (max-width: 900px) {
  button, .btn { min-height: 42px; }
  .pos-right { order: -1; }
  .bill-lines { max-height: 38vh; }
  .bill-total { position: sticky; bottom: 0; background: #fff; }
  .pay-row { position: sticky; bottom: 0; background: var(--paper); padding: 6px 0; z-index: 5; }
  .keys { display: none; }
  .cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .cats button, .cats .btn { white-space: nowrap; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .cards { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 1.25rem; }
  .barrow .bl { width: 60px; } .barrow .bv { width: 110px; }
  table { font-size: .9rem; } th, td { padding: 7px 6px; }
  dialog { padding: 14px; }
  .boards { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.2rem; }
}

.pill:empty { display: none; }
.pos .cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pos .cats button { white-space: nowrap; flex: none; }
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .pos { grid-template-columns: minmax(0, 1fr); }
  .pos-left, .pos-right, .bill, .main { min-width: 0; max-width: 100%; }
  .pay-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pay-row button { padding: 12px 6px; font-size: .95rem; }
  .pos-right .row button { flex: 1 1 30%; }
  .scan { font-size: 1.05rem; }
  .bill-total .t { font-size: 1.7rem; }
}

.photo-row { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.photo { width: 96px; height: 96px; border-radius: 12px; background: #f1f4f8; display: grid; place-items: center; overflow: hidden; flex: none;
  font-size: .78rem; color: var(--muted); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.thumb.none { display: inline-block; background: #f1f4f8; }
.tile.has-img img { width: 100%; height: 64px; object-fit: contain; display: block; margin-bottom: 4px; }

.pm-card { background: #f7f9fc; border-radius: 14px; padding: 14px; }
code { background: #eef2f8; border-radius: 6px; padding: 1px 5px; font-size: .85em; }

/* ================================================================ professional theme (overrides the earlier soft styles) */
:root { --brand: #1d4fd7; --brand-2: #2563eb; --soft: #eef3fe; --paper: #f4f6f9; --ink: #1b2230; --muted: #667085; --line: #e3e7ee; --radius: 8px;
  --shadow: none; font-family: "Inter", "Segoe UI", "Nirmala UI", "Noto Sans Tamil", Roboto, Arial, sans-serif; }
html, body { font-size: 14.5px; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: middle; }
button .ico, .btn .ico { width: 16px; height: 16px; }
h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1rem; font-weight: 700; }
button, .btn { border-radius: 6px; padding: 7px 12px; border-color: #cfd6e2; color: var(--ink); font-weight: 600; box-shadow: none; }
button:hover, .btn:hover { background: #f1f4f8; }
button.primary, .btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; box-shadow: none; }
button.primary:hover, .btn.primary:hover { background: var(--brand); }
button.danger { color: var(--danger); border-color: #f1c4c4; background: #fff; }
button.big { padding: 11px 16px; font-size: 1rem; }
.icon-btn { padding: 5px 7px; }
input, select, textarea { border-radius: 6px; border-color: #cfd6e2; padding: 7px 10px; }
label { font-size: .82rem; color: #475467; font-weight: 600; }
.card { border-radius: var(--radius); box-shadow: none; border: 1px solid var(--line); }
.stat .l { text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; font-weight: 600; }
.stat .v { font-size: 1.45rem; }
table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th { background: #f7f8fa; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #667085; padding: 8px 10px; }
td { padding: 8px 10px; }
.card table, .receipt table, .preview table, .barrow table { border: none; }
tr.click:hover td { background: #f5f8ff; }
.pill { border-radius: 4px; padding: 1px 7px; font-weight: 600; }
dialog { border-radius: 10px; box-shadow: 0 20px 50px rgba(16, 24, 40, .25); }
.notice { border-radius: 6px; } .error { border-radius: 6px; }
#toast { border-radius: 6px; }

/* sidebar */
@media (min-width: 901px) { .shell { grid-template-columns: 232px minmax(0, 1fr); } }
.side { padding: 0; gap: 0; border-right: 1px solid var(--line); box-shadow: none; }
.side-brand { display: flex; gap: 10px; align-items: center; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.side-brand img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); object-fit: contain; margin: 0; }
.side-brand b { display: block; font-size: .9rem; line-height: 1.2; color: var(--ink); }
.side-brand span { font-size: .72rem; color: var(--muted); }
/* the shop's full logo (wide): sidebar, phone top bar, login */
.side-brand.full { flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 16px 10px; }
.side-brand.full img { width: 100%; max-width: 200px; height: auto; border: 0; border-radius: 0; object-fit: contain; }
.side-brand.full span { padding-left: 2px; }
.tb-logo img { display: block; height: 30px; width: auto; }
.nav { display: block; padding: 6px 8px; flex: 1; overflow-y: auto; }
.nav-h { font-size: .68rem; font-weight: 700; color: #98a2b3; text-transform: uppercase; letter-spacing: .06em; padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: #344054; font-weight: 500; font-size: .9rem; box-shadow: none; }
.nav a .ico { color: #667085; }
.nav a .lbl { flex: 1; }
.nav a:hover { background: #f2f4f7; color: var(--ink); }
.nav a.active { background: var(--soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-2); }
.nav a.active .ico { color: var(--brand-2); }
.badge .count { background: var(--danger); color: #fff; border-radius: 99px; font-size: .68rem; font-weight: 700; padding: 1px 6px; }
.badge .ok .ico { color: var(--ok); width: 16px; height: 16px; }
.side .install-btn { margin: 6px 12px; justify-content: center; }
.who { margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--line); font-size: .8rem; }
.who-n { font-weight: 600; color: var(--ink); } .who-r { color: var(--muted); text-transform: capitalize; margin-bottom: 6px; }
.who a { display: inline-flex; align-items: center; gap: 6px; color: #475467; text-decoration: none; font-weight: 500; }
.who .ver { float: right; color: #98a2b3; font-size: .72rem; margin-top: 3px; }
.topbar button { border: none; padding: 6px; }

/* billing screen */
.scan { border-radius: 6px; border-width: 2px; font-size: 1.15rem; }
.tile { border-radius: 6px; min-height: 70px; }
.tile:hover { border-color: var(--brand-2); }
.cats button { border-radius: 4px; padding: 5px 10px; font-weight: 500; }
.cats button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.bill { border-radius: var(--radius); box-shadow: none; }
.bill-total .t { color: var(--ink); font-size: 2rem; }
.results { border-radius: 6px; }
.results div.sel, .results div:hover { background: #eef3fe; }
.openbox { border-radius: 6px; }
.preview { border-radius: 6px; }
kbd { border-radius: 3px; }

.copy-label { width: 72mm; text-align: center; font: 700 11px Arial, sans-serif; letter-spacing: .1em; border: 1px solid #000; padding: 2px; margin: 0 3mm 2mm; }
.page-break { page-break-after: always; break-after: page; height: 0; }
.label-sheet { display: flex; flex-direction: column; }
.blabel { width: 50mm; height: 25mm; padding: 1mm 2mm; box-sizing: border-box; font-family: Arial, sans-serif; color: #000; overflow: hidden;
  page-break-after: always; break-after: page; display: flex; flex-direction: column; }
.blabel .bl-n { font-size: 8.5px; font-weight: 700; line-height: 1.1; max-height: 2.2em; overflow: hidden; }
.blabel .bl-p { display: flex; justify-content: space-between; align-items: baseline; font-size: 8px; }
.blabel .bl-p b { font-size: 13px; }
.blabel svg { width: 100%; height: 11mm; display: block; margin-top: auto; }
.blabel .bl-c { font-size: 7.5px; text-align: center; letter-spacing: .12em; }
.state { font-size: .72rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.state.running { background: #e6f4ea; color: #157a32; } .state.upcoming { background: #eef3fe; color: #1d4fd7; } .state.ended { background: #f2f4f7; color: #667085; }
.held-lines { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.sb-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.sb-img { width: 168px; height: 84px; border-radius: 8px; background: #f2f4f7; display: grid; place-items: center; overflow: hidden; flex: none; }
.sb-img img { width: 100%; height: 100%; object-fit: cover; }
.sb-f { flex: 1; min-width: 0; }
@media (max-width: 900px) { .sb-row { flex-direction: column; } .sb-img { width: 100%; height: 120px; } }

[hidden] { display: none !important; }

/* online order steps (staff) */
.ostep { list-style: none; display: flex; gap: 0; margin: 4px 0 12px; padding: 0; counter-reset: st; }
.ostep li { flex: 1; position: relative; text-align: center; font-size: .8rem; color: var(--muted, #6b7689); padding-top: 26px; counter-increment: st; }
.ostep li::before { content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%;
  background: #e8ebf0; color: #6b7689; font-weight: 700; font-size: .75rem; line-height: 22px; z-index: 1; }
.ostep li + li::after { content: ""; position: absolute; top: 10px; right: 50%; width: 100%; height: 2px; background: #e8ebf0; }
.ostep li.done { color: inherit; font-weight: 600; } .ostep li.done::before { content: "✓"; background: #1e9b26; color: #fff; } .ostep li.done::after { background: #1e9b26; }

/* moving between screens: the old one stays, dimmed, with a thin bar on top, until the new one is ready */
#main.routing { opacity: .6; pointer-events: none; transition: opacity .15s .15s; }
body.routing::before { content: ''; position: fixed; top: 0; left: 0; z-index: 200; height: 3px; width: 35%; background: var(--brand-2, #2f6fed);
  animation: routebar 1s ease-in-out infinite; }
@keyframes routebar { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { body.routing::before { animation: none; width: 100%; opacity: .5; } }

/* reports: the shop at a glance */
.dash-say { font-size: 1.05rem; line-height: 1.6; margin: 6px 0 14px; max-width: 900px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi b { font-size: 1.5rem; line-height: 1.2; }
.kpi small { color: var(--muted); font-size: .78rem; }
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; min-width: 0; }
.dash-card h2 { margin: 0 0 10px; font-size: 1.05rem; }
.dash-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 900px) { .dash-two { grid-template-columns: minmax(0, 1fr); } }
.vbars { display: grid; grid-template-columns: repeat(var(--n), minmax(14px, 1fr)); align-items: end; gap: 4px; height: 210px; overflow-x: auto; }
.vbars.hours { height: 130px; }
.vb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.vb i { display: block; width: 100%; max-width: 34px; min-height: 2px; background: linear-gradient(#2fbf3a, #1e9b26); border-radius: 6px 6px 2px 2px; }
.vb em { font-style: normal; font-size: .66rem; color: var(--muted); white-space: nowrap; margin-bottom: 2px; }
.vb span { font-size: .7rem; color: var(--ink); text-align: center; line-height: 1.1; margin-top: 3px; }
.vb span small { color: var(--muted); font-size: .62rem; }
.vb:hover i { background: #157a1d; }
@media (max-width: 700px) { .vb em { display: none; } }
.pivot { font-size: .85rem; border-collapse: collapse; }
.pivot th, .pivot td { padding: 5px 7px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pivot td:first-child { position: sticky; left: 0; background: #fff; font-weight: 600; }
.pivot tr.tot td { font-weight: 700; border-top: 2px solid var(--ink); }
.hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 90px; align-items: center; gap: 8px; margin: 6px 0; font-size: .9rem; }
.hbar i { display: block; height: 12px; background: var(--soft, #f2f4f8); border-radius: 6px; overflow: hidden; }
.hbar u { display: block; height: 100%; background: #2f6fed; border-radius: 6px; }
.hbar b { text-align: right; }
/* today's prices */
.tp td { vertical-align: top; }
.tp-in { display: flex; gap: 6px; align-items: center; }
.tp-in input, .tp td > input { width: 96px; }
.tp-in select { width: auto; }
.tp tr.saved input { border-color: #1e9b26; background: #eefaf0; }
input.tpi.changed { border-color: #d9363e; background: #fff4f4; }
.share-card textarea { width: 100%; font: inherit; }
