/* KHATA by ZEROKRIYA: phones only (360-430 px). Big buttons with a picture and a short word; nothing cut off (server rule 20 Oct 2026). */
:root { --g: #4d7c0f; --g2: #3f6212; --lime: #a3e635; --bg: #f5f7ef; --card: #fff; --ink: #1f2d10; --mute: #5b6650; --line: #dfe5d3;
  --red: #b42318; --redbg: #fdecea; --blue: #1d4ed8; --bluebg: #e8efff; --amber: #a15c07; --amberbg: #fff4e0; --okbg: #ecf7dc; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Telugu", "Noto Sans Devanagari", sans-serif; }
main { max-width: 480px; margin: 0 auto; padding: 12px 12px 90px; }
h1 { font-size: 21px; margin: 4px 0 12px; } h2 { font-size: 18px; margin: 0; } h3 { font-size: 16px; margin: 16px 0 8px; color: var(--mute); }
p { margin: 6px 0; } .muted { color: var(--mute); } .small { font-size: 14px; } .center { text-align: center; } .empty { color: var(--mute); text-align: center; padding: 24px 8px; }
.err { color: var(--red); font-weight: 600; min-height: 1px; margin: 6px 0; } .err:empty { display: none; }

/* top bar: back, brand, help, language, install (top right) */
header.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--g); color: #fff; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; flex: 1; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; background: #fff; flex: none; }
.brand .nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand b { font-size: 17px; letter-spacing: .5px; } .brand small { font-size: 12px; opacity: .9; overflow-wrap: anywhere; }
header .btn { border-color: rgba(255,255,255,.75); color: #fff; background: transparent; min-height: 38px; padding: 0 10px; font-size: 15px; }
header .btn.sq { width: 40px; padding: 0; font-weight: 700; }
header #langBtn { width: auto; min-width: 40px; padding: 0 3px; white-space: nowrap; font-size: 12px; letter-spacing: -.3px; }
header .btn.back { font-size: 22px; width: 42px; padding: 0; border: 1.5px solid rgba(255,255,255,.75); }
header .btn.install { background: #fff; color: var(--g2); border-color: #fff; font-weight: 700; white-space: nowrap; padding: 0 9px; }

/* buttons: always a real shape (server rule 18 Oct 2026) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--g);
  background: var(--g); color: #fff; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; text-align: center; }
.btn:disabled { opacity: .55; } .btn:active { transform: scale(.98); }
.btn.outline { background: #fff; color: var(--g2); } .btn.ok { background: var(--g); color: #fff; }
.btn.light { background: #fff; color: var(--g2); border-color: #fff; } .btn.danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn.sm { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 56px; font-size: 17px; width: 100%; margin: 6px 0; } .btn.wide { width: 100%; margin: 6px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .row2 .btn { margin: 0; }

/* home: picture tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 10px 6px; border-radius: 16px;
  background: #fff; border: 2px solid var(--line); color: var(--ink); font: inherit; font-weight: 700; font-size: 16px; text-align: center; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tile .ic { font-size: 38px; line-height: 1; } .tile:active { transform: scale(.98); }
.tile.main { background: var(--g); color: #fff; border-color: var(--g); } .tile.lock { opacity: .5; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.num { background: #fff; border-radius: 14px; padding: 10px 12px; border: 1px solid var(--line); }
.num small { display: block; color: var(--mute); font-size: 13px; } .num b { font-size: 20px; } .num.get b { color: var(--red); } .num.give b { color: var(--blue); }
.num.wide2 { grid-column: span 2; }

/* cards and lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.item .av { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--okbg); color: var(--g2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.item .tx { flex: 1; min-width: 0; } .item .t { display: block; font-weight: 700; overflow-wrap: anywhere; } .item .s { display: block; color: var(--mute); font-size: 14px; overflow-wrap: anywhere; }
.item .amt { flex: none; text-align: right; font-weight: 800; } .item .amt small { display: block; font-weight: 600; font-size: 12px; color: var(--mute); }
.item .chev { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--g2); font-weight: 800; }
.get { color: var(--red); } .give { color: var(--blue); } .zero { color: var(--g2); }
.searchbox { width: 100%; }

/* form fields */
label.f { display: block; margin: 10px 0; font-weight: 600; font-size: 14.5px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-weight: 500; background: #fff; color: var(--ink); margin-top: 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lime); border-color: var(--g); }
textarea { resize: none; overflow: hidden; }
input.pin { letter-spacing: 10px; font-size: 22px; text-align: center; -webkit-text-security: disc; }
.numf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; width: 100%; min-height: 64px; padding: 8px 14px; margin: 8px 0; border: 2px solid var(--g); border-radius: 14px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.numf small { flex-basis: 100%; font-size: 14px; font-weight: 600; color: var(--mute); } .numf b { font-size: 24px; } .numf i { font-style: normal; color: var(--mute); }
.choice { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.choice button { flex: 1 1 auto; min-height: 46px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.choice button.on { background: var(--okbg); border-color: var(--g); color: var(--g2); box-shadow: inset 0 0 0 1px var(--g); }
.qlabel { font-weight: 700; margin: 14px 0 4px; }

/* bottom sheet */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(15,23,8,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
.sheet .hd { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 1; }
.sheet .hd h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; } .sheet .bd { padding: 12px 14px 18px; }
.rb { font-size: 17px; font-weight: 650; line-height: 1.45; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--g); border-radius: 12px; padding: 14px; margin: 4px 0 14px; }
.rb.small { font-size: 15px; font-weight: 500; }
.rbc { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--g); border-radius: 12px; padding: 4px 12px 8px; margin: 4px 0 14px; }
.rbh { margin: 8px 0 4px; font-size: 17px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.rbtag { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #fff3d6; color: #8a5a00; border: 1px solid #f0d9a0; vertical-align: 2px; }
.rbr { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.rbr > span { color: var(--mute); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rbr > b { text-align: right; font-weight: 800; overflow-wrap: break-word; max-width: 62%; }
.rbr.it > b, .rbr.tot > b { white-space: nowrap; flex: none; max-width: none; } .rbr.it > span, .rbr.tot > span { flex: 1; }
.rbr.it > span { color: var(--ink, #222); font-weight: 700; } .rbr.it small { display: block; color: var(--mute); font-weight: 600; font-size: 12.5px; }
.rbi { margin: 2px 0; }
.rbr.tot { border-top: 2px solid #222; font-size: 17px; } .rbr.tot > span { color: inherit; font-weight: 800; } .rbr.tot > b { font-size: 19px; }
.rbr.red > b { color: var(--red); } .rbr.grn > b { color: #1d6b2c; }
.rbn { margin: 8px 0 2px; padding: 7px 10px; border-radius: 9px; background: #eef6e6; color: #2d5a17; font-weight: 700; font-size: 13.5px; }
.rbw { margin: 8px 0 2px; padding: 7px 10px; border-radius: 9px; background: #fdecea; color: var(--red); font-weight: 700; font-size: 13.5px; }
.padshow { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px; background: #fff; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 10px; }
.padshow span { font-size: 24px; color: var(--mute); } .padshow b { font-size: 38px; overflow-wrap: anywhere; } .padshow small { color: var(--mute); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.key { min-height: 58px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 26px; font-weight: 700; color: var(--ink); cursor: pointer; }
.key:active { background: var(--okbg); }
.steps { padding-left: 22px; } .steps li { margin: 8px 0; }

/* the farmer's book */
.bal { text-align: center; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.bal small { display: block; color: var(--mute); font-weight: 600; } .bal b { font-size: 30px; } .bal .sub { font-size: 14px; color: var(--mute); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.acts .btn { min-height: 54px; margin: 0; }
.ent { display: flex; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0; width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ent .ic { font-size: 24px; flex: none; } .ent .tx { flex: 1; min-width: 0; } .ent .t { font-weight: 700; display: block; } .ent .s { display: block; font-size: 13.5px; color: var(--mute); overflow-wrap: anywhere; }
.ent .amt { flex: none; font-weight: 800; text-align: right; } .ent.x { opacity: .55; } .ent.x .t { text-decoration: line-through; }
.ent.season { background: var(--okbg); border-color: var(--g); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--amberbg); color: var(--amber); }

/* bill lines */
.line { display: flex; align-items: center; gap: 8px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0; }
.line .tx { flex: 1; min-width: 0; } .line .t { font-weight: 700; overflow-wrap: anywhere; display: block; } .line .s { font-size: 13.5px; color: var(--mute); display: block; }
.line .amt { font-weight: 800; flex: none; }
.ptiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ptile { padding: 10px; min-height: 76px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ptile b { display: block; overflow-wrap: anywhere; } .ptile small { display: block; color: var(--mute); font-size: 13px; }
.totalbar { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 4px; border-top: 1px solid var(--line); margin-top: 10px; }
.totalbar .sum { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; margin-bottom: 4px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 12px; overflow: hidden; }
table.t td, table.t th { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; } table.t td.r, table.t th.r { text-align: right; }

.toast { position: fixed; left: 12px; right: 12px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 30; max-width: 456px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast span { flex: 1; }

/* start and phone-only screens */
.hero { text-align: center; padding: 18px 8px 6px; } .hero img { width: 84px; height: 84px; border-radius: 20px; }
.hero h1 { margin: 10px 0 4px; font-size: 24px; } .hero p { color: var(--mute); }
.desk { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; }
.desk .box { text-align: center; max-width: 420px; } .desk .qr { width: 240px; height: 240px; background: #fff; padding: 10px; border-radius: 16px; border: 1px solid var(--line); }
[hidden] { display: none !important; }
a.tile, a.item, a.btn { text-decoration: none; }
.shopline { color: var(--mute); font-weight: 600; margin: -8px 0 10px; overflow-wrap: anywhere; }
/* new bill: type tiles, then − / + per product (owner 24 Oct 2026) */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px; padding: 8px; border-radius: 16px;
  border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.cat .ic { font-size: 30px; line-height: 1.1; } .cat.on { border-color: var(--g); background: var(--okbg); color: var(--g2); box-shadow: inset 0 0 0 1px var(--g); }
.cat .badge { position: absolute; top: 6px; right: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--g); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }
/* after a choice is made it shrinks: slim farmer chip, one row of small type buttons (owner 24 Oct 2026) */
.item.slim { padding: 7px 10px; gap: 8px; border-radius: 12px; } .item.slim .av { width: 32px; height: 32px; font-size: 15px; }
.item.slim .t { font-size: 15.5px; line-height: 1.2; } .item.slim .s { font-size: 12.5px; } .item.slim .amt { font-size: 15px; } .item.slim .chev { width: 26px; height: 26px; font-size: 13px; }
.cats.mini { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.cats.mini .cat { min-height: 52px; padding: 5px 2px; gap: 0; border-radius: 12px; font-size: 12.5px; line-height: 1.15; text-align: center; }
.cats.mini .cat .ic { font-size: 19px; } .cats.mini .cat .badge { top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; }
.prow { display: flex; align-items: center; gap: 8px; padding: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; margin: 8px 0; }
.prow.has { border-color: var(--g); background: #fbfdf6; }
.prow .tx { flex: 1; min-width: 0; } .prow .t { display: block; font-weight: 700; overflow-wrap: anywhere; } .prow .s { display: block; font-size: 13.5px; color: var(--mute); overflow-wrap: anywhere; }
.stepper { flex: none; display: flex; align-items: center; gap: 4px; }
.st { width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--g); background: #fff; color: var(--g2); font: inherit; font-size: 28px; font-weight: 800; line-height: 1; cursor: pointer; padding: 0; }
.st.plus { background: var(--g); color: #fff; } .st:disabled { border-color: var(--line); color: #b9c2ad; }
.stq { min-width: 48px; height: 46px; padding: 0 6px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); font: inherit; font-size: 20px; font-weight: 800; color: var(--ink); cursor: pointer; }
.bline { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.bline .tx { flex: 1; min-width: 0; } .bline .t { display: block; font-weight: 700; overflow-wrap: anywhere; } .bline .s { display: block; font-size: 13.5px; color: var(--mute); }
.bline .amt { font-weight: 800; flex: none; } .bline .chev { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; }
/* new bill: slim bar at the bottom, total + Save side by side */
.savebar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 12px -12px 0; padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1.5px solid var(--line); box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
.savebar .sum { flex: 1; min-width: 0; } .savebar .sum small { display: block; color: var(--mute); font-weight: 600; font-size: 13px; } .savebar .sum b { font-size: 22px; }
.savebar .btn { flex: none; min-height: 52px; padding: 0 22px; font-size: 17px; }

/* start screen: one plain search bar (owner 24 Oct 2026) */
.findbar { position: relative; margin: 10px 0 12px; }
.findbar .ic { position: absolute; left: 14px; top: 16px; font-size: 20px; pointer-events: none; }
.findbar textarea { display: block; width: 100%; min-height: 56px; padding: 14px 14px 12px 46px; resize: none; overflow: hidden; line-height: 1.4; border: 2px solid var(--g); border-radius: 16px; font: inherit; font-size: 18px; background: #fff; color: var(--ink); }
.findbar textarea:focus { outline: 3px solid var(--okbg); }
#hl .btn { margin-top: 8px; white-space: normal; overflow-wrap: anywhere; }

/* farmer page: two big + / − buttons; vendor page: one + (owner 24 Oct 2026) */
.pm { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 8px; } .pm.one { grid-template-columns: 1fr; }
.pmb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 96px; padding: 8px; border-radius: 18px;
  border: 2px solid; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; }
.pmb .sg { font-size: 46px; font-weight: 800; line-height: .9; } .pmb:active { transform: scale(.98); }
.pmb.plus { background: var(--g); border-color: var(--g); color: #fff; } .pmb.minus { background: #fff; border-color: var(--blue); color: var(--blue); }
.acts.small .btn { min-height: 44px; font-size: 15px; }

/* ---------- owner's design (24 Oct 2026) ---------- */
.findbar .clr { position: absolute; right: 10px; top: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #d9ddd2; color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
.findbar textarea { padding-right: 48px; }
.findbar.slim textarea { min-height: 48px; padding-top: 11px; padding-bottom: 9px; font-size: 16px; border-width: 1.5px; border-color: var(--line); background: #fff; }
.findbar.slim .ic { top: 12px; }
.item.find .av { background: #e8ece3; font-size: 20px; }
.who { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.who .pic { flex: none; width: 54px; height: 54px; border-radius: 50%; background: #dfe9f6; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.who .tx { flex: 1; min-width: 0; } .who .t { display: block; font-weight: 800; font-size: 18px; overflow-wrap: anywhere; } .who .s { display: block; color: var(--mute); font-size: 14px; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.st3 { padding: 10px 4px; text-align: center; border-left: 1px solid var(--line); min-width: 0; } .st3:first-child { border-left: 0; }
.st3 b { display: block; font-size: 15.5px; overflow-wrap: anywhere; } .st3 small { display: block; font-size: 12px; color: var(--mute); line-height: 1.2; }
.st3.due { background: #fdeeee; } .st3.due b { color: var(--red); } .st3.got { background: #eef8ef; } .st3.got b { color: var(--g2); }
.pmb { flex-direction: row; gap: 10px; min-height: 80px; }
.pmb .cir { flex: none; width: 42px; height: 42px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; line-height: 1; }
.pmb b { display: block; font-size: 19px; } .pmb small { display: block; font-size: 13.5px; font-weight: 600; opacity: .9; }
.pmb.plus .cir { color: var(--g); }
.pmb.minus { background: var(--red); border-color: var(--red); color: #fff; } .pmb.minus .cir { color: var(--red); }
.rhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 6px; } .rhead h3 { margin: 0; }
.txl { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tx1 { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tx1:first-child { border-top: 0; } .tx1.x { opacity: .55; } .tx1.x .w { text-decoration: line-through; }
.tx1 .d { flex: none; width: 70px; font-size: 12.5px; color: var(--mute); } .tx1 .ic { flex: none; font-size: 22px; }
.tx1 .w { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.tx1 .a { flex: none; text-align: right; } .tx1 .a b { display: block; font-size: 15px; color: var(--ink); } .tx1 .a small { font-size: 12px; font-weight: 700; }
.tx1 .a.cr small { color: var(--red); } .tx1 .a.got small { color: var(--g2); }
.ptitle { margin: 2px 0 10px; } .ptitle h1 { margin: 0; font-size: 21px; overflow-wrap: anywhere; } .ptitle p { margin: 2px 0 0; color: var(--mute); font-weight: 600; }
/* product picker: groups on the left, products on the right, cart bar at the bottom.
   Slim version (owner 12 Nov 2026, "too bulky and uneven"): narrow rail with Photo on top, one white list with thin lines,
   every row the same shape: picture | name over price + pack/stock | + (or − qty + once in the bill) */
.picker { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: start; }
.rail { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 5px; }
.rk { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1.15; color: var(--ink); text-align: center; overflow-wrap: break-word; hyphens: manual; cursor: pointer; text-decoration: none; }
.rk .ic { font-size: 20px; line-height: 1.1; } .rk.on { background: var(--okbg); border-color: var(--g); color: var(--g2); }
.rk.photo { border-color: var(--g); color: var(--g2); }
.plist { min-width: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 8px; }
.plist h3 { margin: 0 -8px; padding: 8px 10px 6px; font-size: 14px; color: var(--mute); border-bottom: 1px solid var(--line); }
.plist .empty { margin: 14px 0; }
.pr { display: grid; grid-template-columns: 40px 1fr auto; grid-template-areas: "i t t" "i m m" "i s c"; column-gap: 8px; row-gap: 2px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.plist h3 + .pr { border-top: 0; }
.pr > .pimg { grid-area: i; align-self: start; width: 40px; height: 40px; font-size: 21px; border-radius: 10px; }
.pr .t { grid-area: t; font-weight: 700; font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.pr .m { grid-area: m; min-width: 0; line-height: 1.2; } .pr .m > b { display: block; font-size: 15px; }
.pr .m small, .pr .sk { display: block; font-size: 12px; color: var(--mute); font-weight: 600; overflow-wrap: anywhere; } .pr .m small.get, .pr .sk.get { color: var(--red); }
.pr .sk { grid-area: s; align-self: center; min-width: 0; }
.pr .c { grid-area: c; justify-self: end; align-self: end; }
.pr.has { background: #f6faee; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.pr .t small { display: block; font-size: 12px; font-weight: 600; color: var(--mute); }
/* price + unit easy to spot (owner 12 Nov 2026) */
.ptag { display: inline-flex; align-items: stretch; flex-wrap: wrap; gap: 5px; max-width: 100%; margin: 3px 0 2px; }
.ptag .pp { white-space: nowrap; display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 8px; background: #e3f2d6; border: 1.5px solid #8cc46a; color: #1d5e1f; font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.ptag .pp.none { background: #f1f1ee; border-color: #cfcfc8; color: var(--mute); }
.ptag .pu { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 8px; background: #e4ecfb; border: 1.5px solid #8eaee6; color: #1c4596; font-size: 16.5px; font-weight: 800; white-space: nowrap; line-height: 1.25; overflow-wrap: anywhere; }
.pr .m .ptag { margin-bottom: 2px; }
.pr .stepper.sm { gap: 3px; } .pr .stepper.sm .st { width: 32px; height: 32px; font-size: 21px; } .pr .stepper.sm .stq { min-width: 34px; height: 32px; font-size: 15px; padding: 0 4px; }
.pimg { position: relative; flex: none; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: #eef3e6; }
.pimg.k-seed { background: #fdf3d8; } .pimg.k-pest { background: #fde8e8; } .pimg.k-equip { background: #e6eef8; } .pimg.k-micro { background: #e4f4f7; } .pimg.k-bio { background: #e8f6e3; } .pimg.k-other { background: #f0ece6; }
.pimg .badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--g); color: #fff; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.addc { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--g); color: #fff; font: inherit; font-size: 24px; font-weight: 800; line-height: 1; cursor: pointer; padding: 0; }
.cartbar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 12px -12px 0; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.cartbar .cic { position: relative; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--okbg); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.cartbar .cic .badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cartbar .sum { flex: 1; min-width: 0; } .cartbar .sum small { display: block; font-weight: 700; font-size: 14px; } .cartbar .sum b { font-size: 19px; }
.cartbar .btn { flex: none; min-height: 50px; padding: 0 16px; font-size: 16px; } .cartbar .btn:disabled { opacity: .5; }
/* bill: selected items */
.sl { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); } #lines .sl:first-child { border-top: 0; }
.sl .tx { flex: 1; min-width: 0; } .sl .t { display: block; font-weight: 700; overflow-wrap: anywhere; } .sl .s { display: block; font-size: 13px; color: var(--mute); }
.sl .prc { margin-top: 4px; min-height: 30px; padding: 0 8px; font-size: 13.5px; }
.sr { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; } .sr b { font-size: 15px; }
.sr .x { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--mute); font-weight: 800; cursor: pointer; padding: 0; }
.stepper.sm .st { width: 34px; height: 34px; font-size: 22px; border-radius: 10px; } .stepper.sm .stq { min-width: 38px; height: 34px; font-size: 16px; border-radius: 10px; }
.tot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0 0; color: var(--mute); font-weight: 600; } .tot b { color: var(--ink); }
.tot.big b { font-size: 22px; }
.card.soft { background: #f1f8ee; border-color: #d6e8cf; } .g { color: var(--g2); font-weight: 600; font-size: 14px; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; font-weight: 600; }
.frow > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.frow .in { flex: none; display: flex; align-items: center; gap: 6px; } .frow .in input { width: 72px; min-height: 42px; padding: 0 10px; font-size: 17px; border-radius: 10px; }
.frow .in small { color: var(--mute); min-width: 26px; }
/* cash advance */
.cashhero { text-align: center; margin: 4px 0 8px; } .cashhero .big { font-size: 60px; line-height: 1; } .cashhero h2 { margin: 4px 0 0; } .cashhero p { margin: 2px 0 0; color: var(--mute); }
.amtshow { text-align: center; font-size: 40px; font-weight: 800; color: #b9c2ad; padding: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow-wrap: anywhere; }
.amtshow.on { color: var(--ink); border-color: var(--g); }
.ipad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.ipad button { min-height: 54px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 24px; font-weight: 700; color: var(--ink); cursor: pointer; }
.ipad button:active { background: var(--okbg); }

/* owner home: vendor search bar fixed at the bottom (thumb reach), results stack up from it (owner 24 Oct 2026) */
.vhome { min-height: calc(100dvh - 150px); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 86px; }
.findbar.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; margin: 0; padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.findbar.bottom .ic { left: 26px; top: 26px; } .findbar.bottom .clr { right: 22px; top: 22px; }

.ratecard { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 0 0 10px; background: var(--okbg); border: 1.5px solid var(--g); border-radius: 14px; }
.ratecard .tx { flex: 1; min-width: 0; } .ratecard small { display: block; font-weight: 600; color: var(--g2); overflow-wrap: anywhere; } .ratecard b { font-size: 22px; }
.ratecard .btn { flex: none; min-height: 44px; }
.rk.cash { text-decoration: none; border-color: var(--g); background: #f1f8ee; }
/* "Continue with Google": Google's official white button (server rule 25 Oct 2026) */
.zk-google{display:flex;width:100%;align-items:center;justify-content:center;gap:12px;min-height:48px;padding:8px 18px;box-sizing:border-box;background:#fff;color:#1f1f1f;border:1px solid #747775;border-radius:24px;font:500 16px/1.25 Roboto,Arial,sans-serif;text-decoration:none;cursor:pointer;white-space:normal;text-align:center;margin:6px 0 10px}
.zk-google:focus-visible{outline:2px solid #0b57d0;outline-offset:2px}
/* join-by-QR code shown by the owner (owner 25 Oct 2026) */
.qrbox{background:#fff;border-radius:14px;padding:12px;display:flex;justify-content:center}.qrbox svg{width:min(70vw,260px);height:auto}
/* home numbers + owner quick buttons (owner 10 Nov 2026) */
.htop { margin-bottom: auto; } .nums.hn { margin: 2px 0 10px; } .nums.hn .num b { font-size: 18px; overflow-wrap: anywhere; }
a.num { display: block; color: inherit; text-decoration: none; position: relative; padding-right: 22px; }
a.num::after { content: '›'; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--g2); font-weight: 800; font-size: 18px; }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; } .qa .btn { min-height: 48px; padding: 6px 8px; font-size: 15px; }
.lowline { display: block; padding: 10px 12px; border-radius: 12px; background: var(--amberbg); color: var(--amber); font-weight: 700; text-decoration: none; border: 1.5px solid #f3d29a; }
/* scan a supplier bill */
.scanimg { display: block; width: 100%; max-height: 50vh; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; margin: 8px 0; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2.5px solid var(--line); border-top-color: var(--g); border-radius: 50%; animation: kspin .8s linear infinite; vertical-align: -2px; }
@keyframes kspin { to { transform: rotate(360deg); } }
.card.ok { border-color: var(--g); background: var(--okbg); }
.stag { margin: 0 0 6px; font-weight: 800; color: var(--g2); } .stag.new { color: var(--blue); }
.sch { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; } .sch .tx { flex: 1; min-width: 0; }
.sch .t { display: block; font-weight: 800; overflow-wrap: anywhere; } .sch .s { display: block; color: var(--mute); font-size: 14px; }
.sch .x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--mute); font-weight: 800; cursor: pointer; }
.scl .row2 .numf { margin: 6px 0 0; min-height: 60px; } .scl .numf b { font-size: 20px; overflow-wrap: anywhere; }
.warn { background: var(--amberbg); color: var(--amber); font-weight: 700; border-radius: 12px; padding: 10px 12px; }
details.card summary { cursor: pointer; font-weight: 700; min-height: 30px; }
/* day picker with ‹ › */
.daynav { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; } .daynav input { margin: 0; flex: 1; min-width: 0; } .daynav .btn { flex: none; min-width: 48px; font-size: 22px; }
.daynav .btn:disabled { opacity: .4; }
table.st th { font-size: 12.5px; } table.st td { font-size: 13.5px; }
/* a screen shown from the copy saved on the phone (OfflineKit) */
.savedat { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: #eceee8; color: #374151; font-size: 13.5px; font-weight: 600; text-align: center; }
table.t td.r, table.t th.r { white-space: nowrap; overflow-wrap: normal; }
.stl { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.str { padding: 8px 10px; border-bottom: 1px solid var(--line); } .str:last-child { border-bottom: 0; }
.str .t { display: block; font-weight: 700; overflow-wrap: anywhere; } .str .sn { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13.5px; color: var(--mute); }
.str .sn span { white-space: nowrap; } .str .sn b { color: var(--ink); }
.learn { margin: 22px 0 6px; } .learn .btn { display: inline-flex; width: auto; }
/* many bills at once (owner 11 Nov 2026): one card per photo with its state; a duplicate is red and has no save button */
.scanrow { margin: 8px 0; } .scanrow .btn { width: 100%; }
.bq { padding: 10px 12px; } .bq .bqh { display: flex; gap: 10px; align-items: flex-start; } .bq .tx { flex: 1; min-width: 0; }
.bq img, .bq .bqi { width: 52px; height: 52px; flex: none; border-radius: 8px; object-fit: cover; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.bq .t { display: block; font-weight: 700; } .bq .s { display: block; color: var(--mute); font-size: 14px; overflow-wrap: anywhere; } .bq .s.why { color: var(--ink); }
.bq .btn.wide { width: 100%; margin-top: 8px; }
.bq.dup { border-color: var(--red); background: #fff5f5; } .stag.dupt { color: var(--red); }
/* supplier bills (owner 11 Nov 2026): compact list, bill photo on top of each bill, how an approved bill was recorded */
.sbr .t { overflow-wrap: break-word; } .sbr .amt { white-space: nowrap; } .sbr.wait .av { background: var(--amberbg); } .sbr.dup .av { background: var(--redbg); } .sbr.dup .t { color: var(--red); }
.sbphoto { display: block; position: relative; width: 100%; padding: 0; margin: 8px 0 12px; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; cursor: zoom-in; }
.sbphoto img { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #f2f2ee; }
.sbphoto .btn { position: absolute; right: 8px; bottom: 8px; }
.scanimg.big { width: 100%; height: auto; max-height: none; }
.dupc { border-color: var(--red); background: #fff5f5; } .dupc .btn.wide, .btn.danger.wide, .btn.outline.wide { width: 100%; margin-top: 8px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); } .kv:last-child { border-bottom: 0; }
.kv span { color: var(--mute); flex: none; } .kv b { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.rl { padding: 8px 0; border-bottom: 1px solid var(--line); } .rl:last-child { border-bottom: 0; } .rl .t { font-weight: 700; overflow-wrap: anywhere; }
.rlh { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .rl .s { margin: 2px 0; color: var(--mute); font-size: 14px; } .rl .s b { color: var(--ink); }
.tag.new { background: var(--okbg); color: var(--g2); }
.sbr .s.why { color: var(--red); font-weight: 600; }
/* compact bill check (owner 11 Nov 2026): small photo, short summary cards, ✏️ opens the fields, what is still needed in red */
.sbphoto.sm img { max-height: 150px; } .sbphoto.sm { margin: 6px 0 10px; }
.card.cpt { padding: 10px 12px; margin: 8px 0; } .card.cpt .f { margin: 0; } .card.cpt .row2 { gap: 8px; }
.sumh { display: flex; gap: 10px; align-items: flex-start; } .sumh .tx { flex: 1; min-width: 0; } .sumh .t { display: block; font-weight: 700; overflow-wrap: break-word; }
.sumh .s { display: block; color: var(--mute); font-size: 14px; overflow-wrap: anywhere; } .sumh .stag { display: inline-block; margin-top: 2px; }
.acts2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lc .lch { display: flex; gap: 8px; align-items: flex-start; } .lc .lch .t { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: break-word; }
.lc .lcq { margin: 4px 0 0; font-size: 15px; } .lc .s { margin: 2px 0; color: var(--mute); font-size: 14px; overflow-wrap: anywhere; } .lc p { margin: 2px 0; }
.need { display: block; color: var(--red); font-weight: 700; font-size: 14px; margin: 4px 0 0; } .card.needc { border-color: var(--red); }
.warnline { color: var(--amber); font-weight: 600; } .warnline:empty { display: none; }
/* numbered bill entries with a product photo (owner 11 Nov 2026) */
.ln { flex: none; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px; background: var(--g); color: #fff; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.lph { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.lc .lch, .rlh { align-items: center; } .rlh .t { flex: 1; min-width: 0; }
.pimg.has { padding: 0; overflow: hidden; } .pimg.has img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pph { display: flex; align-items: center; gap: 12px; margin: 10px 0; } .pph .pimg { width: 64px; height: 64px; }
/* supplier picture = their logo from the bill (owner 11 Nov 2026) */
.av.ph, .pic.ph { background: #fff; border: 1px solid var(--line); overflow: hidden; padding: 2px; }
.supimg { width: 100%; height: 100%; object-fit: contain; display: block; } .supimg.sm { display: inline-block; width: 28px; height: 28px; vertical-align: middle; border-radius: 6px; border: 1px solid var(--line); }
.vbtns { display: flex; flex-direction: column; gap: 6px; flex: none; }
.vr .t { overflow-wrap: break-word; } .vr .amt { max-width: 36%; } .vr .amt small { white-space: normal; line-height: 1.2; }
/* colour-coded entry lines (owner 11 Nov 2026) */
.lcq .qv { font-weight: 800; color: var(--ink); } .lcq .qx { color: var(--mute); font-weight: 500; } .lcq .qt { color: var(--g2); font-weight: 800; font-size: 16.5px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 4px 0 2px; font-size: 14px; line-height: 1.35; }
.meta .mi { white-space: nowrap; } .meta .mk { color: var(--mute); font-weight: 500; } .meta .mv { color: var(--ink); font-weight: 800; }
.meta .mv.sg { color: var(--g2); } .meta .mv.sb { color: var(--blue); } .meta .sa { color: var(--mute); }
.kc { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 99px; font-weight: 700; font-size: 13px; background: #eef3e6; color: var(--g2); }
.kc.k-seed { background: #fdf3d8; color: #8a5a00; } .kc.k-pest { background: #fde8e8; color: var(--red); } .kc.k-equip { background: #e6eef8; color: var(--blue); }
.kc.k-micro { background: #e4f4f7; color: #0f6b7a; } .kc.k-bio { background: #e8f6e3; color: #2f6b1a; } .kc.k-other { background: #f0ece6; color: #6b5a44; }
/* organised bill check (owner 11 Nov 2026): numbered parts, summary strip, item state colours, hamali apart */
.sumstrip { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 12px; margin: 6px 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 14.5px; }
.sumstrip .sc { font-weight: 700; } .sumstrip .sc.ch { color: var(--amber); } .sumstrip .sc.fx { color: var(--red); } .sumstrip .sc.ok { color: var(--g2); }
.sech { margin-top: 14px; } .sech h3 { display: flex; align-items: center; gap: 8px; color: var(--ink); margin: 0; }
.secn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; } .lg { font-size: 12.5px; font-weight: 700; padding: 1px 8px 1px 6px; border-radius: 99px; border-left: 6px solid; background: #fff; }
.lg.as, .lc.st-as { border-left-color: #b8bfae; } .lg.ch, .lc.st-ch, .lc.st-adn { border-left-color: #e0a100; } .lg.sv, .lc.st-sv { border-left-color: var(--g); } .lg.ad, .lc.st-ad { border-left-color: var(--blue); }
.lc { border-left-width: 6px !important; border-left-style: solid; } .lc.st-ch, .lc.st-adn { background: #fffaf0; } .lc.st-sv { background: #f6fbef; } .lc.st-ad { background: #f3f7ff; }
.lc.needc { border-color: var(--red); }
.lcf { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; } .stc { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #f0f2ec; color: var(--mute); }
.stc.st-ch, .stc.st-adn { background: #fff1cc; color: #8a5a00; } .stc.st-sv { background: var(--okbg); color: var(--g2); } .stc.st-ad { background: var(--bluebg); color: var(--blue); }
.stc.pk { background: #eef3e6; color: var(--g2); } .stc.pn { background: var(--bluebg); color: var(--blue); }
.lca { display: flex; gap: 8px; margin-top: 8px; } .lca .btn { flex: 1; }
.dfs { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0; font-size: 13.5px; } .df s { color: var(--mute); } .df b { color: #8a5a00; }
.chr { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); } .chr:last-child { border-bottom: 0; }
.chr .tx { flex: 1; min-width: 0; } .chr .tx b { display: block; overflow-wrap: break-word; } .chr .s { display: block; color: var(--mute); font-size: 13px; } .chv { white-space: nowrap; color: #8a5a00; }
.nochg { margin: 2px 0 6px; }
/* adjustment line before the total (owner 11 Nov 2026) */
.adjb { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
.adjr { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.adjr .tx { flex: 1; min-width: 0; } .adjr .tx b { display: block; overflow-wrap: break-word; } .adjr .s { display: block; color: var(--mute); font-size: 13px; }
.adjr .neg { color: var(--red); white-space: nowrap; }
.sech h3 { flex: 1; min-width: 0; } .sech .btn { flex: none; white-space: nowrap; }
/* bill from a photo of the products (owner 11 Nov 2026) */
.photobill { width: 100%; margin: 6px 0 8px; }
.pbr { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .pbr .tx { flex: 1; min-width: 0; }
.pbr .t { display: block; font-weight: 700; overflow-wrap: break-word; } .pbr .s { display: block; color: var(--mute); font-size: 13.5px; }
.pbr.unsure { background: #fffaf0; } .pbr .stepper { flex: none; display: flex; align-items: center; gap: 6px; }
.pbr .stq { min-width: 28px; text-align: center; font-weight: 800; }
.fromlast { margin: 2px 0; font-size: 13px; font-weight: 700; color: var(--blue); }

/* v1.28: selling price typed on the item card: just the box, grey "SP" placeholder (owner 11 Nov 2026) */
.lcf { align-items: center; }
.lcf input.sellin { margin: 0 0 0 auto; width: 84px; height: 40px; padding: 0 10px; font-size: 17px; font-weight: 700; text-align: right; border: 2px solid var(--line, #d8dccf); border-radius: 10px; background: #fff; }
.lcf input.sellin::placeholder { color: #a3a89a; font-weight: 600; }
.lcf input.sellin.miss { border-color: var(--red); background: #fff5f4; }

/* v1.29: POS bill preview (owner 11 Nov 2026) */
.paper { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; } .paper .btn { min-width: 76px; }
.posprev { background: #e9ebe4; border-radius: 12px; padding: 10px; max-height: 46vh; overflow: auto; margin-bottom: 10px; }
.posprev img { display: block; width: 100%; max-width: 300px; margin: 0 auto; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
/* v1.29: Products page in groups by type */
.pgrp { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 16px; } .pgrp .ic { font-size: 20px; }
.pgrp .n { margin-left: auto; font-size: 13px; font-weight: 700; background: #eef2e6; color: var(--mute); padding: 2px 10px; border-radius: 99px; }
/* v1.30: GST screen. Each part is a real button that opens below it (rule: buttons look like buttons) */
.gsec { margin: 8px 0; }
.gsec > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; background: #fff; border: 2px solid #d8dccf; border-radius: 14px; cursor: pointer; font-weight: 700; font-size: 15px; }
.gsec > summary::-webkit-details-marker { display: none; }
.gsec > summary .ic { font-size: 20px; flex: 0 0 auto; } .gsec > summary .tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gsec > summary .n { flex: 0 0 auto; font-size: 13px; background: #eef2e6; color: var(--mute); padding: 2px 10px; border-radius: 99px; }
.gsec > summary .chev { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #d8dccf; border-radius: 99px; transition: transform .15s; }
.gsec[open] > summary { border-color: var(--g); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.gsec[open] > summary .chev { transform: rotate(90deg); }
.gsec > .bd { background: #fff; border: 2px solid var(--g); border-top: 0; border-radius: 0 0 14px 14px; padding: 8px 10px 10px; }
.gsec > .bd table.t { margin: 0; width: 100%; table-layout: fixed; } .gsec .t td, .gsec .t th { vertical-align: top; overflow-wrap: break-word; word-break: normal; }
.gsec .t td:first-child, .gsec .t th:first-child { width: 46%; } .gsec .t td.r, .gsec .t th.r { font-size: 14px; } .gsec .t small { display: inline-block; }
.gshop { display: flex; align-items: center; gap: 10px; } .gshop .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .gshop .s { color: var(--mute); font-size: 13.5px; }
.gprof .frow b { overflow-wrap: anywhere; text-align: right; }
.okline { color: #2f6b12; font-weight: 700; } .warnc { color: var(--red); font-weight: 700; }
button.lnk { font: inherit; font-weight: 700; padding: 2px 8px; border: 2px solid #c9d3b8; border-radius: 8px; background: #f6f9f0; color: inherit; cursor: pointer; }
.gl { padding: 9px 2px; border-bottom: 1px solid var(--line); } .gl:last-of-type { border-bottom: 0; }
.gl .gt { overflow-wrap: anywhere; } .gl .gt small { display: block; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.gl .gv { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; } .gl .gv span { display: inline-flex; flex-direction: column; white-space: nowrap; }
.gl .gv small { font-size: 12px; color: var(--mute); } .gl .gv b { font-size: 15px; } .gl .gv .hi b { color: var(--g2); }
/* v1.31: the tax consultant on a computer: a wider page, the GST parts side by side where there is room */
body.wide main { max-width: 960px; } body.wide .sheet { max-width: 640px; } body.wide .toast { max-width: 600px; }
body.wide .gl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px 20px; align-items: start; } body.wide .gl .gv { margin-top: 0; }
.desk .deskca { text-align: left; margin-top: 18px; } .desk .deskca .zk-google { margin-top: 10px; }
.bgrow { margin: -4px 0 8px 12px; } .chkl { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } .chkl .lnk { text-align: left; }
/* v1.33 (owner 12 Nov 2026): customer totals in two rows, day-wise square boxes (red = more given, green = more received), Day Close */
.stats .st3.r2 { border-top: 1px solid var(--line); } .stats .st3.r2:nth-child(4) { border-left: 0; } .st3.r2 b { font-size: 14.5px; }
.dleg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; font-size: 12.5px; color: var(--mute); }
.dleg .dlr { color: var(--red); } .dleg .dlg { color: var(--g2); }
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dgrid > .empty { grid-column: 1 / -1; }
.dbox { aspect-ratio: 1 / 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; padding: 7px 7px 8px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.dbox:active { transform: scale(.97); }
.dbox.out { background: var(--redbg); border-color: #f1b5ae; } .dbox.in { background: var(--okbg); border-color: #b9dc8f; }
.dbox .dd { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding-bottom: 3px; border-bottom: 1px solid rgba(0,0,0,.08); }
.dbox .dd b { font-size: 14px; white-space: nowrap; } .dbox .dd small { font-size: 11.5px; color: var(--mute); white-space: nowrap; }
.dbox .dl { display: flex; align-items: center; gap: 3px; min-width: 0; } .dbox .dl i { font-style: normal; font-size: 13px; flex: none; }
.dbox .dl b { font-size: 13px; white-space: nowrap; }
.dbox.out .dd b { color: var(--red); } .dbox.in .dd b { color: var(--g2); }
.qa.two { grid-template-columns: 1fr 1fr; }
.closed { background: var(--okbg); color: var(--g2); font-weight: 700; border-radius: 12px; padding: 8px 12px; text-align: center; }
.num.ok b { color: var(--g2); }
.list .item.due { margin-bottom: 6px; }
/* v1.34 (owner 12 Nov 2026): principal / interest panel, 3 columns per row */
.dues { margin: 10px 0 4px; } .dues h3 { margin: 6px 0 8px; }
.dfilter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.drange { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .drange .f { margin: 0 0 8px; } .drange input { min-width: 0; width: 100%; }
.drow { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 9px; margin-bottom: 8px; }
.drow h4 { margin: 0 2px 6px; font-size: 14.5px; color: var(--ink); }
.d3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dc { min-width: 0; background: var(--bg); border-radius: 10px; padding: 7px 6px; text-align: center; }
.dc small { display: block; font-size: 12px; color: var(--mute); line-height: 1.2; } .dc b { display: block; font-size: 14.5px; margin-top: 2px; white-space: nowrap; letter-spacing: -.2px; }
.dc.due { background: var(--redbg); } .dc.due b { color: var(--red); } .dc.ok { background: var(--okbg); } .dc.ok b { color: var(--g2); }
.stats.one { grid-template-columns: 1fr; }
.btn.dayclose { margin-top: 10px; }
.closed.open { background: var(--bluebg); color: var(--blue); } .closed.small { font-size: 14px; margin: 10px 0 0; padding: 6px 10px; }
.dayshut { background: var(--amberbg); color: var(--amber); font-weight: 700; border-radius: 12px; padding: 10px 12px; text-align: center; margin: 10px 0 0; }   /* owner 12 Nov 2026: Day Close at the bottom of the owner home, just above the search bar */
/* v1.38 (owner 12 Nov 2026, option C of 5): fine random paper grain on every screen, like a real khata book; replaces the v1.37 dots.
   A small tiling noise picture (made by the browser, no download); only a background image: text and cards are untouched. */
:root { --grain: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12  0 0 0 0 .18  0 0 0 0 .06  0 0 0 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E"); --grain-light: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12  0 0 0 0 .18  0 0 0 0 .06  0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E"); }
body, .findbar.bottom { background-image: var(--grain); background-size: 140px 140px; }
header.top { background-image: var(--grain-light); background-size: 140px 140px; }
/* owner 12 Nov 2026: the Shop Open button = a plain button whose icon keeps moving (a live green dot + a gently bobbing shop) */
.btn.shopopen { background: #fff; color: var(--g2); border-color: var(--g); gap: 10px; }
.shopopen .live { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; flex: none; }
.shopopen .live::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #22c55e; animation: kpulse 1.6s ease-out infinite; }
.shopopen .spin3 { display: inline-block; animation: kbob 2.4s ease-in-out infinite; }
@keyframes kpulse { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes kbob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-2px) rotate(-6deg); } 75% { transform: translateY(-2px) rotate(6deg); } }
/* the three checks before Shop Close (owner 12 Nov 2026): one card at a time */
.ckline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13.5px; color: var(--mute); margin: 4px 0 10px; }
.ckline span { padding: 3px 9px; border-radius: 99px; background: #fff; border: 1px solid var(--line); } .ckline span.on { background: var(--okbg); color: var(--g2); border-color: #b9dc8f; }
.ckline span.now { background: var(--g); color: #fff; border-color: var(--g); font-weight: 700; } .ckline i { font-style: normal; }
.ckcard, .ckdone { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin: 0 0 10px; }
.ckcard.cur { border: 2px solid var(--g); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.ckdone { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; } .ckdone .ckh { margin: 0; flex: 1; min-width: 50%; } .ckdone .ckres { flex-basis: 100%; }
.ckh { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--ink); font-size: 16px; }
.ckn { width: 24px; height: 24px; border-radius: 50%; background: var(--g); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
table.ck tr.cktot td { font-weight: 800; border-top: 2px solid var(--ink); } table.ck tr.sub td { color: var(--mute); font-size: 14px; }
.mtag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--okbg); color: var(--g2); }
.mtag.m-upi { background: var(--bluebg); color: var(--blue); } .mtag.m-bank { background: var(--amberbg); color: var(--amber); }
.ckres { border-radius: 10px; padding: 7px 10px; margin: 8px 0 4px; font-size: 14px; }
.ckres.ok { background: var(--okbg); color: var(--g2); } .ckres.bad { background: var(--redbg); color: var(--red); } .ckres.stale { background: var(--amberbg); color: var(--amber); }
.ckcard .row2 { margin-top: 10px; } details.more { margin-top: 12px; }
.lowline.bad { background: var(--redbg); color: var(--red); border-color: #f1b5ae; }
table.ck { width: 100%; }
.ckline span.bad { background: var(--redbg); color: var(--red); border-color: #f1b5ae; }
/* Products (owner 12 Nov 2026): category bar on top + compact rows */
.ptop h1 { margin-bottom: 8px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .row3 .btn { min-height: 40px; padding: 4px 6px; font-size: 13.5px; line-height: 1.15; }
.catbar { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; margin: 4px 0 6px; background: var(--bg); }
.catbar::-webkit-scrollbar { display: none; }
.catbar .pcat { flex: none; white-space: nowrap; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.catbar .pcat .pcn { font-weight: 600; color: var(--mute); font-size: 12.5px; } .catbar .pcat.on { background: var(--g); border-color: var(--g); color: #fff; } .catbar .pcat.on .pcn { color: #e8f5d0; }
.pg2 { margin: 10px 2px 4px; font-size: 14px; color: var(--mute); } .pg2 span { font-weight: 600; font-size: 12.5px; }
.plst { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pr2 { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pr2:first-child { border-top: 0; } .pr2.off { opacity: .6; } .pr2:active { background: #f6f9ef; }
.pr2 .pimg { width: 34px; height: 34px; font-size: 18px; flex: none; }
.pr2 .tx { flex: 1; min-width: 0; } .pr2 .t { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.2; overflow-wrap: anywhere; } .pr2 .s { display: block; font-size: 12.5px; color: var(--mute); }
.pr2 .pst { flex: none; text-align: right; line-height: 1.1; } .pr2 .pst b { display: block; font-size: 15px; } .pr2 .pst small { font-size: 11.5px; color: var(--mute); } .pr2 .pst.get b { color: var(--red); }
.pr2 .chev { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--g2); font-weight: 800; font-size: 13px; }

/* bill discount line (owner 12 Nov 2026) */
#dline { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: nowrap; } #dline > span:first-child { min-width: 0; overflow-wrap: anywhere; }
#dline .dl { display: inline-flex; align-items: center; gap: 5px; flex: none; } #dline b.red { color: var(--red); white-space: nowrap; }
#dline .dl .btn.sm { padding: 4px 9px; min-height: 32px; } #dline .dl .x { width: 32px; height: 32px; }

/* preview (owner 13 Nov 2026, "let's see how it looks"): billing categories as a bar on top; the left rail stays the default */
.picker.top { grid-template-columns: 1fr; gap: 6px; }
.picker.top .rail { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 3; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 6px 0; background: var(--bg); }
.picker.top .rk { flex-direction: row; gap: 5px; padding: 6px 11px; border-radius: 99px; font-size: 14px; white-space: nowrap; }
.picker.top .rk .ic { font-size: 17px; }

/* billing: Photo beside the search bar (owner 13 Nov 2026) */
.srow { display: flex; align-items: stretch; gap: 8px; margin: 10px 0 12px; } .srow .findbar { flex: 1; min-width: 0; margin: 0; }
.srow .sphoto { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; min-height: 46px; border-radius: 14px; font-size: 14.5px; font-weight: 800; white-space: nowrap; cursor: pointer; }
/* v1.44 shop lock (owner 13 Nov 2026): one screen over the whole app for a sales person away from the shop */
#geoLock { position: fixed; inset: 0; z-index: 2147482000; background: #f7faf2; display: flex; align-items: center; justify-content: center; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; }
#geoLock .gl-in { width: 100%; max-width: 420px; text-align: center; }
#geoLock .gl-ic { font-size: 64px; line-height: 1; margin-bottom: 12px; }
#geoLock .gl-spin { animation: glpulse 1.4s ease-in-out infinite; }
@keyframes glpulse { 50% { transform: scale(.85); opacity: .6; } }
#geoLock h1 { margin: 0 0 10px; font-size: 24px; overflow-wrap: anywhere; }
#geoLock p { font-size: 16px; line-height: 1.45; margin: 0 0 14px; overflow-wrap: anywhere; }
#geoLock .btn { margin-top: 8px; }
body.geolocked { overflow: hidden; }
.geob { margin-top: 6px; }
.geob .geogot { min-height: 1.2em; color: var(--g2); font-weight: 600; }
body.geolocked .modal { z-index: 2147482500; }   /* the Help sheet opens above the lock screen */
