/* THE CAPTURE APP IN VISTA (docs/design/receipt-capture.md R1): at a desktop a panel in the right third of the window, the page still
   in view; on a phone the capture app full screen. The frame fills the panel under its header. It has its own host in the drawer, kept
   across openings (bug (2), 10/22/2026): the layout follows the host while it shows -- never a frame kept hidden behind other content. */
.g-capture-frame{border:0;width:100%;height:100%;display:block;background:#faf8f5}
.g-capture-host{flex:1;min-height:0;padding:0;overflow:hidden}
.g-capture-host[hidden]{display:none}
.drawer:has(.g-capture-host:not([hidden])) .drawer-panel{width:max(33.333vw,420px);max-width:100%;height:100dvh;max-height:100dvh;display:flex;flex-direction:column;overflow:hidden}
@media(max-width:640px){
  .drawer:has(.g-capture-host:not([hidden])){inset:0}
  .drawer:has(.g-capture-host:not([hidden])) .drawer-panel{width:100%;padding:0}
  .drawer:has(.g-capture-host:not([hidden])) .drawer-head{padding:12px 16px}
}

/* RC3, THE CAPTURE PANEL RESTYLED (switch capturePanelV2; docs/design/ops/receipts-plan.md "Desktop: the right-third panel"; D's helper
   11/05/2026). These rules style the capture app itself (web/index.html with ?panel=2, which loads this file beside g_brand.css and g_ui.css
   only then): every one under body.g-panel2 or the shared form's .rc-v2, every colour a Dusk token, no new hex. The Vista loads this file too,
   where none of them matches anything. */
body.g-panel2 { font-family: var(--lv-font); font-size: var(--lv-fs-14); background: var(--lv-surface); color: var(--lv-ink); padding-bottom: 132px; }
body.g-panel2 header, body.g-panel2 #gFilesRow, body.g-panel2 .g-paid-row { display: none !important; }
/* no question before Done (R7): the old screen's reading lines ("check before saving", Try again / Save the file as it is) belong to the fields
   it showed before Save; here the reading is said after Done, in Check and confirm */
body.g-panel2 #ocrStatus, body.g-panel2 #g-qr-fields, body.g-panel2 #g-retry { display: none !important; }
body.g-panel2 main { max-width: none; padding: var(--lv-s-4) var(--lv-s-4) 0; gap: var(--lv-s-3); }
body.g-panel2 #gP2For { order: -9; } body.g-panel2 #gReview { order: -8; } body.g-panel2 #photoSlot { order: -7; } body.g-panel2 #pageStrip { order: -6; }
body.g-panel2 #gPageMenu, body.g-panel2 #addPageWrap { order: -5; } body.g-panel2 #gFilesQ { order: -4; } body.g-panel2 #g-filed { order: -3; } body.g-panel2 #gP2After { order: -2; }
/* the company line: "For <company> ▾", R4's line under it */
.g-p2-for { margin: 0; font-size: var(--lv-fs-13); color: var(--lv-ink-2); }
.g-p2-for label { display: inline; margin: 0; font-size: inherit; color: inherit; }
.lv-select.g-p2-co { width: auto; height: auto; min-height: 24px; border: 0; background: transparent; color: var(--lv-link); font: 500 var(--lv-fs-13)/1.4 var(--lv-font); text-decoration: underline; text-underline-offset: 2px; padding: 0 2px; cursor: pointer; max-width: 100%; box-shadow: none; }   /* the shared select, drawn as the line's link (the design's "For <company> ▾") */
.g-p2-co-one { color: var(--lv-ink); font-weight: 600; }
.g-p2-for__how { margin: 2px 0 0; font-size: var(--lv-fs-12); color: var(--lv-ink-3); }
/* the one balanced drop area, centred: the slot's file input stays under it (a click on the area chooses a file); the buttons sit above */
body.g-panel2 #photoSlot { min-height: 280px; margin: var(--lv-s-6) 0 0; border: 1px dashed var(--lv-border-strong); border-radius: var(--lv-r-2); background: var(--lv-surface-2); }
body.g-panel2 #photoSlot.over { border-color: var(--lv-navy); background: var(--lv-tint-navy); }
body.g-panel2 #photoSlot.filled { border-style: solid; border-color: var(--lv-border); background: var(--lv-surface); }
body.g-panel2 #photoSlot:not(.filled) #photoHint, body.g-panel2 #photoSlot.filled .g-p2-dropwrap { display: none; }
body.g-panel2 #photoSlot .filehint { color: var(--lv-ink); font-size: var(--lv-fs-14); }
.g-p2-dropwrap { position: relative; z-index: 1; width: 100%; pointer-events: none; }
.g-p2-drop { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--lv-s-6) var(--lv-s-4); }
.g-p2-drop__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--lv-tint-navy); color: var(--lv-navy); }
.g-p2-drop__icon .g-p2-ic { width: 22px; height: 22px; }
.g-p2-drop__title { margin: var(--lv-s-3) 0 0; font: 600 var(--lv-fs-16)/1.3 var(--lv-font); color: var(--lv-ink); }
.g-p2-drop__limits { max-width: 36ch; margin: var(--lv-s-2) auto var(--lv-s-4); font-size: var(--lv-fs-13); line-height: 1.45; color: var(--lv-ink-2); }
.g-p2-drop__btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lv-s-3); width: 100%; pointer-events: auto; }
.g-p2-btn { width: 100%; min-height: 40px; }
.g-p2-ic { width: 16px; height: 16px; flex: none; }
/* the pages before Done, and + for one more */
body.g-panel2 #pageStrip { gap: var(--lv-s-2); margin: 0; }
body.g-panel2 .thumb img { width: 56px; height: 56px; border: 1px solid var(--lv-border); border-radius: var(--lv-r-1); }
.g-p2-plus { flex: none; width: 56px; height: 56px; border: 1px dashed var(--lv-border-strong); border-radius: var(--lv-r-1); background: var(--lv-surface); color: var(--lv-ink-2); font: 400 var(--lv-fs-22)/1 var(--lv-font); cursor: pointer; }
/* I paid this myself (R3) and the note (R8), under the drop area */
.g-p2-paid { border: 1px solid var(--lv-border); border-radius: var(--lv-r-2); background: var(--lv-surface); padding: var(--lv-s-3) var(--lv-s-4); }
.g-p2-paid__sw { display: flex; align-items: center; gap: var(--lv-s-3); margin: 0; cursor: pointer; color: var(--lv-ink); font-size: var(--lv-fs-14); }
.g-p2-paid__slot { display: inline-flex; flex: none; }
.g-p2-paid__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-p2-paid__t { font-weight: 500; color: var(--lv-ink); }
.g-p2-paid__s { font-size: var(--lv-fs-12); color: var(--lv-ink-3); }
.g-p2-notelink { align-self: flex-start; margin: var(--lv-s-3) 0 0; padding: 0; border: 0; background: none; color: var(--lv-link); font: 400 var(--lv-fs-13)/1.4 var(--lv-font); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.g-p2-notelink[hidden] { display: none; }
body.g-panel2 .g-p2-noterow { margin: var(--lv-s-3) 0 0; }
body.g-panel2 .g-p2-noterow label { font: 500 var(--lv-fs-12)/1.3 var(--lv-font); color: var(--lv-ink-2); }
body.g-panel2 #note { height: var(--lv-control-h); padding: 0 10px; font: var(--lv-fs-14)/1.4 var(--lv-font); border: 1px solid var(--lv-border-strong); border-radius: var(--lv-r-1); background: var(--lv-surface); color: var(--lv-ink); }
/* the footer: a full-width Done, off until a file is in (45%, never another colour), and its line */
body.g-panel2 .savebar { background: var(--lv-surface); border-top: 1px solid var(--lv-border); padding: var(--lv-s-3) var(--lv-s-4) calc(var(--lv-s-3) + env(safe-area-inset-bottom)); }
body.g-panel2 .savebar button { max-width: none; min-height: 44px; padding: 0 var(--lv-s-4); border: 1px solid var(--lv-navy); border-radius: var(--lv-r-1); background: var(--lv-navy); color: var(--lv-ink-inv); font: 600 var(--lv-fs-14)/1.2 var(--lv-font); cursor: pointer; }
body.g-panel2 .savebar button:hover:not(:disabled) { background: var(--lv-navy-600); border-color: var(--lv-navy-600); }
body.g-panel2 .savebar button:disabled { background: var(--lv-navy); color: var(--lv-ink-inv); opacity: .45; cursor: default; }
body.g-panel2 .savebar .subnote { max-width: none; margin: var(--lv-s-2) 0 0; font-size: var(--lv-fs-12); color: var(--lv-ink-3); }
.g-p2-btn:focus-visible, .g-p2-plus:focus-visible, .g-p2-notelink:focus-visible, .g-p2-co:focus-visible, body.g-panel2 .savebar button:focus-visible { outline: 2px solid var(--lv-navy); outline-offset: 2px; }
/* CHECK AND CONFIRM (R10) takes the drop area's place while it is open */
body.g-panel2.g-p2-review #gP2For, body.g-panel2.g-p2-review #photoSlot, body.g-panel2.g-p2-review #pageStrip, body.g-panel2.g-p2-review #gPageMenu,
body.g-panel2.g-p2-review #addPageWrap, body.g-panel2.g-p2-review #gFilesQ, body.g-panel2.g-p2-review #gP2After, body.g-panel2.g-p2-review .savebar { display: none !important; }
body.g-panel2.g-p2-review { padding-bottom: var(--lv-s-4); }
body.g-panel2 #gReview { margin: 0; padding: 0; border: 0; background: transparent; }
body.g-panel2 #gReview h3 { margin: 0 0 var(--lv-s-3); font: 600 var(--lv-fs-16)/1.3 var(--lv-font); color: var(--lv-ink); }
.g-p2-saving { margin: var(--lv-s-6) 0; text-align: center; color: var(--lv-ink-2); }
.rc-v2 { display: flex; flex-direction: column; gap: var(--lv-s-3); }
.rc-v2 label { margin: 0; color: var(--lv-ink); font-size: var(--lv-fs-14); }
.rc2-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--lv-s-3); }
.rc2-pages { display: flex; flex-wrap: wrap; gap: var(--lv-s-2); }
.rc2-thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 56px; overflow: hidden; border: 1px solid var(--lv-border); border-radius: var(--lv-r-1); background: var(--lv-surface-2); }
.rc2-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc2-doc { font: 600 var(--lv-fs-11)/1 var(--lv-font); color: var(--lv-ink-2); }
.rc2-n { position: absolute; right: 3px; bottom: 2px; font-size: var(--lv-fs-11); color: var(--lv-ink-3); }
.rc2-state { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rc2-saved { background: var(--lv-tint-better); color: var(--lv-better-text); }
.rc2-readin { font-size: var(--lv-fs-12); color: var(--lv-ink-3); }
.rc2-vat .lv-field__label { margin: 0 0 var(--lv-s-1); }
.rc2-vat__t { width: 100%; border-collapse: collapse; font: var(--lv-fs-13)/1.3 var(--lv-font); color: var(--lv-ink); }
.rc2-vat__t th, .rc2-vat__t td { padding: var(--lv-s-2) var(--lv-s-1); border-bottom: 1px solid var(--lv-border); text-align: right; font-variant-numeric: tabular-nums; }
.rc2-vat__t th:first-child, .rc2-vat__t td:first-child { text-align: left; }
.rc2-vat__t thead th { font: 500 var(--lv-fs-12)/1.3 var(--lv-font); color: var(--lv-ink-2); }
.rc2-vat__t tfoot th, .rc2-vat__t tfoot td { font-weight: 600; border-bottom: 0; }
.rc2-vat__in { width: 7.5em; height: 32px; text-align: right; font-weight: 600; }
.rc2-acc { position: relative; display: block; }
.rc2-acc .rc-acc { padding-right: 72px; }
.rc2-code { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); font-size: var(--lv-fs-11); color: var(--lv-ink-3); pointer-events: none; font-variant-numeric: tabular-nums; }
.rc-v2 .rc-why, .rc-v2 .rc-picks { font-size: var(--lv-fs-12); color: var(--lv-ink-3); }
.rc-v2 .rc-picks { display: flex; flex-wrap: wrap; gap: var(--lv-s-1); }
.rc2-filed { margin: 0; font-size: var(--lv-fs-12); color: var(--lv-ink-2); }
.rc2-paid { display: inline-flex; align-items: center; gap: var(--lv-s-3); cursor: pointer; }
.rc2-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto; gap: var(--lv-s-2); padding: var(--lv-s-3) 0; border-top: 1px solid var(--lv-border); background: var(--lv-surface); }
.rc2-foot .rc-ok { min-height: 44px; }
.rc2-out { min-height: 18px; margin: 0; font-size: var(--lv-fs-13); color: var(--lv-ink-2); }
