/* Bayview Family Dental (a sample business): paying a statement, and the billing office behind it. store.js builds it.
   Laid out like a hosted invoice page (Research/checkout-demos-2026-11-15/real/REAL.md, Bills): a grey page, one centred
   column, the amount card first (amount, due date, To and From, the statement details folded away), then the payment
   card (how much, the method as tiles, one card box, the button), small print under it. One teal, system type. */
.bv {
  --ink: #1a1f24; --muted: #66707a; --soft: #8a939c; --line: #e3e6ea; --wash: #f4f5f7; --teal: #0f7c80; --teal-d: #0b6265;
  --ck-font: -apple-system, BlinkMacSystemFont, 'Geist', system-ui, sans-serif; --ck-text: var(--ink); --ck-label: #3a4148; --ck-muted: var(--muted);
  --ck-field: #fff; --ck-line: #d5d9de; --ck-accent: var(--teal); --ck-ring: rgba(15, 124, 128, 0.18); --ck-radius: 6px; --ck-ph: #9aa2aa;
  --ck-err: #b42318; --ck-err-bg: #fef3f2; --ck-wallet-radius: 6px;
  background: var(--wash); color: var(--ink); font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, 'Geist', system-ui, sans-serif; min-height: 80vh;
}
.bv h2, .bv h3 { margin: 0; }
.bv button { cursor: pointer; }
.bv :focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.bv-in { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.bv-head .bv-in { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.bv-logo { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; font-size: 16px; }
.bv-mark { width: 26px; height: 26px; }
.bv-sampletag { margin: 0 0 0 auto; color: var(--soft); font-size: 13px; }

.bv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; background: var(--teal); color: #fff; border: 0; border-radius: 6px; font: inherit; font-weight: 600; font-size: 16px; }
.bv-btn:hover:not(:disabled) { background: var(--teal-d); }
.bv-btn:disabled { opacity: 0.75; }
.bv-btn2 { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; background: #fff; color: var(--ink); border: 1px solid #d5d9de; border-radius: 6px; font: inherit; font-weight: 500; font-size: 14px; }
.bv-btn2:hover { border-color: #9aa2aa; }
.bv-link { padding: 0; background: none; border: 0; color: var(--teal); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.bv-note { margin: 0; color: var(--muted); font-size: 13.5px; }
.bv-stmt, .bv-pay, .bv-findcard, .bv-donecard { background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgba(16, 24, 32, 0.06), 0 6px 20px rgba(16, 24, 32, 0.06); }

/* find the statement */
.bv-find { padding: 32px 0 72px; }
.bv-find .bv-in { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 300px); justify-content: center; gap: 48px; align-items: start; }
.bv-findcard { padding: 28px; }
.bv-findcard h2 { font-size: 22px; font-weight: 600; line-height: 1.25; }
.bv-lede { margin: 6px 0 20px; color: var(--muted); }
.bv-findform { display: grid; gap: 16px; }
#bv-acct { font-variant-numeric: tabular-nums; }
.bv-notfound { padding: 10px 12px; background: var(--ck-err-bg); color: var(--ck-err); border-radius: 6px; font-size: 14px; }
.bv-findgo { width: 100%; }
.bv-sbx { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.bv-sbx p { margin: 0 0 2px; }
.bv-findside { display: grid; gap: 24px; padding-top: 6px; }
.bv-paper { width: 100%; height: auto; }
.bv-sms h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.bv-bubble { margin: 0 0 12px; padding: 10px 12px; background: #e9ebee; border-radius: 16px 16px 16px 4px; font-size: 14px; line-height: 1.45; }
.bv-url { color: #0b57d0; text-decoration: underline; overflow-wrap: anywhere; }
.bv-sms .bv-btn2 { margin-bottom: 6px; }

/* the statement and the payment, one column */
.bv-bill { padding: 24px 0 64px; }
.bv-col { max-width: 560px; margin: 0 auto; padding: 0 16px; display: grid; gap: 16px; }
.bv-stmt { padding: 24px 28px 8px; }
.bv-amt { margin: 0; }
.bv-amt b { font-size: 34px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.bv-duedate { margin: 2px 0 16px; color: var(--muted); }
.bv-meta { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.bv-meta div { display: contents; }
.bv-meta dt { color: var(--muted); }
.bv-meta dd { margin: 0; }
.bv-visits { margin-top: 14px; border-top: 1px solid var(--line); }
.bv-visits summary { display: flex; align-items: center; gap: 6px; min-height: 48px; color: var(--teal); font-weight: 500; font-size: 14px; cursor: pointer; list-style: none; }
.bv-visits summary::-webkit-details-marker { display: none; }
.bv-visits summary::after { content: ''; width: 6px; height: 6px; margin-left: 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.bv-visits[open] summary::after { transform: rotate(45deg) translate(-2px, -1px); }
.bv-count { margin-left: auto; order: 2; color: var(--soft); font-weight: 400; font-size: 13.5px; }
.bv-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bv-table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12.5px; padding: 6px 6px; }
.bv-table thead th { border-bottom: 1px solid var(--line); }
.bv-table td { padding: 8px 6px; vertical-align: top; border-bottom: 1px solid #eef0f2; }
.bv-table .r { text-align: right; white-space: nowrap; }
.bv-table th:first-child, .bv-table td:first-child { padding-left: 0; }
.bv-table th:last-child, .bv-table td:last-child { padding-right: 0; }
.bv-date th { padding: 14px 0 2px; color: var(--ink); font-weight: 600; font-size: 13px; }
.bv-svc { display: block; }
.bv-code { color: var(--soft); font-size: 12px; }
.bv-you { font-weight: 600; }
.bv-table tfoot th, .bv-table tfoot td { padding-top: 10px; border-bottom: 0; color: var(--ink); font-weight: 600; }
.bv-visits .bv-note { margin-bottom: 16px; }

.bv-pay { padding: 24px 28px 28px; display: grid; gap: 22px; align-content: start; }
.bv-pay fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 0; }
.bv-pay legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 15px; }
/* how much: one radio list, rows joined like a hosted checkout's payment-method list */
.bv-amounts { border: 0; }
.bv-opt { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 2px 12px; padding: 13px 14px; border: 1px solid #d5d9de; cursor: pointer; background: #fff; }
.bv-opt + .bv-opt, .bv-partbox + .bv-opt { margin-top: -1px; }
.bv-amounts > .bv-opt:first-of-type { border-radius: 6px 6px 0 0; }
.bv-amounts > .bv-opt:last-of-type { border-radius: 0 0 6px 6px; }
.bv-opt input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--teal); }
.bv-optt { display: flex; justify-content: space-between; gap: 12px; }
.bv-optt b { font-weight: 500; }
.bv-optv { font-variant-numeric: tabular-nums; }
.bv-optsub { grid-column: 2; color: var(--muted); font-size: 13px; }
.bv-opt:has(input:checked) { border-color: var(--teal); z-index: 1; }
.bv-partbox, .bv-planbox { padding: 12px 14px 14px 44px; border: 1px solid #d5d9de; border-top: 0; margin-top: -1px; background: #fbfbfc; }
.bv-planbox { margin-top: -1px; }
.bv-money { position: relative; }
.bv-money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.bv-money input { padding-left: 26px !important; max-width: 180px; }
.bv-sched { list-style: none; margin: 0 0 12px; padding: 0; }
.bv-sched li { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--muted); border-bottom: 1px solid #eef0f2; font-variant-numeric: tabular-nums; }
.bv-sched b { color: var(--ink); font-weight: 500; }
.bv-consent { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.45; cursor: pointer; color: #3a4148; }
.bv-consent input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--teal); }
/* the payment method as tiles */
.bv-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 8px; margin-bottom: 14px; }
.bv-walletp { margin: 0 0 12px; color: #5b6470; font-size: 13.5px; }
.bv-seg label { position: relative; }
.bv-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.bv-seg span { display: grid; justify-items: start; gap: 4px; padding: 10px 12px; border: 1px solid #d5d9de; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: #3a4148; }
.bv-seg svg { width: 18px; height: 14px; }
.bv-seg input:checked + span { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); color: var(--teal-d); }
.bv-seg input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.bv-cardp, .bv-bankp { display: grid; gap: 14px; }
.bv-hsa { margin: -4px 0 0; color: var(--muted); font-size: 13px; }
.bv-type { display: flex !important; flex-wrap: wrap; gap: 4px 20px !important; }
.bv-type legend { font-size: 13.5px !important; font-weight: 500 !important; margin-bottom: 4px !important; width: 100%; color: #3a4148; }
.bv-type label { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; font-size: 14px; }
.bv-type input { width: 16px; height: 16px; accent-color: var(--teal); margin: 0; }
.bv-bankp .bv-sbx { margin-top: 0; padding: 10px 12px; border: 0; background: var(--wash); border-radius: 6px; }
.bv-auth { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.bv .ck-field label, .bv .ck-jlabel { font-size: 13.5px; font-weight: 500; }
.bv .ck-field input { min-height: 44px; font-size: 15px; }
.bv-paybar { display: grid; gap: 10px; }
.bv-todayline { display: none; }
.bv-paybtn { width: 100%; }
.bv-foot { display: grid; gap: 4px; justify-items: center; padding: 4px 0 0; text-align: center; color: var(--soft); font-size: 12.5px; }
.bv-foot p { margin: 0; }
.bv-foot .ck-secure { margin: 0; justify-content: center; }
.bv-foot .bv-link { font-size: inherit; }

/* the receipt */
.bv-done { padding: 24px 0 64px; }
.bv-done:focus { outline: none; }
.bv-donecard { max-width: 528px; margin: 0 auto; padding: 28px; }
.bv-donetop { display: grid; gap: 10px; margin-bottom: 18px; }
.bv-ok { width: 36px; height: 36px; }
.bv-donetop h2 { font-size: 22px; font-weight: 600; line-height: 1.25; }
.bv-donesub { margin: 2px 0 0; color: var(--muted); }
.bv-rec { margin: 0 0 20px; border-top: 1px solid var(--line); font-size: 14px; }
.bv-rec div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #eef0f2; }
.bv-rec dt { color: var(--muted); }
.bv-rec dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bv-big { font-size: 18px; font-weight: 600; }
.bv-muted { color: var(--muted); }
.bv-paid { color: #1d6b3a; }
.bv-proc { color: #8a5a00; }
.bv-schedwrap { margin-bottom: 20px; }
.bv-schedwrap h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.bv-sched-done li { display: grid; grid-template-columns: 1fr auto 90px; gap: 12px; }
.bv-sched-done li em { font-style: normal; font-size: 13px; text-align: right; }
.bv-sched-done li.is-paid em { color: var(--teal-d); font-weight: 500; }
.bv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bv-actions .bv-btn { min-height: 40px; font-size: 14px; padding: 0 16px; }

/* the receipt email */
.bv-mail { background: #fff; color: #1a1f24; font-family: -apple-system, BlinkMacSystemFont, 'Geist', system-ui, sans-serif; }
.bvm-head { display: flex; align-items: center; gap: 10px; padding: 6px 0 18px; font-weight: 600; }
.bvm-head svg { width: 26px; height: 26px; }
.bvm-in { padding: 0 0 6px; }
.bvm-in h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.bvm-in p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: #3a4148; }
.bvm-amt { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; background: #f4f5f7; border-radius: 6px; }
.bvm-amt b { font-size: 22px; font-weight: 600; color: #1a1f24; }
.bvm-t { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14px; }
.bvm-t td { padding: 8px 0; border-bottom: 1px solid #eef0f2; }
.bvm-t td:first-child { color: #66707a; }
.bvm-t td:last-child { text-align: right; }
.bvm-plan { font-size: 14px !important; }
.bvm-small { color: #66707a !important; font-size: 13px !important; }
.bvm-foot { margin: 0; padding: 14px 0 6px; border-top: 1px solid #eef0f2; color: #8a939c; font-size: 12.5px; }

/* ---- the billing office (owner): an admin dashboard ---- */
.bo { background: #f1f1f1; color: #1a1a1a; font: 400 14px/1.45 -apple-system, BlinkMacSystemFont, 'Geist', system-ui, sans-serif; padding-bottom: 56px; }
.bo-in { max-width: 1240px; margin: 0 auto; padding: 22px 32px; }
.bo-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; }
.bo-head .bv-logo { font-size: 15px; color: #6b6b6b; }
.bo-head h2 { margin: 0 auto 0 0; font-size: 20px; font-weight: 700; }
.bo-head h2:focus { outline: none; }
.bo-date { margin: 0; color: #6b6b6b; font-size: 13.5px; }
.bo-wait { margin: 0 0 14px; padding: 12px 14px; background: #fff; border-radius: 10px; color: #4a4a4a; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04); }
.bo-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.bo-stats > div, .bo-card { padding: 14px 16px; background: #fff; border-radius: 10px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04); min-width: 0; }
.bo-stats p { margin: 0; color: #4a4a4a; font-size: 13px; font-weight: 500; }
.bo-stats b { display: block; margin: 4px 0 2px; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bo-stats span { color: #6b6b6b; font-size: 13px; }
.bo-card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.bo-aging { margin-bottom: 14px; }
.bo-agetot { margin: -4px 0 10px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bo-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #ececec; }
.bo-bar span { height: 100%; background: var(--c); }
.bo-bar span + span { border-left: 2px solid #fff; }
.b0 { --c: #0f7c80; } .b1 { --c: #63aeb1; } .b2 { --c: #d49a2a; } .b3 { --c: #c4321f; }
.bo-agetable { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bo-agetable th { text-align: left; font-weight: 500; color: #6b6b6b; font-size: 12.5px; padding: 6px 0; }
.bo-agetable td { padding: 7px 0; border-top: 1px solid #ebebeb; }
.bo-agetable .r { text-align: right; }
.bo-agetable i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 2px; background: var(--c); }
.bo-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.bo-detail { grid-column: 2; }
.bo-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bo-table th { text-align: left; font-weight: 500; color: #6b6b6b; font-size: 12.5px; padding: 8px 10px; background: #f7f7f7; }
.bo-table td { padding: 10px; border-top: 1px solid #ebebeb; vertical-align: top; }
.bo-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bo-table small, .bo-plans small { display: block; color: #8a8a90; font-size: 12.5px; }
.bo-table tr.is-new td { background: #eef7f7; }
.bo-new { margin-left: 4px; color: #0b6265; font-weight: 600; font-size: 12.5px; }
.bo-st { display: inline-flex; align-items: center; gap: 6px; }
.bo-st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #2e9d5b; }
.bo-st.is-proc::before { background: #d49a2a; }
.bo-plans { list-style: none; margin: 0; padding: 0; }
.bo-plans li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 9px 0; border-top: 1px solid #ebebeb; font-variant-numeric: tabular-nums; }
.bo-plans li.is-new { background: #eef7f7; margin: 0 -16px; padding: 9px 16px; }
.bo-plans .r { text-align: right; }
.bo-detail p { margin: 0 0 10px; color: #4a4a4a; }
.bo-money { margin: 0 0 14px; }
.bo-money div { display: flex; justify-content: space-between; padding: 3px 0; }
.bo-money dd { margin: 0; font-variant-numeric: tabular-nums; }
.bo-money div:last-child { font-weight: 600; border-top: 1px solid #ebebeb; margin-top: 4px; padding-top: 7px; }
.bo .ck-tl { color: #1a1a1a; }
.bo .bv-logo .bv-mark { width: 22px; height: 22px; }

@media (max-width: 1100px) {
  .bo-grid { grid-template-columns: minmax(0, 1fr); }
  .bo-detail { grid-column: auto; }
}
@media (max-width: 600px) {
  .bv-table thead { display: none; }
  .bv-table tbody tr:not(.bv-date), .bv-table tfoot tr { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 0; border-bottom: 1px solid #eef0f2; }
  .bv-table tbody tr:not(.bv-date) td, .bv-table tfoot tr > * { padding: 0; border: 0; }
  .bv-table td[data-k] { grid-column: 1; display: flex; justify-content: space-between; max-width: 240px; color: var(--muted); font-size: 12.5px; }
  .bv-table td[data-k]::before { content: attr(data-k); }
  .bv-table td.bv-you { grid-column: 2; grid-row: 1; }
  .bv-table tfoot td[data-k] { font-weight: 400; }
  .bv-date th { display: block; }
}
@media (max-width: 860px) {
  .bv-in { padding: 0 16px; }
  .bv-head .bv-in { min-height: 52px; }
  .bv-logo { font-size: 15px; }
  .bv-sampletag { font-size: 12px; }
  .bv-find { padding: 8px 0 40px; }
  .bv-find .bv-in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bv-findcard { padding: 22px 18px; }
  .bv-paper { max-width: 280px; }
  .bv-bill { padding: 8px 0 24px; }
  .bv-col { padding: 0 12px; gap: 12px; }
  .bv-stmt { padding: 20px 18px 4px; }
  .bv-amt b { font-size: 30px; }
  .bv-meta { grid-template-columns: 110px 1fr; }
  .bv-pay { padding: 20px 18px 18px; }
  .bv.on-bill { padding-bottom: 84px; }
  .bv-paybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .bv-done { padding: 8px 0 40px; }
  .bv-donecard { margin: 0 12px; padding: 22px 18px; }
  .bv-actions > * { flex: 1 1 100%; }
  .bo-in { padding: 16px 12px; }
  .bo-head { flex-wrap: wrap; gap: 4px 12px; }
  .bo-date { width: 100%; }
  .bo-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bo-stats > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; }
  .bo-stats b { grid-row: span 2; grid-column: 2; font-size: 20px; }
  .bo-table thead { display: none; }
  .bo-table tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-top: 1px solid #ebebeb; }
  .bo-table td { padding: 0; border: 0; }
  .bo-table td:nth-child(1) { grid-column: 2; grid-row: 2; text-align: right; color: #8a8a90; font-size: 12.5px; }
  .bo-table td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .bo-table td:nth-child(3) { grid-column: 1; grid-row: 2; color: #6b6b6b; font-size: 13px; }
  .bo-table td:nth-child(4) { grid-column: 2; grid-row: 1; font-weight: 600; }
  .bo-table td:nth-child(5) { grid-column: 1; grid-row: 3; font-size: 13px; }
  .bo-table tr.is-new { background: #eef7f7; margin: 0 -16px; padding: 10px 16px; }
  .bo-table tr.is-new td { background: none; }
  .bo-plans li { grid-template-columns: 1fr auto; }
  .bo-plans li > span:nth-child(3) { grid-column: 2; }
  .bo-plans li > span:nth-child(2) { display: none; }
}
@media (max-width: 600px) { .bv-sampletag span { display: none; } .bv-logo { white-space: nowrap; } }
/* on the statement the header lines up with the one column under it */
.bv.on-bill .bv-head .bv-in { max-width: 592px; padding: 0 16px; }
