/* Obada shared components: the variants every screen may use, built only from tokens.css.
   Base .btn, .btn.primary, .btn.sm and .btn.wide stay in obada.css; this file adds the rest of the family
   so that no screen has to draw its own danger, quiet or large button. */
.btn.danger{color:var(--bad);background:transparent;border-color:color-mix(in srgb,var(--bad) 40%,transparent)}
.btn.danger:hover{background:var(--bad-soft)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--ink)}
.btn.ghost:hover{background:var(--sunken)}
.btn.lg{padding:11px 20px;font-size:14px}
.btn:focus-visible{outline:2px solid var(--info);outline-offset:2px}
.hero .btn.danger{background:var(--accent-fill);border-color:var(--accent-fill);color:var(--accent-ink)}
.hero .btn.danger:hover{background:var(--accent);border-color:var(--accent)}
.ob-ra{display:inline-flex;flex-wrap:nowrap;gap:4px;white-space:nowrap}
.ob-ra-b.is-off{opacity:.45;cursor:not-allowed}
/* wide tables: a scroll bar you can see (dark on dark hid it), and a hand while the table is being dragged */
.tablewrap,.lt-wrap{scrollbar-width:auto;scrollbar-color:var(--muted) var(--sunken)}
.tablewrap::-webkit-scrollbar,.lt-wrap::-webkit-scrollbar{height:12px;width:12px}
.tablewrap::-webkit-scrollbar-track,.lt-wrap::-webkit-scrollbar-track{background:var(--sunken)}
.tablewrap::-webkit-scrollbar-thumb,.lt-wrap::-webkit-scrollbar-thumb{background:var(--muted);border-radius:8px;border:2px solid var(--sunken)}
.tablewrap.is-panning,.lt-wrap.is-panning{cursor:grabbing;user-select:none}
/* a printout keeps its colours (total bands, headers, status chips) whatever "Background graphics" is set to */
*{-webkit-print-color-adjust:exact;print-color-adjust:exact}
/* a form's optional fields, folded under one line so the required ones come first (OB.form fields with more:1, and the hand-built forms) */
.form-more{grid-column:1/-1;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface);margin:12px 0}
.form-more>summary{cursor:pointer;padding:10px 14px;font-weight:600;color:var(--muted);list-style:none;display:flex;align-items:center;gap:8px}
.form-more>summary::-webkit-details-marker{display:none}
.form-more>summary::before{content:'▸';transition:transform .15s}
.form-more[open]>summary::before{transform:rotate(90deg)}
[dir=rtl] .form-more>summary::before{content:'◂'}
[dir=rtl] .form-more[open]>summary::before{transform:rotate(-90deg)}
.form-more[open]>summary{border-bottom:1px solid var(--line)}
.form-more>.fgrid{padding:12px 14px}
.form-more>summary:focus-visible{outline:2px solid var(--info);outline-offset:2px}

/* a form whose rows are lines of three (account, debit, credit): the first column is wider */
.drawer .fgrid.fgrid-lines3{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr)}
@media (max-width:520px){.drawer .fgrid.fgrid-lines3{grid-template-columns:1fr}}

/* a tick box inside a form field: the box sits next to its text, not stretched across the field */
.fld .dc-chk{justify-content:flex-start;gap:8px;min-height:40px}
.fld .dc-chk input{width:18px;height:18px;flex:none;margin:0;accent-color:var(--primary)}

/* manual journal: running totals beside Save */
.drawer .actions .je-tot{margin-inline-end:auto;display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;font-size:13px;color:var(--muted)}
.je-tot b{color:var(--ink)}
.je-tot .je-off,.je-tot .je-off b{color:var(--bad);font-weight:600}
.je-tot .je-ok{color:var(--ok);font-weight:600}

/* file pickers in the screen's language (file_inputs.js): the native picker stays in the form, out of view */
.ob-file-native{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;pointer-events:none}
.ob-file{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:100%}
.ob-file-name{overflow-wrap:anywhere}

/* One field look for a control a screen places by hand (class "input" on an input, a select or a text area): the same border, radius
   and focus ring as the fields of a settings page. A screen sizes it (width, flex) and never restyles it. */
.v1 .input{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:10px;padding:8px 12px;font:inherit;font-size:13.5px;min-width:0;max-width:100%}
.v1 select.input{min-width:180px}
.v1 .input:focus-visible{outline:2px solid var(--info);outline-offset:1px;border-color:var(--info)}
.v1 .input:disabled{background:var(--sunken);color:var(--muted)}
/* a picker that leads a screen (choose the project, the contract): its label and the control on one line */
.v1 .pick-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:10px}
.v1 .pick-row>label{font-weight:600}
/* Back lives in the top bar only: a screen's own "back to the list" button (data-ob-back) is what the top bar Back presses, and is not shown */
.v1 #content [data-ob-back]{display:none}
/* a status pill beside the value it qualifies (a settings row): the same gap everywhere */
.v1 .srow-c>.pill+span{margin-inline-start:8px}
