/* MBook — simple billing (3 Nov 2026). FlipBoard look + phone layout on every page (19 Nov 2026). */
:root {
  --bg: #f1f5f9; --card: #ffffff; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --brand: #3b82f6; --brand-2: #2563eb; --brand-soft: #eff6ff;
  --green: #10b981; --red: #ef4444; --amber: #f59e0b; --blue: #3b82f6; --purple: #8b5cf6;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; padding: 40px 16px; }
.hidden { display: none !important; }

/* ── frame: top bar + chip tabs (like FlipBoard) ── */
.shell { min-height: 100vh; }
.fb-head { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(15, 23, 42, .04); }
.fb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1240px; margin: 0 auto; padding: 12px 24px 8px; }
.fb-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -.01em; }
.fb-brand i, .logo i { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 18px; box-shadow: 0 4px 10px rgba(59, 130, 246, .3); }
.fb-lock { border: 1px solid #fecaca; background: #fff; color: #dc2626; border-radius: 10px; padding: 7px 13px; font-weight: 700; font-size: 14px; cursor: pointer; }
.fb-lock:hover { background: #fef2f2; }
.fb-tabs { display: flex; gap: 8px; max-width: 1240px; margin: 0 auto; padding: 4px 24px 12px; overflow-x: auto; scrollbar-width: none; }
.fb-tabs::-webkit-scrollbar { display: none; }
.fb-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: #334155; font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s; }
.fb-tab:hover { border-color: #cbd5e1; background: #f8fafc; }
.fb-tab.on { background: #0f172a; border-color: #0f172a; color: #fff; }
.fb-fab { position: fixed; right: 22px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; z-index: 25;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-size: 30px; font-weight: 400; box-shadow: 0 8px 20px rgba(37, 99, 235, .4); }
.fb-fab:hover { transform: translateY(-1px); }
main { padding: 20px 24px 90px; max-width: 1240px; width: 100%; margin: 0 auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* old layout parts, no longer drawn */
.side, .bottomnav { display: none; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; padding: 4px 10px 18px; }

/* ── cards & stats ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 23px; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat.s1 { border-left: 5px solid var(--blue); } .stat.s2 { border-left: 5px solid var(--green); }
.stat.s3 { border-left: 5px solid var(--red); } .stat.s4 { border-left: 5px solid var(--purple); }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.chart { width: 100%; height: 190px; display: block; }
.quick { display: grid; gap: 10px; }
.quick .btn { justify-content: center; padding: 13px; }

/* ── buttons & forms ── */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 15px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; color: #334155; transition: background .15s, border-color .15s; }
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(59, 130, 246, .25); }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.green { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.btn.green:hover { background: #d1fae5; }
.btn.danger { color: #dc2626; border-color: #fecaca; background: #fff; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fld { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 150px; }
.fld > span { font-size: 13px; font-weight: 600; color: #475569; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 11px; background: #fff; width: 100%; min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #bfdbfe; border-color: var(--brand); }
textarea { resize: vertical; min-height: 64px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

/* ── tables ── */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); font-weight: 700; }
table.list td { padding: 11px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.list tr.click { cursor: pointer; } table.list tr.click:hover td { background: #f8fafc; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; border: 1px solid transparent; vertical-align: middle; }
.pill.paid { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .pill.partial { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.pill.unpaid { background: #fef2f2; color: #b91c1c; border-color: #fecaca; } .pill.cancelled { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { max-width: 320px; }
.seg { display: inline-flex; background: #f1f5f9; border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--brand); color: #fff; box-shadow: 0 2px 6px rgba(59, 130, 246, .3); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ── bill form ── */
.lines { width: 100%; border-collapse: collapse; }
.lines th { font-size: 12px; color: var(--muted); text-align: left; padding: 6px; }
.lines td { padding: 5px 4px; vertical-align: top; }
.lines input, .lines select { padding: 8px; }
.lines .c-name { min-width: 200px; } .lines .c-qty { width: 80px; } .lines .c-rate { width: 110px; }
.lines .c-disc { width: 70px; } .lines .c-gst { width: 86px; } .lines .c-amt { width: 110px; text-align: right; padding-top: 13px; font-weight: 700; }
.lines .del { border: 0; background: none; color: var(--red); font-size: 22px; cursor: pointer; padding: 6px; }
.sugg { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(15, 23, 42, .14); max-height: 260px; overflow: auto; min-width: 260px; }
.sugg div { padding: 9px 12px; cursor: pointer; } .sugg div:hover, .sugg div.on { background: var(--brand-soft); }
.rel { position: relative; }
.totals { margin-left: auto; width: 100%; max-width: 340px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; font-size: 20px; font-weight: 800; }
.bill-foot { display: grid; grid-template-columns: 1fr 340px; gap: 18px; margin-top: 14px; }

/* ── bill view ── */
.bill-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bill-head h2 { margin: 0 0 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.paylist div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }

/* ── login ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 15%, #dbeafe, #f1f5f9 55%); }
.login .card { width: 100%; max-width: 360px; text-align: center; padding: 30px 24px; box-shadow: 0 20px 45px rgba(15, 23, 42, .12); }
.login .logo { justify-content: center; color: var(--ink); padding-bottom: 6px; }
.pin { font-size: 26px; letter-spacing: 10px; text-align: center; }

/* ── modal ── */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 20px; box-shadow: 0 24px 50px rgba(15, 23, 42, .2); }
.modal h3 { margin: 0 0 14px; font-size: 19px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 99; font-weight: 600;
  max-width: calc(100vw - 32px); box-shadow: 0 10px 24px rgba(15, 23, 42, .25); }

/* dropdowns + last rate on the bill form */
input.picker { padding-right: 28px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center; }
.sugg { top: 100%; left: 0; } .sugg.wide { right: 0; } .sugg p { margin: 0; padding: 10px 12px; }
.lines .c-last { width: 128px; }
.lastrate { border: 1px solid var(--line); background: var(--brand-soft); border-radius: 8px; padding: 3px 7px; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.lastrate b { display: block; font-size: 13px; } .lastrate span { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
/* simple bill screen */
.bill-simple .adv { display: none !important; }
.lines input[data-k="rate"]::placeholder { color: #94a3b8; opacity: 1; }
.lastinfo { margin-top: 10px; display: grid; gap: 3px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.lastinfo:empty { display: none; } .lastinfo .due { color: var(--red); }
/* no Disc / GST on bills */
.lines .adv { display: none !important; }
.deliv .fld { flex: 1 1 170px; }
.lines:not(.has-gst) .adv-gst { display: none !important; }
.duedate { padding: 10px 0; font-weight: 700; }
/* delivery + courier stay under the Item column, clear of Qty / Rate / Amount */
@media (min-width: 721px) { .deliv { max-width: 56%; } }
/* number columns: heading lines up with the amounts */
.list th.num, .list td.num { text-align: right; }
.ledger-table { table-layout: fixed; width: 100%; } .ledger-table th:nth-child(1) { width: 15%; } .ledger-table th:nth-child(2) { width: 31%; }
.ledger-table th:nth-child(3), .ledger-table th:nth-child(4), .ledger-table th:nth-child(5) { width: 18%; }

/* ── ledger ── */
.lg-up { align-items: center; gap: 12px; }
.lg-card { text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.lg-card:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, .08); }
.tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.tabs button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; font: inherit; font-weight: 700; color: #475569; cursor: pointer; border-radius: 12px; }
.tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(59, 130, 246, .25); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input[type=search] { width: auto; min-width: 150px; padding: 8px 10px; }
.filters input[type=search] { flex: 1 1 220px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: #334155; white-space: nowrap; }
.chip b { margin-left: 4px; background: #f1f5f9; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.chip.on { background: #0f172a; border-color: #0f172a; color: #fff; } .chip.on b { background: rgba(255, 255, 255, .2); }
.lgrow { display: grid; grid-template-columns: 96px minmax(0, 1fr) 120px 230px 150px; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.lg-date { white-space: nowrap; font-size: 13px; color: var(--muted); }
.lg-narr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-amt { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lgrow .mpick { width: 100%; padding: 8px; }
.lg-act { display: flex; gap: 6px; justify-content: flex-end; }
.lgrow .pill { margin-top: 4px; }
.pick-list { max-height: 55vh; overflow: auto; margin-top: 10px; display: grid; gap: 6px; }
.pick-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.pick-row:hover { background: var(--brand-soft); }
.lgrow-p { grid-template-columns: 96px minmax(0, 1fr) 120px 210px; }
@media (max-width: 900px) {
  .lgrow { grid-template-columns: 1fr auto; } .lg-date { grid-column: 1 / -1; } .lgrow .mpick { grid-column: 1 / -1; } .lg-act { grid-column: 1 / -1; }
  .lgrow-p { grid-template-columns: 1fr auto; }
}

/* ── tablets ── */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── phones: every page ── */
@media (max-width: 860px) {
  body { font-size: 15px; }
  .fb-bar { padding: 10px 14px 6px; }
  .fb-brand { font-size: 19px; } .fb-brand i { width: 30px; height: 30px; font-size: 16px; }
  .fb-lock { padding: 6px 10px; }
  .fb-tabs { padding: 4px 14px 10px; gap: 6px; }
  .fb-tab { padding: 7px 12px; font-size: 13px; }
  .fb-fab { right: 16px; bottom: 18px; width: 56px; height: 56px; }
  main { padding: 14px 12px 96px; }
  .top { margin-bottom: 12px; }
  .top h1 { font-size: 21px; }
  .top > .btn.primary[href="#/new"] { display: none; }   /* the round + button does this on phones */
  .actions { width: 100%; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .card { padding: 14px; border-radius: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .stats[style] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .stats[style] > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 19px; overflow-wrap: anywhere; }
  .grid2, .bill-foot, .form-grid { grid-template-columns: 1fr; }
  .fld { min-width: 0; flex: 1 1 140px; }
  .fld[style*="flex:2"] { flex-basis: 100% !important; }
  input, select, textarea { font-size: 16px !important; }   /* stops iPhone zooming into a box */
  .hide-sm { display: none; }
  .toolbar input { max-width: none; }
  .seg { width: 100%; overflow-x: auto; } .seg button { flex: 1 0 auto; }
  .totals { max-width: none; }
  .row > .btn.primary#save { width: 100%; justify-content: center; }

  /* tables turn into cards: the first cell is the heading, the rest are label / value pairs */
  table.list, table.list tbody { display: block; }
  table.list thead { display: none; }
  table.list tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line);
    border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
  table.list tr.click:hover td { background: none; }
  table.list tr.click:active { background: #f8fafc; }
  table.list td { display: block; padding: 0; border: 0; text-align: left !important; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  table.list td:first-child { grid-column: 1 / -1; font-size: 15.5px; }
  table.list td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
  table.list td.hide-sm[data-l] { display: block; }
  table.list td:empty { display: none; }
  table.list td:last-child:not([data-l]) { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
  table.list td:last-child:not([data-l]) .btn { flex: 0 0 auto; }
  table.list td.empty { grid-column: 1 / -1; }
  .card > table.list, .card > div > table.list { margin-top: 10px !important; }
  .card:has(> table.list):not(:has(.bill-head)), .card:has(> div > table.list) { background: none; border: 0; box-shadow: none; padding: 0; }
  .card:has(.bill-head) table.list tr { background: #f8fafc; box-shadow: none; }
  .ledger-table { table-layout: auto; }
  .card[style*="overflow-x"] { overflow: visible !important; }
  div[style*="overflow-x:auto"] { overflow: visible !important; }

  /* bill items on the form */
  .lines thead { display: none; }
  .lines tbody { display: block; }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; background: #f8fafc; position: relative; }
  .lines td { padding: 0; }
  .lines td.c-name { grid-column: 1 / -1; padding-right: 34px; }
  .lines td:last-child { position: absolute; top: 6px; right: 4px; }
  .lines .c-qty, .lines .c-rate, .lines .c-disc, .lines .c-gst, .lines .c-last { width: auto; }
  .lines .c-amt { padding-top: 18px; text-align: right; font-size: 16px; }
  .lines td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
  .deliv { max-width: none; }

  /* ledger */
  .lg-up { width: 100%; }
  .lg-up > span { width: 100%; }
  .lg-up .btn { flex: 1 1 auto; justify-content: center; }
  .tabs { overflow-x: auto; } .tabs button { flex: 1 0 auto; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters select { flex: 0 0 auto; }
  .filters input[type=search] { flex: 0 0 100%; order: -1; min-width: 0; }
  #lgbody .filters { flex-wrap: wrap; overflow: visible; }
  #lgbody .filters .chip { flex: 0 0 auto; }
  #lgbody .filters select { flex: 1 1 100%; }
  .lgrow, .lgrow-p { grid-template-columns: 1fr auto; gap: 8px; padding: 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
  #lgbody:has(.lgrow) { background: none; border: 0; box-shadow: none; padding: 0; }
  .lg-who { min-width: 0; }
  .lg-narr { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
  .lg-act .btn { flex: 1; justify-content: center; padding: 10px; }
  .lg-amt { font-size: 16px; }

  /* bill view */
  .bill-head > div[style] { text-align: left !important; }
  .paylist div { flex-wrap: wrap; }

  /* pop-ups slide up from the bottom */
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal .foot { position: sticky; bottom: -18px; background: #fff; padding-top: 10px; flex-wrap: wrap; }
  .modal .foot .btn { flex: 1 1 auto; justify-content: center; padding: 12px; }
  .pick-list { max-height: 60vh; }
}
@media (max-width: 720px) { .lines .c-last { width: auto; } }
@media (max-width: 380px) {
  .stats, .stats[style] { grid-template-columns: 1fr 1fr !important; }
  .fb-lock span { display: none; }
}

/* ── 19 Nov: bill preview, reminders, keyboard on phones ── */
.modal.wide { max-width: 760px; }
.pdfview { background: #e2e8f0; border-radius: 12px; padding: 10px; display: grid; gap: 10px; max-height: 68vh; overflow: auto; }
.pdfview canvas { display: block; background: #fff; border-radius: 4px; box-shadow: 0 2px 8px rgba(15, 23, 42, .15); }
.bill-go { gap: 10px; }
.remind-ask { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 10px 12px; }
.remind-ask small { font-size: 12px; }
.rem-add { margin: 10px 0 6px; align-items: flex-end; }
.rem-list { display: grid; gap: 8px; margin-top: 10px; }
.rem-row { display: grid; grid-template-columns: minmax(0, 1fr) 260px auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.rem-row b { overflow-wrap: anywhere; }
.rem-log { margin-top: 12px; } .rem-log summary { cursor: pointer; font-weight: 700; color: var(--muted); } .rem-log div { padding: 4px 0; border-bottom: 1px solid #f1f5f9; }
@media (max-width: 860px) {
  .bill-go .btn { flex: 1 1 0; justify-content: center; }
  .rem-row { grid-template-columns: 1fr auto; } .rem-row b { grid-column: 1 / -1; }
  .rem-add .btn { margin-top: 0 !important; width: 100%; justify-content: center; }
  .pdfview { max-height: 62vh; padding: 6px; }
  /* keyboard open: the top bar scrolls away with the page, tabs and the round + button hide */
  body.kb-open .fb-head { position: static; box-shadow: none; }
  body.kb-open .fb-tabs, body.kb-open .fb-fab, body.kb-open .toast { display: none !important; }
  body.kb-open main { padding-bottom: 24px; }
}

/* (20 Nov) this client's last price for the item, under the rate box and in the item list */
.last-hint { color: #047857; margin-top: 2px; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.sugg .last-rate { color: #047857; }
