:root {
  --brand: #0f766e; --brand-2: #14b8a6; --brand-ink: #ffffff; --brand-soft: #e6f6f4;
  --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #ffffff;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --ok-soft: #dcfce7; --warn-soft: #fef3c7; --bad-soft: #fee2e2;
  --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600;
  cursor: pointer; transition: filter .15s, transform .05s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.light { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: .875rem; border-radius: 8px; }
.btn.lg { padding: 14px 26px; font-size: 1.05rem; }
.btn.block { width: 100%; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: #334155; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: var(--brand-2); }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }
.error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: .9rem; }

/* cards & badges */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; text-transform: capitalize; }
.badge.paid, .badge.active { background: var(--ok-soft); color: var(--ok); }
.badge.partial, .badge.trial { background: var(--warn-soft); color: var(--warn); }
.badge.unpaid, .badge.cancelled, .badge.expired { background: var(--bad-soft); color: var(--bad); }

/* ---------------- landing ---------------- */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; font-size: .95rem; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.hero { padding: 72px 0 56px; background: radial-gradient(1000px 400px at 80% -10%, #ccfbf1 0, transparent 60%), linear-gradient(#fff, var(--bg)); }
.hero .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.02em; }
.hero h1 span { color: var(--brand); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; }
.hero-note { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.mock { background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(15,118,110,.18); border: 1px solid var(--line); padding: 18px; }
.mock-head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; }
.mock-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.mock-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.2rem; padding-top: 12px; color: var(--brand); }
section.block { padding: 64px 0; }
section.block h2 { font-size: 2rem; text-align: center; }
section.block .sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 36px; }
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.type-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.type-card .ico { font-size: 2rem; }
.type-card b { display: block; margin-top: 6px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature h3 { font-size: 1.05rem; margin-top: 10px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.feature .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.3rem; }
.toggle { display: inline-flex; background: #e2e8f0; border-radius: 99px; padding: 4px; margin: 0 auto 28px; }
.toggle button { border: 0; background: transparent; padding: 8px 18px; border-radius: 99px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted); }
.toggle button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.center { text-align: center; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 920px; margin: 0 auto; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); }
.plan .tag { position: absolute; top: -12px; right: 18px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.plan .price { font-size: 2.3rem; font-weight: 800; margin: 8px 0 0; }
.plan .price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; color: var(--muted); }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--muted); margin: 10px 0 0; }
.cta { background: linear-gradient(135deg, var(--brand), #115e59); color: #fff; border-radius: 20px; padding: 48px 24px; text-align: center; }
.cta .btn { background: #fff; color: var(--brand); }
footer.site { padding: 32px 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 64px; }

/* ---------------- auth pages ---------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background: radial-gradient(900px 400px at 10% -10%, #ccfbf1 0, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 560px; }
.auth-card.narrow { max-width: 420px; }
.auth-card .logo { justify-content: center; margin-bottom: 18px; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--brand); }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.type-pick label { margin: 0; border: 2px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; cursor: pointer; font-weight: 600; background: #fff; }
.type-pick label .ico { display: block; font-size: 1.6rem; margin-bottom: 4px; }
.type-pick input { position: absolute; opacity: 0; pointer-events: none; }
.type-pick input:checked + label { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.type-pick input:focus-visible + label { outline: 2px solid var(--brand-2); }

/* ---------------- app shell ---------------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: #0b3b38; color: #cde9e5; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side .logo { color: #fff; padding: 0 8px 18px; }
.side nav a { display: flex; align-items: center; gap: 10px; color: #cde9e5; padding: 10px 12px; border-radius: 10px; font-weight: 500; margin-bottom: 2px; }
.side nav a:hover { background: rgba(255,255,255,.07); }
.side nav a.on { background: rgba(20,184,166,.22); color: #fff; }
.side nav a .lock { margin-left: auto; font-size: .75rem; opacity: .7; }
.side .biz { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.side .biz b { color: #fff; display: block; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 1.25rem; margin: 0; }
.menu-btn { display: none; }
.view { padding: 24px; }
.banner { padding: 10px 24px; font-size: .9rem; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner.warn { background: var(--warn-soft); color: #92400e; }
.banner.bad { background: var(--bad-soft); color: #991b1b; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi .label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.kpi .value { font-size: 1.6rem; font-weight: 800; margin-top: 4px; }
.kpi .hint { color: var(--muted); font-size: .8rem; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.card h3 { font-size: 1rem; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; background: #f8fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f8fafc; }
.empty { text-align: center; color: var(--muted); padding: 32px 10px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 46px; background: linear-gradient(var(--brand-2), var(--brand)); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .bar span { font-size: .72rem; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.bars .bar em { font-style: normal; font-size: .7rem; color: var(--ink); margin-bottom: 4px; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 200px; }

/* POS */
.pos { display: grid; grid-template-columns: 1fr 400px; gap: 20px; align-items: start; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; cursor: pointer; font: inherit; font-size: .875rem; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pitem { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; font: inherit; transition: border-color .15s, box-shadow .15s; }
.pitem:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.pitem b { display: block; font-size: .92rem; }
.pitem .p { color: var(--brand); font-weight: 700; margin-top: 4px; }
.pitem .s { font-size: .75rem; color: var(--muted); }
.pitem .s.low { color: var(--bad); }
.cart { position: sticky; top: 84px; }
.cart-items { max-height: 340px; overflow-y: auto; margin: 0 -8px; }
.cline { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); }
.cline .n { font-weight: 600; font-size: .9rem; }
.cline .u { font-size: .78rem; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; }
.qty input { width: 58px; text-align: center; padding: 4px; }
.totals { margin-top: 12px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { font-size: 1.35rem; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.modes button { padding: 8px 4px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; }
.modes button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal h2 { font-size: 1.2rem; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); font-size: .92rem; }
.toast.bad { background: var(--bad); }

/* invoice */
.invoice { max-width: 760px; margin: 0 auto; background: #fff; padding: 36px; border: 1px solid var(--line); border-radius: 12px; }
.inv-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 16px; }
.inv-head h2 { font-size: 1.4rem; margin: 0; }
.inv-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 16px; font-size: .92rem; }
.inv-tot { margin-left: auto; width: 280px; margin-top: 12px; }
.inv-tot div { display: flex; justify-content: space-between; padding: 3px 0; }
.inv-tot .grand { font-weight: 800; font-size: 1.15rem; border-top: 2px solid var(--ink); padding-top: 6px; margin-top: 4px; }
.inv-foot { text-align: center; color: var(--muted); margin-top: 28px; font-size: .9rem; }
.stamp { display: inline-block; border: 3px solid var(--bad); color: var(--bad); font-weight: 800; padding: 4px 14px; transform: rotate(-8deg); border-radius: 6px; }

@media print {
  .side, .topbar, .banner, .no-print, .toast { display: none !important; }
  .shell { display: block; }
  .view { padding: 0; }
  .invoice { border: 0; padding: 0; max-width: none; }
  body { background: #fff; }
}

@media (max-width: 960px) {
  .hero .container, .two, .pos { grid-template-columns: 1fr; }
  .cart { position: static; }
  .nav-links { display: none; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-btn { display: inline-flex; }
  .view { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .invoice { padding: 18px; }
  .inv-head, .inv-meta { flex-direction: column; }
  .inv-tot { width: 100%; }
  .toolbar input, .toolbar select { min-width: 0; width: 100%; }
}

/* ---------------- restaurant tables & kitchen tickets ---------------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tcard { text-align: left; font: inherit; cursor: pointer; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 96px; color: var(--ink); }
.tcard b { font-size: 1.1rem; }
.tcard.busy { border-color: var(--warn); background: var(--warn-soft); }
.tcard .amt { font-weight: 800; color: var(--brand); margin-top: 4px; }
.tcard .pend { color: var(--bad); font-weight: 700; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); vertical-align: middle; }
.dot.busy { background: var(--warn-soft); border-color: var(--warn); }
.kot-round { border-bottom: 1px dashed var(--line); padding: 6px 0; }
.cline.void .n, .cline.void .num { text-decoration: line-through; color: var(--muted); }
.pend-box { background: var(--brand-soft); border-radius: 10px; padding: 8px 10px; margin-top: 10px; }
button.link { background: none; border: 0; padding: 0 4px; color: var(--brand); font: inherit; font-size: .8rem; cursor: pointer; text-decoration: underline; }
#printSlip { display: none; }
.slip { width: 72mm; font-family: "Courier New", monospace; font-size: 13px; color: #000; }
.slip-h { font-weight: 800; text-align: center; font-size: 15px; }
.slip-big { font-weight: 800; text-align: center; font-size: 22px; margin: 4px 0; }
.slip table { width: 100%; border-collapse: collapse; }
.slip td { padding: 2px 0; vertical-align: top; border: 0; }
.slip td.q { width: 34px; font-weight: 800; font-size: 15px; }
.slip td.r { text-align: right; white-space: nowrap; }
.slip hr { border: 0; border-top: 1px dashed #000; }
@media print {
  body.printing-slip > *:not(#printSlip) { display: none !important; }
  body.printing-slip #printSlip { display: block; }
  @page { margin: 4mm; }
}

/* ---------------- Phase 1: payments, shifts, documents, labels ---------------- */
.modes.modes5 { grid-template-columns: repeat(5, 1fr); }
.badge.returned { background: #e0e7ff; color: #4338ca; }
.badge.open { background: var(--warn-soft); color: var(--warn); }
.shift-tbl td { padding: 6px 4px; }
.shift-tbl tr.hl td { background: var(--brand-soft); font-size: 1.02rem; }
.inv-bc { width: 60mm; max-width: 60%; margin: 10px auto 0; }
.inv-bc svg, .rbc svg { width: 100%; height: 14mm; display: block; }
.lprev { background: #f1f5f9; border-radius: 10px; padding: 14px; margin-bottom: 8px; overflow: auto; }
.lprev-in { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.lcopies { max-height: 160px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.lcopies .row { padding: 3px 0; flex-wrap: nowrap; }
/* print-only documents */
.paper { color: #000; font-family: "Courier New", monospace; font-size: 12.5px; line-height: 1.3; }
.paper.t112 { width: 104mm; } .paper.t80 { width: 72mm; } .paper.t76 { width: 68mm; } .paper.t58 { width: 48mm; font-size: 10.5px; }
.paper.a5 { width: auto; font-size: 16px; }
.paper .slip { width: auto; }
.rcpt .c { text-align: center; } .rcpt .b { font-weight: 800; } .rcpt .big { font-size: 1.25em; }
.rcpt .rr { display: flex; justify-content: space-between; gap: 6px; }
.rcpt .rr span:last-child { text-align: right; white-space: nowrap; }
.rcpt hr { border: 0; border-top: 1px dashed #000; margin: 5px 0; }
.rcpt .rbc { margin: 6px auto 0; width: 90%; }
.rcpt table { width: 100%; border-collapse: collapse; } .rcpt td { padding: 1px 0; border: 0; }
.sheet .invoice { border: 0; padding: 0; max-width: none; box-shadow: none; }
.sheet.a5 { font-size: 12px; }
.label { box-sizing: border-box; overflow: hidden; padding: 1.2mm 1.6mm; display: flex; flex-direction: column; justify-content: center; text-align: center; color: #000; font-family: Arial, sans-serif; line-height: 1.15; }
.label .l-shop { font-size: .75em; font-weight: 700; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.label .l-name { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.label .l-name span { font-weight: 400; }
.label .l-price { font-weight: 800; font-size: 1.35em; } .label .l-price small { font-size: .6em; font-weight: 400; }
.label .l-meta { font-size: .72em; } .label .l-instr { font-size: .85em; font-weight: 700; border-top: .2mm solid #000; margin-top: .6mm; padding-top: .4mm; }
.label .l-bc { flex: 1 1 auto; min-height: 0; max-height: 45%; } .label .l-bc svg { width: 100%; height: 100%; display: block; }
.lroll .label { page-break-after: always; break-after: page; }
.lsheet { display: grid; width: 210mm; height: 297mm; box-sizing: border-box; page-break-after: always; break-after: page; }
.lsheet .label { width: auto !important; height: auto !important; }
@media print {
  #printSlip .invoice { max-width: none; }
}
.paper.t58 .rr { flex-wrap: wrap; }
.paper.t58 .rr span:last-child { margin-left: auto; }

/* ---------------- print preview, test page, label templates ---------------- */
.pv-cap { margin-bottom: 6px; }
.pv-frame { background: #cbd5e1; border-radius: 10px; padding: 8px; overflow-x: hidden; overflow-y: auto; }
.pv-scale { transform-origin: top left; }
.pv-page { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); box-sizing: border-box; }
.pv-labels .lroll { display: flex; flex-wrap: wrap; gap: 4mm; }
.pv-labels .label, .pv-page .label { background: #fff; outline: .3mm dashed #94a3b8; }
.paper.a4, .paper.letter { font-size: 15px; }
.testpage { color: #000; font-family: Arial, sans-serif; font-size: 11px; }
.testpage .tp-box { border: .4mm dashed #000; padding: 2mm; margin-bottom: 2mm; }
.testpage .c { text-align: center; } .testpage .b { font-weight: 800; } .testpage .big { font-size: 1.5em; }
.testpage .tp-bc { margin: 3mm 0; } .testpage .tp-bc svg { width: 100%; max-width: 70mm; height: 15mm; display: block; }
.testpage .tp-chars { word-break: break-all; }
.paper.t58 .testpage { font-size: 9.5px; }
.label.test-label { outline: .3mm solid #000; justify-content: space-between; }
.lfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; margin: 4px 0 12px; font-size: .9rem; }
.label .l-small { font-size: .6em; line-height: 1.1; }
.label .l-count { font-size: .8em; }
.label .l-tag { font-size: 1.6em; font-weight: 800; letter-spacing: .02em; }
.label .l-from { font-size: .62em; text-align: left; border-bottom: .3mm solid #000; padding-bottom: 1mm; margin-bottom: 1mm; }
.label .l-to { text-align: left; font-size: 1.25em; } .label .l-to small { display: block; font-size: .5em; font-weight: 700; }
.label .l-addr { text-align: left; font-size: 1em; }
.label.lt-shipping { justify-content: flex-start; gap: 1.5mm; padding: 3mm; }
.label.lt-shipping .l-meta { text-align: left; }
.label.lt-shipping .l-bc { max-height: 22%; flex: 0 0 auto; height: 22%; }
/* A5: same invoice, tighter so a normal bill fits one page */
.sheet.a5 .invoice { font-size: 11px; }
.sheet.a5 .inv-head { padding-bottom: 6px; margin-bottom: 6px; } .sheet.a5 .inv-head h2 { font-size: 15px; }
.sheet.a5 .inv-meta { margin-bottom: 6px; font-size: 11px; }
.sheet.a5 table th, .sheet.a5 table td { padding: 3px 4px; font-size: 11px; }
.sheet.a5 .inv-tot { width: 220px; margin-top: 4px; } .sheet.a5 .inv-tot div { padding: 1px 0; } .sheet.a5 .inv-tot .grand { font-size: 13px; }
.sheet.a5 .inv-foot { margin-top: 10px; font-size: 10px; } .sheet.a5 .inv-bc svg { height: 10mm; }
/* fitted labels: text takes its lines, the barcode fills the rest */
.label.has-bc .l-bc { flex: 1 1 0; min-height: 4mm; max-height: none; }
.label.lt-shipping { justify-content: space-between; gap: .8mm; }
.label.lt-shipping .l-bc { flex: 1 1 0; height: auto; max-height: 38%; }
.label .l-name { line-height: 1.1; }
/* barcode = bars (stretch to the box) + readable digits as text */
.bcw { display: flex; flex-direction: column; width: 100%; height: 100%; }
.bcw svg.bc { flex: 1 1 auto; min-height: 0; width: 100%; display: block; }
.bct { font-family: "Courier New", monospace; font-weight: 700; text-align: center; letter-spacing: .08em; font-size: 10px; line-height: 1.15; }
.inv-bc .bcw svg, .rbc .bcw svg { height: 14mm; flex: none; }
.tp-bc .bcw { max-width: 70mm; } .tp-bc .bcw svg { height: 15mm; flex: none; }
.label .bct { font-size: .8em; }
.label .l-bc { width: 100%; max-width: 55mm; align-self: center; }
.label.has-bc .l-bc { max-height: 28mm; }
.label.lt-shipping .l-bc { max-width: 75mm; max-height: 30mm; }
.label.test-label .l-bc { max-width: 55mm; height: 60%; align-self: center; }
.label .l-bc .bcw svg.bc { height: 0; flex: 1 1 0; }
.label.test-label .l-bc { max-height: 25mm; }
