/* Sangam Diwali Crackers: marigold festive theme shared by the login, phone and owner pages.
   Saffron bar with a marigold garland, warm white pages, magenta for the main action. */
:root {
  --bg: #fffaf2;
  --card: #ffffff;
  --ink: #2c2c2a;
  --muted: #6e6458;
  --line: #f1dfca;
  --accent: #d85a30;        /* saffron: bars, links, focus */
  --accent-soft: #fdebdd;
  --accent-ink: #993c1d;
  --primary: #993556;       /* magenta: Save bill and other main buttons */
  --primary-dark: #72243e;
  --marigold: #ef9f27;
  --marigold-soft: #faeeda;
  --rose: #d4537e;
  --good: #3b6d11;
  --good-soft: #eaf3de;
  --warn: #854f0b;
  --warn-soft: #faeeda;
  --bad: #a32d2d;
  --bad-soft: #fcebeb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(120,60,20,.07), 0 4px 16px rgba(120,60,20,.06);
  --garland:
    radial-gradient(circle at 10px 6px, var(--marigold) 5px, transparent 5.6px) 0 0 / 20px 12px repeat-x,
    radial-gradient(circle at 0 6px, var(--rose) 3px, transparent 3.6px) 0 0 / 20px 12px repeat-x,
    linear-gradient(#8a3a12, #8a3a12) 0 5.5px / 100% 1px no-repeat;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Nirmala UI", "Noto Sans Telugu", "Gautami", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
body { background: var(--bg); }
.garland { height: 12px; background: var(--garland); }
.te { font-family: "Nirmala UI", "Noto Sans Telugu", "Gautami", "Vani", system-ui, sans-serif; }
/* English with Telugu under it, for buttons and headings staff and customers read */
.bi { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.bi .te { font-size: .72em; font-weight: 500; opacity: .9; margin-top: 2px; }
/* Telugu labels only when switched on; the shop's Telugu name always */
html:not(.telugu) span.te:not(.shop-te), html:not(.telugu) div.te:not(.shop-te) { display: none !important; }
.te-toggle { font-family: "Nirmala UI", "Noto Sans Telugu", "Gautami", system-ui, sans-serif; white-space: nowrap; }
.bar .te-toggle.on { background: #fff; color: var(--accent-ink); }
.login-brand .te-toggle { margin-left: auto; align-self: flex-start; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.login-brand .te-toggle.on { background: var(--marigold-soft); color: var(--accent-ink); border-color: var(--marigold); font-weight: 600; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-size: 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.hidden, [hidden] { display: none !important; }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--accent); color: #fff;
  margin-bottom: 12px;
}
.bar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: var(--garland); pointer-events: none; }
.bar .logo { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.bar .title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.bar .title b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .title small { font-size: 12px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .who { font-size: 13px; opacity: .85; }
.bar button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; padding: 6px 10px; cursor: pointer; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 600; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: default; }
a.btn { color: var(--ink); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:not(:disabled):hover { background: var(--primary-dark); }
.btn:not(:disabled):active { transform: scale(.98); }
.btn { transition: background .15s, transform .08s; }
.btn.danger { color: var(--bad); border-color: #efc3c3; }
.btn.big { min-height: 56px; font-size: 18px; }
.btn.wide { width: 100%; }
.btn.slim { min-height: 34px; padding: 0 10px; font-size: 14px; }

/* cards and layout */
.wrap { max-width: 1100px; margin: 0 auto; padding: 14px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 14px 0 8px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.field label { font-size: 13px; color: var(--muted); }
input, select, textarea {
  min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; }

/* chips */
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eee; }
.chip.pending { background: var(--warn-soft); color: var(--warn); }
.chip.locked { background: #e6eefb; color: #1d4ed8; }
.chip.paid { background: var(--good-soft); color: var(--good); }
.chip.cancelled { background: #eee; color: var(--muted); }
.chip.low, .chip.stale { background: var(--bad-soft); color: var(--bad); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--accent-ink); font-weight: 600; background: #fff4e6; position: sticky; top: 0; }
td.num, th.num { text-align: right; }
tr.dim td { color: var(--muted); }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fff6ea; }

/* toast */
#toast {
  /* top of the screen, so it never covers the Save button */
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%);
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 10px;
  background: var(--ink); color: #fff; box-shadow: var(--shadow); z-index: 100;
  white-space: pre-line; font-weight: 500;
  animation: toastIn .22s ease-out;
}
#toast.bad { background: var(--bad); }
#toast.good { background: var(--good); }

/* login */
.login { max-width: 420px; margin: 0 auto; padding: 20px 16px; }
.login h1 { font-size: 22px; margin: 8px 0 4px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.person { padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: center; }
.person b { display: block; font-size: 17px; }
.person span { font-size: 12px; color: var(--muted); }

/* the one login page */
body.login-page { min-height: 100vh; }
.top-garland { position: sticky; top: 0; z-index: 5; height: 18px; background: var(--accent); }
.top-garland::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: var(--garland); }
.login-page .login { max-width: 460px; padding-top: 6vh; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.login-brand img { border-radius: 16px; flex-shrink: 0; animation: glow 2.6s ease-in-out 3; }
.login-brand h1 { margin: 0; font-size: 24px; color: var(--accent-ink); }
.login-brand .te { display: block; font-size: 15px; color: var(--primary); margin-top: 2px; }
.login-page .person { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px 14px; }
.login-page .person:hover { border-color: var(--accent); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 6px; display: grid; place-items: center;
  font-style: normal; font-weight: 700; font-size: 18px; background: #f1efe8; color: #444441;
}
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); transition: background .12s, transform .12s; }
.pin-dots i.on { background: var(--marigold); border-color: var(--marigold); transform: scale(1.15); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { min-height: 62px; font-size: 24px; font-weight: 600; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.keypad button.ok { background: var(--primary); color: #fff; border-color: var(--primary); }
.keypad button:active { transform: scale(.96); background: var(--marigold-soft); }
.keypad button.ok:active { background: var(--primary-dark); }

/* ---------- staff phone ---------- */
.staff { max-width: 640px; margin: 0 auto; padding: 10px 10px 180px; }
body.staff-page { overscroll-behavior-y: contain; }
.search { position: relative; }
.search input { width: 100%; min-height: 52px; font-size: 18px; padding-right: 96px; }
.search .scan { position: absolute; right: 6px; top: 6px; min-height: 40px; }
.suggest { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); margin-top: 6px; overflow: hidden; }
.suggest button {
  display: flex; width: 100%; gap: 10px; align-items: center; text-align: left;
  padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer;
}
.suggest button:last-child { border-bottom: 0; }
.suggest .code { font-weight: 700; }
.suggest .left { font-size: 12px; color: var(--muted); }
.suggest .sug { align-items: flex-start; padding: 10px; }
.suggest .sug.is-out { background: #faf9f6; }
.suggest .sug.is-out .sug-img { opacity: .5; }
.sug-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #f1efe8; }
.sug-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sug-name { font-weight: 600; line-height: 1.25; }
.sug-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); align-items: center; }
.sug-off { background: var(--good-soft); color: var(--good); font-weight: 700; border-radius: 6px; padding: 0 6px; }
.sug-offer { font-size: 12px; color: var(--good); font-weight: 600; }
.sug-combo { font-size: 12px; color: #854f0b; background: var(--warn-soft); border-radius: 6px; padding: 2px 6px; margin-top: 2px; }
.sug-owner { font-size: 12px; color: #1d4ed8; }
.sug-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.sug-price b { font-size: 17px; }
.no-photo { display: inline-block; background: repeating-linear-gradient(45deg, #f1efe8, #f1efe8 6px, #e9e6dc 6px, #e9e6dc 12px); }
.suggest .left.low { color: var(--warn); font-weight: 600; }
.suggest .left.out { color: var(--bad); font-weight: 600; }

.lines { margin-top: 10px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px; background: var(--card); border-radius: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.line .name { font-weight: 600; }
.line .meta { font-size: 13px; color: var(--muted); }
.line .amt { font-weight: 700; text-align: right; align-self: center; }
.line .warn { grid-column: 1 / -1; font-size: 13px; color: var(--bad); font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; }
.stepper input { width: 64px; text-align: center; min-height: 40px; font-weight: 700; }
.stepper .remove { color: var(--bad); font-size: 16px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.line .line-offer { font-size: 13px; color: var(--good); font-weight: 600; margin-top: 2px; }
.offer-box { background: var(--marigold-soft); border: 1px dashed var(--marigold); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.offer-box .gift, .offer-box .offer-line { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.offer-box .hint { font-size: 14px; color: #854f0b; background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; }
.offer-box .note-bad { font-size: 13px; color: var(--bad); }
.tag { display: inline-block; background: var(--good); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.offer-text { color: var(--good); font-weight: 600; }
.customer .offer-row td { color: var(--good); font-weight: 700; }

.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.footer .inner { max-width: 640px; margin: 0 auto; }
.footer .totals { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.footer .total { font-size: 26px; font-weight: 800; }
.footer .actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.footer .actions .btn { padding: 0 8px; white-space: nowrap; font-size: 17px; }

/* customer view: readable from across the counter */
.customer { max-width: 640px; margin: 0 auto; padding: 14px 12px 130px; }
.customer .shop { text-align: center; font-weight: 700; font-size: 20px; margin: 6px 0 14px; color: var(--accent-ink); }
.customer .shop img { width: 56px; height: 56px; border-radius: 14px; display: block; margin: 0 auto 6px; }
.customer .shop .te { display: block; font-size: 15px; color: var(--primary); font-weight: 600; }
.customer table { font-size: 18px; }
.customer td { padding: 10px 6px; }
.customer .grand { font-size: 34px; font-weight: 800; text-align: right; margin-top: 12px; }
.customer .saved { text-align: right; color: var(--good); font-weight: 700; font-size: 18px; }

/* saved: the number staff read out */
.saved-screen { max-width: 520px; margin: 0 auto; padding: 30px 16px 40px; text-align: center; }
.saved-screen .label { font-size: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.saved-screen .no { font-size: 120px; font-weight: 900; line-height: 1; margin: 10px 0; color: var(--primary); position: relative; display: inline-block; animation: pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.saved-screen .amount { font-size: 28px; font-weight: 700; }
.saved-screen .hint { margin: 18px 0 26px; font-size: 18px; }

/* camera scanner */
.scanner { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column; }
.scanner video { flex: 1; width: 100%; object-fit: cover; }
.scanner .frame { position: absolute; left: 10%; right: 10%; top: 35%; height: 22%; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.scanner .close { position: absolute; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); }
/* continuous scanning on the billing phone: camera strip, the bill, the total */
.scanmode { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); }
.scan-strip { position: relative; height: 30vh; min-height: 150px; max-height: 260px; background: #000; overflow: hidden; flex-shrink: 0; }
.scan-strip video { width: 100%; height: 100%; object-fit: cover; }
.scan-strip .frame { position: absolute; left: 12%; right: 12%; top: 22%; bottom: 22%; border: 3px solid #fff; border-radius: 10px; pointer-events: none; }
.scan-strip .laser { position: absolute; left: 14%; right: 14%; top: 50%; height: 2px; background: #ff4d4d; box-shadow: 0 0 6px #ff4d4d; animation: laser 1.4s ease-in-out infinite alternate; }
@keyframes laser { from { top: 28%; } to { top: 70%; } }
.scan-top { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 8px; display: flex; gap: 8px; }
.scan-btn { min-width: 44px; height: 40px; border-radius: 10px; border: 0; background: rgba(0,0,0,.55); color: #fff; font-weight: 700; padding: 0 12px; }
.scan-btn.on { background: #ffd24a; color: #000; }
.scan-status { padding: 8px 14px; font-weight: 600; background: var(--card); border-bottom: 1px solid var(--line); }
.scan-status.good { background: var(--good-soft); color: var(--good); }
.scan-status.bad { background: var(--bad-soft); color: var(--bad); }
.scan-list { flex: 1; overflow-y: auto; padding: 6px 10px; }
.scan-line { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.scan-line .name { font-weight: 600; line-height: 1.25; }
.scan-line .qty { min-width: 28px; text-align: center; font-weight: 700; }
.scan-line .warn { font-size: 12px; color: var(--bad); font-weight: 600; }
.scan-line.new { background: var(--good-soft); animation: scanned .9s ease-out; }
@keyframes scanned { from { background: #9fe0b5; } }
.scan-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -2px 10px rgba(0,0,0,.08); }
.scan-sum { flex: 1; display: flex; flex-direction: column; } .scan-sum span { font-size: 13px; color: var(--muted); } .scan-sum b { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .scan-strip .laser, .scan-line.new { animation: none; } }

/* ---------- owner page: sidebar dashboard ---------- */
body.owner { background: var(--bg); }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px;
}
.brand { position: relative; display: flex; gap: 10px; align-items: center; margin: -16px -12px 22px; padding: 16px 14px 14px; background: var(--accent); color: #fff; }
.brand::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: var(--garland); }
.brand img { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.brand div { min-width: 0; }
.brand b { display: block; font-size: 15px; line-height: 1.2; }
.brand span { font-size: 12px; opacity: .9; }
.side-nav { flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 12px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 10px 4px; }
.side-nav button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: 9px 10px; border-radius: 8px; font-weight: 500; color: var(--ink);
}
.side-nav button:hover { background: #fff4e6; }
.side-nav button.on { background: var(--marigold-soft); color: var(--accent-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--marigold); }
.side-foot { border-top: 1px solid var(--line); padding: 12px 10px 0; display: flex; flex-direction: column; gap: 6px; }
.side-foot a, .linkish { color: var(--muted); font-size: 14px; text-decoration: none; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.side-foot a:hover, .linkish:hover { color: var(--accent); }

.main { padding: 22px 28px 60px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 24px; margin: 0; }
.page-head p { margin: 4px 0 0; font-size: 14px; }
.owner .card { box-shadow: none; border: 1px solid var(--line); padding: 16px; margin-bottom: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .grid2, .grid2 + .card { margin-top: 14px; }
.empty-note { padding: 14px 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 14px 16px; }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.alert .v { color: var(--bad); }
.stat.good .v { color: var(--good); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--marigold-soft); color: var(--accent-ink); font-weight: 700; }

/* charts */
.cols { display: flex; align-items: stretch; gap: 4px; height: 200px; padding-top: 4px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.col-v { font-size: 11px; color: var(--muted); height: 16px; white-space: nowrap; }
.col-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.col-bar { width: 100%; background: #fac775; border-radius: 4px 4px 0 0; transform-origin: bottom; animation: grow .5s ease-out both; }
.col-bar.hot { background: #d85a30; }
.col:hover .col-bar { background: #d85a30; }
.col-l { font-size: 11px; color: var(--muted); height: 18px; padding-top: 4px; white-space: nowrap; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 1.1fr) 2fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: #fbf1e3; border-radius: 5px; overflow: hidden; }
.hbar-fill { height: 100%; background: linear-gradient(90deg, var(--marigold), var(--accent)); border-radius: 5px; transform-origin: left; animation: growX .5s ease-out both; }
.hbar-v { font-weight: 600; }
.warn-card { border-color: #f5c4b3 !important; background: #fffaf7; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* offers */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.offer { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.offer.dim { background: #faf9f6; }
.offer.dim .offer-name, .offer.dim .offer-desc { color: var(--muted); }
.offer-top { display: flex; gap: 10px; align-items: flex-start; }
.offer-name { font-weight: 700; font-size: 16px; }
.offer-desc { font-size: 14px; }
.offer-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.chip.st-live { background: var(--good-soft); color: var(--good); }
.chip.st-later { background: #e6eefb; color: #1d4ed8; }
.chip.st-ended, .chip.st-off { background: #eee; color: var(--muted); }
.chip.free { background: var(--good-soft); color: var(--good); margin-left: 6px; }
.help ol { margin: 0; padding-left: 20px; line-height: 1.7; color: var(--muted); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.type-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.type-card:hover { border-color: var(--accent); background: #fffaf7; }
.type-card b { font-size: 15px; }
.type-card .example { color: var(--accent-ink); }
.picker { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick:last-child { border-bottom: 0; }
.pick input { min-height: 0; }
.wide-input { flex: 1; min-width: 180px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { width: 42px; height: 24px; border-radius: 12px; background: #d3d1c7; position: relative; transition: background .15s; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .slider { background: var(--good); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.applied { margin-top: 12px; }
.applied-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.add-discount { background: #faf8f4 !important; margin-top: 12px; }
.owner th { text-transform: none; letter-spacing: 0; font-size: 13px; }
.owner td > b { white-space: nowrap; }
.thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; display: block; background: #f1efe8; }
.photo { width: 140px; height: 120px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #f1efe8; }
.item-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.photo-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex-shrink: 0; }
.neg { color: var(--bad); font-weight: 700; }
tr.loss td { color: var(--bad); background: var(--bad-soft); }
.proj td.num { white-space: nowrap; }
.try-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; margin: 8px 0; }
.try-company { display: flex; align-items: center; gap: 8px; }
.try-company > span:first-child { min-width: 60px; font-weight: 600; }
.combo-row { margin-bottom: 8px; flex-wrap: nowrap; }
.combo-row select { flex: 1; min-width: 0; }

@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { border: 0; margin: 0; padding: 0 6px 0 0; flex: 1; min-width: 0; }
  .brand span { display: none; }
  .side-nav { order: 3; flex: 0 0 100%; display: flex; overflow-x: auto; gap: 2px; scrollbar-width: none; }
  .nav-group { display: flex; margin: 0; }
  .nav-label { display: none; }
  .side-nav button { white-space: nowrap; width: auto; padding: 8px 10px; }
  .side-foot { border: 0; padding: 0; flex-direction: row; gap: 10px; white-space: nowrap; }
  .side-foot .small { display: none; }
  .main { padding: 16px 12px 40px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .cols { height: 160px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .v { font-size: 19px; }
  .page-head h1 { font-size: 21px; }
}
pre.errors { white-space: pre-wrap; background: var(--bad-soft); color: var(--bad); padding: 10px; border-radius: 8px; font-size: 13px; }
dialog { border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(80,30,10,.3); padding: 0; width: min(720px, 94vw); }
dialog[open] { animation: dialogIn .2s ease-out; }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog .head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--marigold-soft); color: var(--accent-ink); }
dialog .body { padding: 16px; max-height: 70vh; overflow: auto; }

/* ---------- owner page on a phone: saffron brand row with the garland ---------- */
@media (max-width: 860px) {
  .side { padding-top: 0; }
  .brand { margin: 0 -10px 6px; padding: 8px 12px; flex: 0 0 calc(100% + 20px); }
  .brand img { width: 30px; height: 30px; }
  .brand::after { height: 10px; }
  .side-nav { margin-top: 8px; }
}

/* ---------- loading: a flickering diya ---------- */
.loader { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 0; color: var(--accent-ink); font-weight: 500; }
.loader .diya { width: 56px; height: 64px; }
.loader.small { padding: 6px 0; gap: 4px; font-size: 13px; }
.loader.small .diya { width: 30px; height: 34px; }
.diya .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flame .9s ease-in-out infinite; }
.diya { filter: drop-shadow(0 0 0 rgba(239,159,39,0)); animation: glow 1.8s ease-in-out infinite; }

/* pull down to refresh, on the phones */
.ptr { position: fixed; left: 50%; top: -80px; z-index: 30; transform: translateX(-50%); background: var(--card);
  border-radius: 999px; padding: 6px 16px 4px; box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: top .2s ease-out; pointer-events: none; }
.ptr.pulling { transition: none; }
.ptr .loader { padding: 0; }
.ptr:not(.ready):not(.busy) .flame, .ptr:not(.busy) .diya { animation: none; }
.ptr span { font-size: 12px; white-space: nowrap; }

/* page changes: a short fade up, only when the screen changes */
.enter, .main.enter > * { animation: fadeUp .24s ease-out both; }
.people .person { animation: fadeUp .3s ease-out both; animation-delay: calc(var(--i, 0) * 45ms); }
.suggest { animation: fadeUp .15s ease-out both; }

/* bill saved: one short fireworks burst behind the number */
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c);
  opacity: 0; animation: spark 1.1s cubic-bezier(.15,.7,.3,1) var(--d, 0s) forwards; }
.burst i::after { content: ""; position: absolute; left: 3px; top: 8px; width: 2px; height: 18px; border-radius: 1px;
  background: linear-gradient(var(--c), transparent); }

@keyframes flame { 0%, 100% { transform: scale(1, 1) rotate(0); } 30% { transform: scale(.9, 1.1) rotate(-3deg); } 60% { transform: scale(1.06, .94) rotate(3deg); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(239,159,39,0)); } 50% { filter: drop-shadow(0 0 10px rgba(239,159,39,.55)); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); }
  80% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r, 110px) * -1)) scale(.5); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* phones set to 'reduce motion' get none of the above */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .burst { display: none; }
}
.customer .grand-label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.saved-screen .label .bi { align-items: center; }
.footer .actions .btn .bi .te { font-size: 12px; }
.bar button .bi .te { font-size: 10px; }
.side-foot a, .linkish { color: var(--accent-ink); }
/* the saffron logo needs a light ring to show on the saffron bars */
.bar .logo, .brand img { box-shadow: 0 0 0 2px rgba(255, 248, 236, .9); }
.saved-screen { overflow: hidden; }   /* the sparks never widen the page */

/* ---------- payment counter (Phase 2) ---------- */
.counter { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; padding: 6px 14px 30px; max-width: 1200px; margin: 0 auto; }
.queue { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 70vh; overflow-y: auto; }
.qbill { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.qbill.on { border-color: var(--marigold); background: var(--marigold-soft); }
.qno { font-size: 24px; color: var(--primary); min-width: 44px; }
.find { width: 120px; font-size: 18px; }
.to-pay { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0; font-size: 18px; }
.to-pay b { font-size: 34px; color: var(--primary); }
.change { font-size: 18px; margin-top: 8px; } .change.big b { font-size: 30px; color: var(--good); }
.qr { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.paid-card { text-align: center; } .tick { font-size: 56px; color: var(--good); animation: pop .5s both; }
.ok { color: var(--good); font-weight: 700; }
@media (max-width: 860px) { .counter { grid-template-columns: 1fr; } }
.bill-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pay-col { position: sticky; top: 70px; border-left: 1px dashed var(--line); padding-left: 18px; }
.pay-col .form-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
@media (max-width: 1000px) { .bill-cols { grid-template-columns: 1fr; } .pay-col { position: static; border: 0; padding: 0; } }

/* the receipt: printed, and previewed on screen after payment */
.rcpt { width: var(--rw, 72mm); padding: 2mm 3mm; font: var(--rwt, 400) var(--rfs, 14px)/1.35 var(--rf, Arial, "Nirmala UI", sans-serif);
  -webkit-text-stroke: var(--rstroke, 0); color: #000; background: #fff; text-align: left;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* the shop name and TOTAL stand out in their own font; the rest of the bill stays lighter */
.rc-head b, .rc-total { font-family: var(--rhf, "Courier New", "Nirmala UI", monospace); font-weight: 900;
  -webkit-text-stroke: 0.6px #000; }   /* an outline on top of bold: Courier New Bold alone prints thin */
.rl { display: flex; justify-content: space-between; gap: 6px; }
.rc-head, .rc-c { text-align: center; } .rc-head b { font-size: 1.3em; }
.rc-total { font-size: 1.2em; margin: 4px 0; }
.rcpt hr { border: 0; border-top: 1px dashed #000; }
.rcpt hr.solid { border-top-style: solid; }
.rc-group, .rc-off { font-weight: 700; } .rc-off { padding-left: 10px; }
.rc-after { font-weight: 700; padding-left: 10px; border-top: 1px dotted #000; margin-top: 1px; }
.rc-greet { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; font-weight: 700; margin-top: 4px; }
.rc-diya svg { display: block; width: 24px; height: 22px; }
.receipt-preview { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 16px; }
.receipt-preview .rcpt { --rw: 72mm; box-shadow: var(--shadow); border: 1px solid var(--line); }
#print-area { display: none; }
/* barcode label: 50 x 25 mm sticker */
.label { width: 50mm; height: 25mm; padding: 1.2mm 2mm; display: flex; flex-direction: column; justify-content: space-between;
  background: #fff; color: #000; font: 9px/1.15 Arial, sans-serif; overflow: hidden; }
.lb-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-code svg { width: 100%; height: 11mm; display: block; }
.lb-foot { display: flex; justify-content: space-between; font-size: 10px; }
.label-preview .label { border: 1px dashed var(--muted); transform: scale(1.4); transform-origin: top left; margin: 0 22mm 12mm 0; }
@page label { size: 50mm 25mm; margin: 0; }
@media print {
  @page { margin: 0; }
  #print-area .label { page: label; break-after: page; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; }
}
.side-tabs { display: flex; margin-bottom: 12px; } .side-tabs button { flex: 1; }
.mine-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.mine-sum div { background: var(--marigold-soft); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.mine-sum span { font-size: 12px; color: var(--muted); } .mine-sum b { font-size: 18px; }
.cust-box { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: #fffdf9; }
.cust-edit { margin-top: 8px; flex-wrap: nowrap; }
.cust-edit input { flex: 1; min-width: 0; }
.drawer-sum { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.drawer-sum div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.drawer-sum span { color: var(--muted); }
.drawer-sum .total { border-bottom: 0; font-size: 18px; }
.drawer-sum .total span { color: var(--ink); font-weight: 600; }
.steps { line-height: 1.7; padding-left: 20px; }
.card-head .btn { white-space: nowrap; }

/* ---------- staff: several bills, item details ---------- */
.bill-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 10px 8px; max-width: 640px; margin: 0 auto; scrollbar-width: none; }
.bill-tabs button { flex-shrink: 0; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px;
  font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.bill-tabs button.on { background: var(--marigold-soft); border-color: var(--marigold); color: var(--accent-ink); }
.bill-tabs .cnt { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.bill-tabs .new { border-style: dashed; color: var(--accent-ink); }
.bill-tabs .new .bi { flex-direction: row; gap: 4px; align-items: baseline; }
.cust-name { width: 100%; margin-bottom: 8px; }
.cust-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 38%); gap: 8px; }
.cust-row input { width: 100%; margin-bottom: 8px; }
.cust-phone.bad { border-color: var(--bad); background: var(--bad-soft); }
.editing { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-weight: 600; }
.bar button.on { background: #fff; color: var(--accent-ink); }
.suggest .sug { display: flex; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.suggest .sug:last-child { border-bottom: 0; }
.suggest .sug-add { width: 40px; height: 40px; flex: none; padding: 0; justify-content: center; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 24px;
  line-height: 1; cursor: pointer; margin-top: 4px; }
.line .click { cursor: pointer; }
.center { text-align: center; }
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 0; max-height: 92vh; }
dialog.sheet[open] { animation: sheetUp .22s ease-out; }
dialog.sheet::backdrop { background: rgba(40, 20, 10, .45); }
.sheet-img { width: 100%; max-height: 42vh; object-fit: contain; background: #fff; display: block; }
.sheet-close { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); box-shadow: var(--shadow); font-size: 16px; cursor: pointer; }
.sheet-body { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.sheet-body h2 { margin: 0; font-size: 20px; }
.sheet-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sheet-price b { font-size: 30px; color: var(--primary); }
.sheet-add { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 18px; font-weight: 700; }
.sheet-qty { min-width: 44px; text-align: center; font-size: 20px; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* login: choose the work first */
.works { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.work { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; animation: fadeUp .3s ease-out both; animation-delay: calc(var(--i, 0) * 60ms); position: relative; }
.work:hover, .work.last { border-color: var(--marigold); }
.work.last { background: #fffaf2; }
.work-text { display: flex; flex-direction: column; gap: 3px; }
.work-text b { font-size: 18px; color: var(--accent-ink); }
.work-text > span { font-size: 13px; color: var(--muted); }
.work-last { position: absolute; right: 12px; top: 10px; font-size: 11px; color: var(--accent-ink); background: var(--marigold-soft);
  border-radius: 999px; padding: 1px 8px; }
.work-icon { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; background: var(--marigold-soft) center / 28px no-repeat; }
.work-billing .work-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23993c1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h4'/%3E%3C/svg%3E"); }
.work-counter .work-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23993c1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 6h10M7 10h10M13 20L7 13h3a4 4 0 0 0 0-8'/%3E%3C/svg%3E"); }
.work-admin .work-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23993c1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); }
.work-chosen { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--marigold-soft);
  border-radius: 12px; padding: 8px 12px; margin-top: 10px; color: var(--accent-ink); }

/* ---------- shop books: category chips, stock count, phone-friendly tables ---------- */
.shop-code { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--marigold-soft);
  color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.shop-switch { margin-bottom: 14px; }
.shop-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.join-code { font-family: monospace; font-size: 13px; word-break: break-all; background: #faf8f4; border: 1px dashed var(--line);
  border-radius: 8px; padding: 10px; user-select: all; }
.cols .col-bar.s2 { background: #d4537e; }
.cat-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; max-width: 100%; }
.cat-chips button { white-space: nowrap; }
.count-input { width: 84px; min-height: 38px; text-align: right; }
.count-input.changed { border-color: var(--marigold); background: var(--marigold-soft); font-weight: 700; }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 0;
  background: linear-gradient(transparent, var(--bg) 30%); }
.sticky-save .btn { flex: 1; }
.stats.six { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* On a phone each table row becomes a small card: label on the left, value on the right. */
@media (max-width: 640px) {
  .owner .table-wrap { overflow: visible; }
  .owner .table-wrap table, .owner .table-wrap tbody, .owner .table-wrap tr, .owner .table-wrap td { display: block; width: 100%; }
  .owner .table-wrap thead { display: none; }
  .owner .table-wrap tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; padding: 6px 12px; background: #fff; }
  .owner .table-wrap tr.click:hover td { background: transparent; }
  .owner .table-wrap td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 5px 0; text-align: right; }
  .owner .table-wrap td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; flex-shrink: 0; }
  .owner .table-wrap td[data-label=""] { justify-content: flex-end; }
  .owner .table-wrap td[data-label=""]::before { content: none; }
  .owner .table-wrap td:empty { display: none; }
  .owner .table-wrap td:first-child { font-size: 15px; }
  .owner .table-wrap td select { max-width: 60%; }
  .stats.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dialog .body { padding: 12px; max-height: 78vh; }
}
