/* ATAD Petty Cash V3 -- Bills / My Bills (Bills Screen build, Nov 2026). Tokens from app.css (dark default, [data-theme=light]). Scoped to .vb / .vb-shell. */
.vb { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.vb-head:empty { display: none; }
.vb-head .v3-h1 { margin: 0; }
.vb-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.vb-row.nowrap { flex-wrap: nowrap; }
.vb-search { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--faint); }
.vb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; padding: 0; min-height: 40px; }
.vb-search input::placeholder { color: var(--faint); }
.vb-search:focus-within { border-color: var(--accent); }
.vb-fchip { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex: none; cursor: pointer; }
.vb-fchip.big { min-height: 44px; }
.vb-fchip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.vb-fchip .v3-mono { font-size: 12px; }
.vb-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.vb-btn.block { width: 100%; }
.vb-btn.on { border-color: var(--accent); color: var(--accent); }
.vb-btn:focus-visible, .vb-fchip:focus-visible, .vb-bill:focus-visible, .vb-open:focus-visible, .vb-ibtn:focus-visible, .vb-tbtn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.vb-cols { display: flex; gap: 20px; align-items: flex-start; min-width: 0; }
.vb-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.vb-dbox { flex: 0 0 440px; min-width: 0; }
.vb-dbox[hidden] { display: none; }
.vb-dbox .vb-detail { overflow: visible; }
.vb-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--text); }
.vb-ghead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vb-ghead .l { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.vb-group h2, .vb-detail h2, .vb-win h2 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }   /* long names wrap, never cut */
.vb-so { font-size: 12px; color: var(--faint); white-space: nowrap; }
.vb-gsum { font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.vb-bill { width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); font: inherit; text-align: left;
  display: flex; align-items: center; gap: 12px; cursor: pointer; }
.vb-bill.on { border-color: var(--accent); background: var(--accent-soft); }
.vb-thumb { flex: none; width: 40px; height: 52px; border-radius: 4px; box-sizing: border-box; }
img.vb-thumb { width: 40px !important; height: 52px !important; object-fit: cover; border-radius: 4px; }
img.vb-thumb.atad-thumb-ph { object-fit: none; }
.vb-thumb.none { display: flex; font-weight: 600; color: var(--muted); align-items: center; justify-content: center; background: var(--panel); border: 1px dashed var(--line); font-size: 10px; line-height: 12px; text-align: center; padding: 2px; }
.vb-bt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vb-bt b { font-weight: 600; overflow-wrap: anywhere; }
.vb-bt > span { font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.vb-bt small { font-size: 12px; line-height: 16px; color: var(--faint); overflow-wrap: anywhere; }
.vb-bt .v3-chip { align-self: flex-start; }
.vb-br { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.vb-amt { font-weight: 500; white-space: nowrap; }
.vb-nil { padding: 28px 16px; text-align: center; color: var(--muted); }
.vb-more { display: flex; justify-content: center; }
/* the open bill */
.vb-detail { gap: 16px; }
.vb-detail.vb-card { padding: 20px; }
.vb-detail.phone { background: none; border: 0; padding: 0; gap: 12px; display: flex; flex-direction: column; }
.vb-dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vb-dhead > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vb-dhead h2 { margin: 0; }
.vb-detail.phone .vb-dhead h2 { font-size: 17px; }
.vb-reason { font-size: 13px; line-height: 18px; color: var(--muted); background: var(--panel-2); border-radius: 8px; padding: 6px 10px; }
.vb-photo { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; min-width: 0; box-sizing: border-box; }
.vb-open { background: none; border: 0; padding: 0; color: inherit; cursor: zoom-in; display: flex; max-width: 100%; }
.vb-pic { display: flex; align-items: center; justify-content: center; max-width: 100%; min-width: 120px; min-height: 120px; }
.vb-pic img { display: block; max-width: 100%; max-height: 250px; width: auto; height: auto; border-radius: 4px; background: #E9ECF2; object-fit: contain; }
.vb-pic.big img { max-width: min(420px, 100%); max-height: min(560px, 62vh); }
.vb-pic-wait { color: var(--faint); font-size: 12px; }
.vb-cap { font-size: 12px; line-height: 16px; color: var(--faint); text-align: center; }
.vb-empty { padding: 20px 8px; text-align: center; color: var(--muted); width: 100%; }
.vb-fail { padding: 28px 12px; width: 100%; box-sizing: border-box; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; background: var(--panel); }
.vb-strip { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vb-tbtn { border: 2px solid transparent; border-radius: 10px; background: none; padding: 2px; min-width: 44px; min-height: 44px; display: flex; cursor: pointer; }
.vb-tbtn.on { border-color: var(--accent); }
.vb-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.vb-btns .vb-btn { flex: 1 1 120px; padding: 0 8px; }
.vb-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.vb-facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vb-facts span { font-size: 12px; line-height: 16px; color: var(--faint); }
.vb-facts b { font-weight: 600; overflow-wrap: anywhere; }
.vb-facts b.v3-mono { font-weight: 600; }
.vb-hr { height: 1px; background: var(--line); }
/* the flow inside the bill: as the mockup (no connector line, red cross, amber waiting step, grey note box) */
.vb .vhist-flowcard { margin-top: 0; gap: 14px; }
.vb .vhist-flowcard h2 { font-size: 17px; line-height: 24px; margin: 0; }
.vb .vhist-flow { gap: 14px; }
.vb .vhist-step { padding-bottom: 0; }
.vb .vhist-step:not(:last-child)::before { display: none; }
.vb .vhist-step.now b { color: var(--amber); } .vb .vhist-step.bad b { color: var(--red); }
.vb .vhist-step.bad .dot { color: var(--red); }
.vb .vhist-step small { color: var(--muted); } .vb .vhist-step small.v3-mono { color: var(--text); }
.vb .vhist-step q { quotes: none; font-size: 13px; line-height: 18px; color: var(--muted); background: var(--panel-2); border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.vb-flowc { gap: 14px; }
/* photo window */
.vb-veil { position: fixed; inset: 0; z-index: 60; background: rgba(4, 7, 12, .72); display: flex; align-items: center; justify-content: center; padding: 12px; }
.vb-win { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 100%; max-height: 100%; overflow: auto; color: var(--text); min-width: min(320px, 100%); box-sizing: border-box; }
.vb-whead { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vb-ibtn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vb-choose { display: flex; flex-direction: column; gap: 8px; }
.vb-choose .vb-btn { width: 100%; }
/* the one new row on Reports / Money / Add Bill (phone only) */
.vb-entry { text-decoration: none; min-height: 56px; }
@media (min-width: 1024px) { .vb-entry { display: none; } .vb-shell .v3-pagehead { display: none; } }
/* phone: the bill list / bill page keep the four tabs under them */
@media (max-width: 1023px) {
  .vb-shell.v3-sub-screen .v3-tabs { display: grid; }
  .vb-shell.v3-sub-screen .v3-main { padding-bottom: calc(96px + var(--atad-sab, env(safe-area-inset-bottom, 0px))); }
  .vb-fchips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .vb-fchips::-webkit-scrollbar { display: none; }
  .vb-group { padding: 16px; }
  .vb-group > div:first-child { display: flex; flex-direction: column; gap: 0; }
    .vb-bill { align-items: center; }
  .vb-photo { padding: 16px 12px; }
}
.vb .v3-chip.k-n { background: var(--line); color: var(--text); }
@media (min-width: 1024px) {   /* PC: the page header, search and chips stay put; the list and the open bill each scroll on their own */
  .vb-cols { height: calc(100vh - 214px); min-height: 360px; }
  .vb-list, .vb-dbox { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
  .vb-list { align-self: stretch; }
}
/* Add Bill (Site Handler, phone): the camera screen gives the new My Bills row its height and gap, so the shutter and both buttons stay where they were */
@media (max-width: 1023px) { .vb-cam { height: calc(100dvh - 170px - var(--vb-entry-h, 76px)) !important; } }
