/* BOSMITH Accounts — original stylesheet (no framework). */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --ink: #1c2230;
  --navy: #051625; /* logo background */
  --ink-2: #4a5263;
  --ink-3: #7a8191;
  --line: #e4e0d8;
  --line-2: #efece6;
  --pine: #1f5a4c;
  --pine-2: #2b7a66;
  --pine-tint: #e6f0ec;
  --amber: #b86e1f;
  --amber-tint: #fbf0e2;
  --brick: #a3362b;
  --brick-tint: #f8e7e4;
  --sky-tint: #eaf0f7;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(28, 34, 48, .05), 0 4px 18px rgba(28, 34, 48, .05);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.02rem; font-weight: 650; }
h3 { font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-top: 1.1rem; }
.mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.strong { font-weight: 650; }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1.4rem; }
.fineprint { color: var(--ink-3); font-size: .8rem; margin: .8rem 0 0; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .45rem 1.4rem;
  background: var(--navy); color: #fff; min-height: 56px; }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 40px; width: auto; }
.brand:focus-visible { outline: 2px solid #f5c518; outline-offset: 3px; border-radius: 4px; }
.brand-text { font-size: .98rem; letter-spacing: .01em; }
.brand-text strong { font-weight: 750; letter-spacing: .06em; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(140deg, #ffdc3d, #f5c518); color: #111; font-weight: 850; font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.brand-mark.lg { width: 46px; height: 46px; border-radius: 12px; font-size: 1.4rem; }
.topsearch { flex: 1; max-width: 520px; }
.topsearch input { width: 100%; border: 0; border-radius: 999px; padding: .5rem 1rem; background: rgba(255,255,255,.12);
  color: #fff; font: inherit; }
.topsearch input::placeholder { color: rgba(255,255,255,.6); }
.topsearch input:focus { outline: 2px solid var(--pine-2); background: rgba(255,255,255,.18); }
.usernav { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.usernav form { margin: 0; }
.who { display: flex; align-items: center; gap: .45rem; font-size: .9rem; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--amber); font-weight: 700; font-size: .8rem; }
.role-pill { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; padding: .1rem .45rem; border-radius: 999px; background: rgba(255,255,255,.14); }
.linkbtn { background: none; border: 0; color: rgba(255,255,255,.8); font: inherit; font-size: .88rem; cursor: pointer; padding: 0; }
.linkbtn:hover { color: #fff; text-decoration: underline; }
.menu { position: relative; font-size: .9rem; }
.menu summary { cursor: pointer; list-style: none; color: rgba(255,255,255,.88); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; font-size: .75em; }
.menu-pop { position: absolute; right: 0; top: 1.8rem; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  border: 1px solid var(--line); min-width: 180px; padding: .35rem; display: grid; }
.menu-pop a { color: var(--ink); padding: .45rem .7rem; border-radius: 6px; }
.menu-pop a:hover { background: var(--pine-tint); text-decoration: none; }
.beta-strip { background: var(--amber-tint); color: #7a4a14; font-size: .8rem; text-align: center; padding: .3rem 1rem; border-bottom: 1px solid #f0dcc2; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }
.page-title { margin-bottom: 1rem; }

/* Cards and grid */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; box-shadow: var(--shadow); }
.card.narrow { max-width: 520px; margin: 3rem auto; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.span-all { grid-column: 1 / -1; }
/* Account page: Contact + Terms stacked on the left, Payment history on the right.
   The history card is taken out of flow so the row height comes from the left column,
   and the table scrolls inside it (sticky header). */
.top-split, .lower-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: 1rem; margin-bottom: 1rem; }
.top-left, .lower-left, .lower-right { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.lower-left > .card:last-child, .lower-right > .card:last-child { flex: 1 1 auto; }  /* columns end level */
.top-right { position: relative; min-width: 0; min-height: 24rem; }
.history-card { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.history-card .card-head { flex: none; }
.history-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; margin: 0 -1.25rem -1.15rem; border-top: 1px solid var(--line-2); }
.history-scroll:focus-visible { outline: 2px solid var(--pine-2); outline-offset: -2px; }
.history-scroll .table th { position: sticky; top: 0; z-index: 1; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.history-scroll .table th, .history-scroll .table td { padding-left: .45rem; padding-right: .45rem; }
.history-scroll .history-table td { font-size: .85rem; }
.history-scroll .kind { font-size: .74rem; padding: .05rem .35rem; }
.history-scroll .table th:first-child, .history-scroll .table td:first-child { padding-left: 1.1rem; }
.history-scroll .table th:last-child, .history-scroll .table td:last-child { padding-right: 1.1rem; }
.history-card .empty { padding: 1rem 0 0; }
/* Lower half mirrors the top: short cards (spouse/cosigner, references, related) on the left,
   Balance & aging over Notes on the wider right. */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* Buttons and form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 10px; cursor: pointer; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn.primary:hover { background: var(--pine-2); }
.btn.ghost { background: transparent; }
.btn.xs { padding: .18rem .6rem; font-size: .8rem; border-radius: 7px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
input, select { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: .5rem .7rem; background: #fff; }
input:focus, select:focus { outline: 2px solid var(--pine-2); outline-offset: 0; border-color: transparent; }
label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.stack { display: grid; gap: .9rem; }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; margin-bottom: 1rem; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.sm { font-size: .7rem; padding: .05rem .45rem; }
.chip.good { background: var(--pine-tint); color: var(--pine); }
.chip.warn { background: var(--amber-tint); color: #8a5214; }
.chip.bad { background: var(--brick-tint); color: var(--brick); }
.chip.link { background: var(--sky-tint); color: #24527a; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Login */
.login-page { background: radial-gradient(1200px 600px at 10% -10%, #dfe9e4 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #f3e3cf 0%, transparent 55%), var(--bg); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); padding: 2rem; box-shadow: 0 10px 40px rgba(28,34,48,.10); }
.login-card { overflow: hidden; }
.login-logo { background: var(--navy); margin: -2rem -2rem 1.4rem; padding: 1.4rem 1rem; display: flex; justify-content: center; }
.login-logo img { display: block; height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.login-brand { display: flex; gap: .9rem; align-items: center; margin-bottom: 1.5rem; }
.login-brand h1 { font-size: 1.35rem; margin: 0; }
.login-brand p { margin: .1rem 0 0; font-size: .88rem; }
.alert { padding: .65rem .85rem; border-radius: 10px; margin-bottom: 1rem; font-size: .9rem; }
.alert.bad { background: var(--brick-tint); color: var(--brick); }

/* Search */
.searchpanel { max-width: 860px; margin: 1.2rem auto 1.4rem; }
.bigsearch-row { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .45rem .45rem .45rem 1rem; box-shadow: var(--shadow); }
.bigsearch-row:focus-within { border-color: var(--pine-2); box-shadow: 0 0 0 4px rgba(43,122,102,.14); }
.bigsearch-row .icon { width: 22px; height: 22px; color: var(--ink-3); flex: none; }
.bigsearch-row input { flex: 1; border: 0; font-size: 1.15rem; padding: .55rem .2rem; min-width: 0; }
.bigsearch-row input:focus { outline: none; }
.search-options { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .8rem; padding: 0 .3rem; }
.hint { color: var(--ink-3); font-size: .84rem; }
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-weight: 600; color: var(--ink); grid-auto-flow: column; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: #cfcac0; position: relative; transition: background .15s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--pine); }
.switch input:checked + .track .thumb { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--pine-2); outline-offset: 2px; }
.results { max-width: 1060px; margin: 0 auto; padding: 0; overflow: hidden; }
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.results-head h2 { margin: 0; }
.results-meta { display: flex; gap: .5rem; flex-wrap: wrap; }
.tips { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; }
.tip { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: .7rem .9rem; display: grid; gap: .15rem; font-size: .88rem; color: var(--ink-2); }
.tip-k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--pine); }
.asof { text-align: center; color: var(--ink-3); font-size: .82rem; margin-top: 1.6rem; }
.empty { padding: 1.4rem 1.25rem; color: var(--ink-3); }

/* Tables */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; padding: .55rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; }
.table .num { text-align: right; }
.results-table td { padding: .75rem 1.25rem; }
.results-table th { padding: .6rem 1.25rem; }
.clickrow { cursor: pointer; }
.clickrow:hover td { background: #faf8f4; }
.clickrow .name { font-weight: 650; }
.clickrow .first { font-weight: 500; }
.sub { color: var(--ink-3); font-size: .8rem; margin-top: .1rem; }
.is-co td:first-child { box-shadow: inset 3px 0 0 var(--brick); }
.is-junk { opacity: .7; }
.history-table td { padding: .45rem .75rem; font-size: .9rem; }
.kind { font-size: .78rem; font-weight: 600; padding: .05rem .45rem; border-radius: 6px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.kind.k-payment, .kind.k-down_payment {  background: var(--pine-tint); color: var(--pine); }
.kind.k-late_fee, .kind.k-interest, .kind.k-finance_charge { background: var(--amber-tint); color: #8a5214; }
.kind.k-chargeoff, .kind.k-reversal { background: var(--brick-tint); color: var(--brick); }
.kind.k-sale, .kind.k-sales_tax { background: var(--sky-tint); color: #24527a; }
.showall { margin: .6rem auto 0; display: flex; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }
.tabs { display: flex; gap: .3rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .45rem .9rem; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.tabs a.on { background: var(--ink); color: #fff; }
.tabs a:hover { text-decoration: none; background: var(--line-2); }
.tabs a.on:hover { background: var(--ink); }

/* Account page */
.backlink { display: inline-block; margin-bottom: .8rem; font-size: .88rem; }
.acct-top { position: sticky; top: 50px; z-index: 10; margin-bottom: .8rem; }
.pinned-notes { background: #fbf6e4; border: 1px solid #e6d39a; border-radius: var(--radius); padding: .55rem .7rem; margin-bottom: .55rem; }
.pinned-note { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem 1.1rem; padding: .45rem .5rem; }
.pinned-note + .pinned-note { border-top: 1px solid #ead89a; }
.pinned-note-main { min-width: 0; flex: 1; }
.pinned-note-text { font-weight: 700; font-size: .95rem; white-space: pre-wrap; color: #4a3510; }
.unpin-form { flex: 0 0 auto; }
.acct-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow); }
.acct-head.co { border-left: 5px solid var(--brick); }
/* Autopay flag tints (code at the start of FurnPro CMNT): IG mint, IY yellow, IQ red.
   Ink stays the dark --ink; small labels darken a step so they stay crisp on the tint. */
.acct-head.ap-ig { background: #e9f7ef; border-color: #b9e2c9; }
.acct-head.ap-iy { background: #fdf7d9; border-color: #eedb8f; }
.acct-head.ap-iq { background: #fceaea; border-color: #efc2bf; }
.acct-head.ap-ig .acct-figs dt, .acct-head.ap-iy .acct-figs dt, .acct-head.ap-iq .acct-figs dt { color: var(--ink-2); }
.acct-head.ap-ig.co, .acct-head.ap-iy.co, .acct-head.ap-iq.co { border-left-color: var(--brick); }
.acct-num { color: var(--pine); font-weight: 700; font-size: .95rem; letter-spacing: .03em; }
.acct-head h1 { margin: .1rem 0 .5rem; }
.acct-figs { display: grid; grid-template-columns: repeat(5, auto); gap: .3rem 2rem; margin: 0; align-content: center; }
.acct-figs dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; }
.acct-figs dd { margin: 0; }
.acct-figs .big { font-size: 1.3rem; font-weight: 700; }
.acct-figs .is-pastdue dd { color: var(--brick); }
.acct-figs dd.fig-sub { font-size: .78rem; font-weight: 600; color: var(--ink-2); margin-top: .1rem; }
.acct-figs .is-pastdue dd.fig-sub { color: var(--brick); }
.jump { display: flex; gap: .2rem; flex-wrap: wrap; margin: 0 0 1rem; }
.jump a { font-size: .82rem; padding: .25rem .65rem; border-radius: 999px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.jump a:hover { text-decoration: none; border-color: var(--pine-2); color: var(--pine); }
.kv { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .85rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv.cols { grid-template-columns: repeat(auto-fill, minmax(140px, max-content) minmax(140px, 1fr)); margin-top: .8rem; }
.phones, .refs, .related, .notes { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.phones li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .4rem .6rem; border-radius: 9px; background: #faf8f4; }
.phones li.primary { background: var(--pine-tint); }
.refs li, .related li { padding: .5rem .6rem; border-radius: 9px; background: #faf8f4; }
.related li { display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .6rem; align-items: baseline; }
.related .sub { grid-column: 1 / -1; }
.ssn { display: inline-flex; align-items: center; gap: .5rem; }
.ssn.revealed .ssn-value { background: var(--amber-tint); padding: 0 .35rem; border-radius: 5px; }
.aging-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--line-2); margin: .3rem 0 1rem; }
.seg { display: block; height: 100%; }
.s-cur { background: var(--pine-2); } .s-30 { background: #d9a441; } .s-60 { background: #d07a2e; } .s-90 { background: #b8502b; } .s-over { background: #8c2a22; } .s-none { background: var(--line-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .5rem; vertical-align: -1px; }
.note-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem .9rem; }
.note-head h2 { margin: 0; }
.note-filters { display: flex; flex-wrap: wrap; gap: .15rem .85rem; font-size: .85rem; }
.note-filters .check { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.notes { max-height: 460px; overflow: auto; }
.note { padding: .55rem .7rem; border-radius: 9px; background: #faf8f4; border-left: 3px solid var(--line); }
.note.n-cusfile { border-left-color: var(--pine-2); }
.note.n-lcomment { border-left-color: var(--brick); }
.note.n-payment { border-left-color: var(--pine); }
.note.n-purchase { border-left-color: var(--gold, #c4a35a); }
.note-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .5rem; margin-bottom: .2rem; }
.note-when, .note-who { color: var(--ink-3); font-size: .8rem; }
.note-text { white-space: pre-wrap; font-size: .9rem; }
.note-form { margin-top: .85rem; display: grid; gap: .4rem; }
.note-form > label { font-weight: 650; font-size: .85rem; }
.note-form textarea, .note-form select, .note-form input[type=text], .note-form input[type=date] {
  font: inherit; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
.note-form-row { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem .85rem; }
.note-form-row .check { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.note-topic { display: grid; gap: .25rem; font-weight: 650; font-size: .85rem; }
.ptp-extra { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: end; }
.ptp-extra[hidden] { display: none; }
.ptp-extra label { display: grid; gap: .25rem; font-weight: 650; font-size: .85rem; }
.ptp-extra input { width: 8.5rem; }
.note-form .err { color: var(--brick); font-size: .85rem; font-weight: 600; margin: 0; }
details summary { cursor: pointer; }
h2.inline { display: inline; }

/* Responsive */
@media (max-width: 1020px) {
  .grid { grid-template-columns: 1fr 1fr; }
  #aging { grid-column: span 1; }
  /* stack everything: Contact, Terms, History (own scroll), then the rest */
  .top-split, .lower-split { grid-template-columns: 1fr; }
  .top-right { position: static; min-height: 0; }
  .history-card { position: static; overflow: visible; }
  .history-scroll { max-height: 70vh; }
  .acct-figs { grid-template-columns: repeat(3, auto); }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .topbar { flex-wrap: wrap; padding: .55rem .9rem; gap: .5rem .8rem; }
  .topsearch { order: 3; flex-basis: 100%; max-width: none; }
  .who-name { display: none; }
  .wrap { padding: 1rem .8rem 3rem; }
  .grid, .cols2 { grid-template-columns: 1fr; }
  #terms, #aging { grid-column: auto; }
  .history-scroll { max-height: 65vh; }
  .hide-sm { display: none; }
  .acct-top { position: static; }
  .acct-figs { grid-template-columns: 1fr 1fr; width: 100%; }
  .results-table td, .results-table th { padding: .65rem .8rem; }
  .bigsearch-row input { font-size: 1rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  /* results become stacked rows: account + balance, name, payment */
  .results-table thead { display: none; }
  .results-table, .results-table tbody { display: block; }
  .results-table tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "acct bal" "name pay"; gap: .1rem .8rem;
    padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); }
  .results-table td { display: block; padding: 0; border: 0; }
  .results-table td:nth-child(1) { grid-area: acct; }
  .results-table td:nth-child(2) { grid-area: name; }
  .results-table td:nth-child(4) { grid-area: pay; align-self: end; font-size: .85rem; color: var(--ink-2); }
  .results-table td:nth-child(4)::before { content: "Pays "; font-family: var(--font); color: var(--ink-3); }
  .results-table td:nth-child(5) { grid-area: bal; font-size: 1.02rem; }
  .is-co td:first-child { box-shadow: none; }
  .results-table tr.is-co { box-shadow: inset 3px 0 0 var(--brick); }
  .kv dd { margin-bottom: .45rem; }
}
.notice { background: var(--amber-tint); color: #6e4512; border-radius: 10px; padding: .6rem .8rem; font-size: .85rem; margin-bottom: .8rem; }
.na { font-size: .95rem; font-weight: 600; color: var(--ink-3); font-family: var(--font); }
.kvp + .kvp::before { content: "· "; color: var(--ink-3); }
.usernav a.linkbtn { color: rgba(255,255,255,.8); font-size: .88rem; }
.card.narrow input { width: 100%; }
.card.narrow ul { margin: .2rem 0 0; padding-left: 1.1rem; font-size: .78rem; font-weight: 400; color: var(--ink-3); }

/* ---- Section 2: payments ---- */
.take-pay { margin-top: .6rem; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem 1rem; border-radius: 10px; margin: 0 0 .9rem; border: 1px solid var(--line); }
.banner.ok { background: var(--pine-tint); border-color: #b9e2c9; }
.banner.warn { background: var(--amber-tint); border-color: #eedb8f; }
.banner.bad { background: var(--brick-tint); border-color: #efc2bf; color: var(--brick); }
.history-table tr.voided td { color: var(--ink-3); }
.history-table tr.voided td.num { text-decoration: line-through; }
.history-table tr.app-row td:first-child { box-shadow: inset 3px 0 0 var(--pine); }
.void-link { font-size: .75rem; color: var(--brick); }
.pay-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.pay-form .field { display: grid; gap: .3rem; margin-bottom: .9rem; }
.pay-form label { font-weight: 650; font-size: .85rem; }
.pay-form input, .pay-form select, .pay-form textarea { font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pay-form input.amount { font-size: 1.5rem; font-weight: 700; font-family: var(--mono, ui-monospace, monospace); max-width: 14rem; }
.pay-form .err { color: var(--brick); font-size: .85rem; font-weight: 600; }
.pay-form .field.has-err input, .pay-form .field.has-err select, .pay-form .field.has-err textarea { border-color: var(--brick); }
.pay-form .hint { color: var(--ink-3); font-size: .8rem; }
.quickfill { display: flex; flex-wrap: wrap; gap: .4rem; }
.methods { display: flex; flex-wrap: wrap; gap: .4rem; }
.methods label { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; cursor: pointer; background: #fff; }
.methods input { margin: 0; }
.methods label:has(input:checked) { border-color: var(--pine); background: var(--pine-tint); color: var(--pine); }
.split-preview { font-size: .9rem; color: var(--ink-2); min-height: 1.2em; }
.pay-facts dl { display: grid; grid-template-columns: auto auto; gap: .45rem 1rem; margin: 0; }
.pay-facts dt { color: var(--ink-3); }
.pay-facts dd { margin: 0; text-align: right; font-family: var(--mono, ui-monospace, monospace); font-weight: 650; }
.pay-facts dd.big { font-size: 1.15rem; }
@media (max-width: 820px) { .pay-wrap { grid-template-columns: 1fr; } }

/* Printable receipt */
body.receipt-page { background: #fff; }
.receipt { max-width: 26rem; margin: 1.5rem auto; padding: 1.5rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .95rem; }
.receipt h1 { font-size: 1.25rem; margin: 0; letter-spacing: .04em; }
.receipt .store { text-align: center; border-bottom: 1px dashed var(--line); padding-bottom: .8rem; margin-bottom: .8rem; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin: 0; }
.receipt dt { color: var(--ink-3); }
.receipt dd { margin: 0; text-align: right; }
.receipt dd.cust-name { font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.receipt .total { border-top: 1px dashed var(--line); margin-top: .7rem; padding-top: .7rem; }
.receipt .total dd { font-weight: 700; }
.receipt .void-stamp { text-align: center; font-weight: 800; color: var(--brick); border: 2px solid var(--brick); border-radius: 8px; padding: .3rem; margin: .6rem 0; letter-spacing: .1em; }
.receipt-actions { display: flex; gap: .6rem; justify-content: center; margin: 1rem auto; }
.receipt-share { max-width: 32rem; margin: 0 auto 1.5rem; }
.receipt-share .banner { margin-bottom: .7rem; }
.receipt-share-row { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; justify-content: center; align-items: flex-start; }
.receipt-share form { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; justify-content: center; }
.receipt-share .hint { flex: 1 1 12rem; color: var(--ink-3); font-size: .85rem; }
.receipt-share input[type=email] { min-width: 14rem; height: 2.3rem; }
.receipt-share button:disabled { opacity: .55; cursor: not-allowed; }

@media print {
  .topbar, .beta-strip, .receipt-actions, .receipt-share, .backlink { display: none !important; }
  .receipt { border: 0; margin: 0 auto; padding: 0; max-width: 3.2in; font-size: 11pt; }
  .receipt dd.cust-name { font-size: 13pt; font-weight: 700; }
  body { background: #fff !important; }
}

/* Create Account */
.btn.brand { background: linear-gradient(140deg, #ffdc3d, #f5c518); border-color: #e0b200; color: #111; font-weight: 700; }
.btn.brand:hover { background: #f5c518; border-color: #c99f00; color: #111; }
.search-options .create-acct { margin-left: auto; white-space: nowrap; }
.no-match-create { margin-top: .7rem; }
.create-form { max-width: 1040px; }
.create-form .form-group { margin-bottom: 1rem; }
.create-form h2 { margin: 0 0 .8rem; font-size: 1.05rem; }
.create-form h3 { margin: .4rem 0 .6rem; font-size: .9rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.create-form .grid { display: grid; gap: 0 1rem; }
.create-form .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.create-form .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.create-form .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.create-form .grid.tight { gap: 0 .6rem; }
.create-form .span2 { grid-column: span 2; }
.create-form input, .create-form select { width: 100%; box-sizing: border-box; }
.create-form .upper input { text-transform: uppercase; }
.create-form .mono-in input, .create-form .money-in input { font-family: var(--mono, ui-monospace, monospace); }
.create-form .mono-in input { font-size: 1.25rem; font-weight: 700; max-width: 12rem; }
.create-form .req { color: var(--brick); }
.create-form .phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.create-form .phone-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 0 .5rem; }
.create-form .ref-grid { display: grid; grid-template-columns: 1.2fr .8fr 1fr 1.6fr; gap: 0 .8rem; }
.create-form .ref-head { font-weight: 650; font-size: .85rem; margin-bottom: .3rem; }
.create-form .sr-label label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.create-form .calc-box { background: #fffbe6; border: 1px solid #f2e2a0; border-radius: 10px; padding: .8rem 1rem .1rem; margin: .2rem 0 1rem; }
.create-form .calc-out { padding: .55rem 0; font-weight: 650; }
.create-form [hidden] { display: none !important; }
.form-actions { display: flex; gap: .8rem; align-items: center; margin: 1rem 0 2rem; }
.form-actions .btn.wide { width: auto; min-width: 14rem; }
@media (max-width: 820px) {
  .create-form .g3, .create-form .g4, .create-form .phones, .create-form .ref-grid { grid-template-columns: 1fr; }
  .create-form .span2 { grid-column: auto; }
  .create-form .ref-head { display: none; }
  .create-form .sr-label label { position: static; width: auto; height: auto; clip: auto; }
}
.create-form .field > label { display: block; }
.create-form .grid { align-items: start; }
.create-form select { height: 2.6rem; }
.create-form input { height: 2.6rem; }
.create-form .ssn-cell { margin: 0 0 1rem; }
.create-form label.check {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: .35rem 0 .6rem;
  font-weight: 600;
  cursor: pointer;
}
.create-form label.check input {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  flex: none;
  accent-color: var(--pine);
}
.offscreen-default { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ssn-dup-panel { display: block; margin-bottom: 1rem; }
.ssn-dup-panel .dup-group { margin-top: .6rem; }
.ssn-dup-panel .dup-label { font-weight: 650; }
.ssn-dup-panel .dup-list { margin: .3rem 0 0 1.1rem; padding: 0; }
.ssn-dup-panel .dup-list li { margin: .25rem 0; }
.ssn-dup-panel .dup-actions { margin-top: .8rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.ssn-dup:empty { display: none; }
.ssn-dup { margin: -.4rem 0 .8rem; padding: .5rem .7rem; border-radius: 8px; background: #fff4d6; border: 1px solid #f0d58a; font-size: .85rem; }
.ssn-dup.clear { background: #eef7f2; border-color: #cfe6da; }
.ssn-dup ul { margin: .25rem 0 0 1rem; padding: 0; }
.create-form .csz-row { display: grid; grid-template-columns: minmax(0, 2fr) 5rem 9rem 4.5rem; gap: 0 1rem; }
.create-form .csz-route input, .create-form .csz-state input { text-align: center; }
.create-form details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; }
.create-form details.fold > summary::-webkit-details-marker { display: none; }
.create-form details.fold > summary::before { content: "▸"; color: var(--ink-3); font-size: .9rem; transition: transform .15s; }
.create-form details.fold[open] > summary::before { transform: rotate(90deg); }
.create-form details.fold > summary h2 { margin: 0; }
.create-form details.fold[open] > summary { margin-bottom: .8rem; }
.create-form .fold-hint { color: var(--ink-3); font-size: .8rem; }
.create-form details.fold > summary:focus-visible { outline: 2px solid var(--pine-2); outline-offset: 4px; border-radius: 6px; }
.create-form input[readonly] { background: #f4f2ec; color: var(--ink-2); }
@media (max-width: 820px) { .create-form .csz-row { grid-template-columns: 1fr 1fr; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Counter stations & PINs */
.inline-form { display: inline; }
.station-badge { display: inline-flex; align-items: center; gap: .5rem; }
.station-badge .station-name { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff;
  border-radius: 999px; padding: .25rem .75rem; font-size: .85rem; font-weight: 600; }
.station-badge.active button { display: inline-flex; align-items: center; gap: .5rem; background: rgba(245,197,24,.14);
  border: 1px solid rgba(245,197,24,.55); color: #fff; border-radius: 999px; padding: .2rem .7rem .2rem .25rem; font: inherit;
  font-size: .88rem; cursor: pointer; }
.station-badge.active button:hover { background: rgba(245,197,24,.24); }
.station-badge .switch-hint { color: #f5c518; font-size: .78rem; font-weight: 600; }
.pin-card { max-width: 520px; margin: 1.5rem auto; }
.pin-card h1 { font-size: 1.35rem; margin: 0 0 .4rem; }
.pin-people { border: 0; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.pin-people legend { font-weight: 600; margin-bottom: .5rem; font-size: .9rem; }
.pin-person { position: relative; }
.pin-person input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pin-person span { display: block; text-align: center; padding: .85rem .5rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); font-weight: 600; }
.pin-person input:checked + span { border-color: var(--pine-2); background: #e6f1ec; box-shadow: inset 0 0 0 1px var(--pine-2); }
.pin-person input:focus-visible + span { outline: 2px solid var(--pine-2); outline-offset: 2px; }
.pin-form > label { display: block; font-weight: 600; font-size: .9rem; margin: .4rem 0 .3rem; }
.pin-input { font-size: 1.8rem; letter-spacing: .6em; text-align: center; width: 100%; max-width: 12rem; padding: .4rem .6rem;
  margin-bottom: 1rem; display: block; }

/* Manage > Users: create user */
.create-user > summary { list-style: none; cursor: pointer; }
.create-user > summary::-webkit-details-marker { display: none; }
.create-user[open] > summary { margin-bottom: 1rem; }
.create-user-form .field > label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.create-user-form .field input { width: 100%; height: 2.5rem; }
.create-user-form .req { color: var(--brick); }
.role-pick { border: 0; padding: 0; margin: 1rem 0 0; }
.role-pick legend { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.role-option { display: block; padding: .3rem 0; font-size: .92rem; }
.role-pick .typed-pw { margin-top: .4rem; }
.temp-pw { background: #fff; border: 1px dashed var(--line); padding: .15rem .5rem; border-radius: 6px; font-size: 1rem; user-select: all; }
tr.inactive td { color: var(--ink-3); }

/* OK to text */
.sms-consent { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem .7rem; margin-top: .9rem; }
.sms-consent legend { font-weight: 600; padding: 0 .3rem; }
.sms-consent.has-err { border-color: var(--brick); background: var(--brick-tint); }
.sms-disclosure { margin: .2rem 0 .5rem; font-size: .95rem; }
.sms-choices { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: .2rem 0 .3rem; }
.sms-choices label { display: flex; gap: .4rem; align-items: center; font-weight: 500; cursor: pointer; }
.sms-status p { margin: .2rem 0; }
.sms-change summary { cursor: pointer; color: var(--navy); margin: .3rem 0; }
.sms-form { display: grid; gap: .4rem; max-width: 26rem; }
.sms-form select { max-width: 16rem; }
.sms-choices input[type=radio], .create-form .sms-choices input[type=radio] { width: 1.15rem; height: 1.15rem; padding: 0; margin: 0; flex: none; accent-color: var(--pine); }
.sms-choices label { white-space: nowrap; }
/* audit log */
.audit-filters { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: flex-end; }
.audit-filters label { display: grid; gap: .15rem; font-size: .8rem; color: var(--ink-2); }
.audit-table ul.changes { margin: 0; padding-left: 1rem; }
.audit-table ul.changes ul { margin: .1rem 0 .3rem; padding-left: 1rem; }
.audit-table del { color: var(--brick); }

/* ---- Inventory ---- */
.inv-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.inv-filters .field { margin: 0; min-width: 10rem; }
.inv-filters .field:first-child { flex: 1 1 16rem; }
.inv-filters .filter-btns { display: flex; gap: .5rem; min-width: 0; }
.inv-table tr.is-low td { background: #fffbea; }
.inv-table tr.is-out td { color: #8a8f98; }
.inv-table td a { color: inherit; }
.inv-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; align-items: start; }
.inv-big { font-size: 1.05rem; margin: .25rem 0 .75rem; }
.inv-big strong { font-size: 2rem; margin-right: .25rem; }
td.neg { color: #b42318; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: .5rem 0 1rem; }
.checks label { display: flex; gap: .4rem; align-items: center; font-weight: 500; }
.parts-table input { width: 100%; max-width: 18rem; }
.parts-table td.num input { width: 4rem; text-align: right; }
.inv-item-form .span2 { grid-column: span 2; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .25rem 0; }
.inv-tabs { margin-bottom: 1rem; }
.offscreen { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pin-station { margin-top: -.25rem; font-weight: 600; }
.menu summary { padding: .3rem .55rem; border-radius: 6px; }
.menu summary:hover, .menu[open] summary { background: rgba(255,255,255,.12); color: #fff; }
.menu summary:focus-visible, .menu-pop a:focus-visible { outline: 2px solid #f5c400; outline-offset: 2px; }
.menu-pop { z-index: 50; min-width: 11rem; }
.menu-pop a[aria-current="page"] { font-weight: 700; background: var(--pine-tint); }
@media (max-width: 640px) { .menu-pop a { padding: .7rem .8rem; } }
/* Inventory → Vendors & locations: cards stacked full width, inputs sized to their columns */
.inv-stack { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.inv-stack > .card { min-width: 0; }
.setup-table { width: 100%; table-layout: auto; }
.setup-table th, .setup-table td { vertical-align: middle; }
.setup-table input:not([type=checkbox]) { width: 100%; min-width: 6rem; max-width: 28rem; box-sizing: border-box; }
.setup-table input[name=pick_order] { width: 4.5rem; min-width: 0; text-align: right; }
.setup-table input[name=code] { max-width: 9rem; }
.setup-table td:last-child, .setup-table th:last-child { width: 1%; white-space: nowrap; text-align: right; }
.setup-table td form { margin: 0; }
/* Inventory "In stock" box */
.inv-filters .instock-field { min-width: 0; align-self: flex-end; padding-bottom: .55rem; }
.inv-filters label.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.inv-filters label.check input { width: 1.15rem; height: 1.15rem; accent-color: #1f5a46; }
.inv-filters label.check input:disabled { cursor: not-allowed; opacity: .5; }

/* Cash sale (FSB-21) */
.sale-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.sale-main > .card, .sale-side > .card { margin-bottom: 1rem; }
.sale-side { position: sticky; top: 1rem; }
.sale-search { position: relative; }
.sale-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 18rem; overflow: auto; }
.sale-result { display: grid; grid-template-columns: auto 1fr auto auto; gap: .2rem .8rem; width: 100%; text-align: left; padding: .55rem .8rem; border: 0; border-bottom: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.sale-result:hover:not(:disabled), .sale-result:focus-visible { background: var(--pine-tint); }
.sale-result:disabled { opacity: .5; cursor: not-allowed; }
.sale-result .sr-avail { color: var(--ink-3); font-size: .8rem; align-self: center; }
.sale-result .sr-avail.out { color: var(--brick); font-weight: 700; }
.sale-none { padding: .7rem .9rem; color: var(--ink-3); }
.sale-lines input { width: 100%; min-width: 4rem; font: inherit; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 8px; text-align: right; }
.sale-lines input.sale-qty { max-width: 4.5rem; }
.sale-lines input.sale-price { max-width: 8rem; }
.sale-lines select { font: inherit; padding: .4rem .4rem; border: 1px solid var(--line); border-radius: 8px; max-width: 10rem; }
.sale-lines .price-note.changed { color: #8a5214; font-weight: 700; }
.sale-totals dl { display: grid; gap: .4rem; margin: 0; }
.sale-totals dl > div { display: flex; justify-content: space-between; gap: 1rem; }
.sale-totals dt { color: var(--ink-3); }
.sale-totals dd { margin: 0; font-weight: 650; }
.sale-totals .grand { border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .2rem; font-size: 1.25rem; }
.sale-totals .grand dt { color: var(--ink); font-weight: 700; }
.sale-pay { border: 1px solid var(--line); border-radius: 10px; padding: .6rem; margin-bottom: .6rem; display: grid; gap: .4rem; }
.sale-pay-top { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(5rem, 1fr) auto auto; gap: .4rem; align-items: center; }
.sale-pay input, .sale-pay select { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.sale-pay [hidden] { display: none !important; }
.sale-pay-sum { font-weight: 650; margin: .4rem 0; min-height: 1.3em; }
.sale-pay-sum.warn { color: #8a5214; }
.sale-pay-sum.bad { color: var(--brick); }
#sale-submit:disabled { opacity: .5; cursor: not-allowed; }
.sale-fulfil { margin-bottom: .4rem; }
@media (max-width: 960px) { .sale-grid { grid-template-columns: 1fr; } .sale-side { position: static; } }
.sale-receipt .items { width: 100%; border-collapse: collapse; margin: .2rem 0 .6rem; }
.sale-receipt .items td { padding: .2rem 0; vertical-align: top; }
.sale-receipt .items td.num { text-align: right; white-space: nowrap; font-family: var(--mono, ui-monospace, monospace); }
.sale-receipt .items .sub { color: var(--ink-3); font-size: .8rem; }
.sales-card .sale-items { margin: 0; padding-left: 1rem; font-size: .85rem; }
.tax-card label.check, .sale-form label.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tax-card label.check input, .sale-form label.check input { width: 1.15rem; height: 1.15rem; accent-color: #1f5a46; }

/* ---- Full-page (8.5 x 11) sale receipt: screen mirrors print ---- */
.sheet { position: relative; width: 8.5in; max-width: 100%; box-sizing: border-box; margin: 1.2rem auto 2rem; padding: .6in; background: #fff; border: 1px solid var(--line); border-radius: 6px; color: #17212b; font-size: 10.5pt; line-height: 1.4; page: sale; }
.sheet h1 { font-size: 22pt; letter-spacing: .08em; margin: 0 0 .25rem; }
.sheet .mono { font-family: var(--mono, ui-monospace, monospace); }
.sheet-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; padding-bottom: .8rem; border-bottom: 2px solid #17212b; }
.sheet-store { color: #333; }
.sheet-meta { text-align: right; }
.sheet-title { font-size: 15pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sheet-meta dl, .sheet-order dl { display: grid; grid-template-columns: auto auto; gap: .15rem .9rem; margin: .4rem 0 0; justify-content: end; }
.sheet-meta dt, .sheet-order dt { color: #666; text-align: right; }
.sheet-meta dd, .sheet-order dd { margin: 0; text-align: right; font-weight: 600; }
.sheet-rec { font-size: 13pt; font-weight: 800 !important; }
.sheet-voidnote { margin-top: .7rem; padding: .4rem .7rem; border: 2px solid var(--brick); color: var(--brick); border-radius: 4px; }
.sheet-parties { display: flex; justify-content: space-between; gap: 1.5rem; margin: 1.1rem 0 1.2rem; }
.sheet-label { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .1em; color: #666; margin-bottom: .2rem; }
.sheet .cust-name { font-size: 14pt; font-weight: 800; line-height: 1.25; margin-bottom: .1rem; }
.sheet-acct { margin-bottom: .1rem; color: #333; }
.sheet-order dl { justify-content: start; }
.sheet-order dt { text-align: left; }
.sheet-items { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.sheet-items th { text-align: left; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .08em; color: #444; padding: .45rem .5rem; border-top: 2px solid #17212b; border-bottom: 1px solid #17212b; background: #f1f3f4; }
.sheet-items td { padding: .5rem .5rem; border-bottom: 1px solid #c9ced2; vertical-align: top; }
.sheet-items tr { break-inside: avoid; page-break-inside: avoid; }
.sheet-items .c-sku { width: 1.55in; white-space: nowrap; }
.sheet-items th.c-qty, .sheet-items th.c-unit, .sheet-items th.c-tot, .sheet-items td.c-qty, .sheet-items td.c-unit, .sheet-items td.c-tot { text-align: right; }
.sheet-items .c-qty { width: .55in; }
.sheet-items .c-unit { width: 1.0in; }
.sheet-items .c-tot { width: 1.1in; }
.sheet-items td.c-qty, .sheet-items td.c-unit, .sheet-items td.c-tot { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-items .sub { color: #666; font-size: 8.5pt; }
.sheet-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; break-inside: avoid; page-break-inside: avoid; }
.sheet-pay { flex: 1 1 50%; }
.sheet-pay table, .sheet-totals table { width: 100%; border-collapse: collapse; }
.sheet-pay td { padding: .25rem 0; border-bottom: 1px solid #e1e4e6; }
.sheet-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-totals { flex: 0 0 3.1in; }
.sheet-totals td { padding: .28rem 0; }
.sheet .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-totals .grand td { border-top: 2px solid #17212b; font-size: 13pt; font-weight: 800; padding-top: .45rem; }
.sheet-foot { margin-top: 1.6rem; break-inside: avoid; page-break-inside: avoid; }
.sheet-policy { font-size: 9pt; color: #444; margin: 0 0 .6rem; overflow-wrap: anywhere; }
.sheet-thanks { text-align: center; font-weight: 600; margin: .4rem 0 1.4rem; }
.sheet-sign { display: flex; gap: 2rem; margin-top: 1.4rem; }
.sheet-sign div { flex: 1 1 0; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .08em; color: #555; }
.sheet-sign div:last-child { flex: 0 0 2in; }
.sheet-sign span { display: block; border-bottom: 1px solid #17212b; height: 1.1rem; margin-bottom: .25rem; }
.sheet-watermark { position: absolute; top: 3.6in; left: 0; right: 0; text-align: center; font-size: 90pt; font-weight: 900; letter-spacing: .12em; color: rgba(160, 50, 40, .16); transform: rotate(-24deg); pointer-events: none; user-select: none; }
.sheet-hint { max-width: 8.5in; }
@page sale { size: letter; margin: .6in .6in .7in; @bottom-center { content: "Page " counter(page) " of " counter(pages); font-family: Arial, Helvetica, sans-serif; font-size: 8pt; color: #666; } }
@media print {
  .sheet { border: 0; border-radius: 0; margin: 0; padding: 0; width: auto; box-shadow: none; }
  .sheet-hint { display: none !important; }
  .sheet-items thead { display: table-header-group; }
  .sheet-items th, .sheet-head, .sheet-items td, .sheet-voidnote, .sheet-watermark { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet-watermark { position: fixed; top: 3.4in; }
}
@media screen and (max-width: 8.6in) { .sheet { padding: 1rem; } .sheet-head, .sheet-parties, .sheet-bottom { flex-direction: column; } .sheet-meta { text-align: left; } .sheet-meta dl { justify-content: start; } .sheet-totals { flex: 1 1 auto; width: 100%; } }

/* ---- On order / custom item ---- */
.backorder-fill { display: flex; gap: .4rem; align-items: center; }
.backorder-fill .sale-qty { width: 3.4rem; }
.stock-ok { color: #1f5a46; } .stock-short { color: #9a4b00; }
.sale-oos { background: #fff4e0; border: 1px solid #e3b866; border-radius: 8px; padding: .7rem .9rem; margin-top: .8rem; color: #5b3a00; }
.sale-oos ul { margin: .3rem 0 .5rem 1.1rem; padding: 0; }
.sale-oos label { display: flex; gap: .5rem; align-items: center; font-weight: 700; cursor: pointer; }
.sale-oos input { width: 1.15rem; height: 1.15rem; accent-color: #9a4b00; }
.sale-line.is-custom .cust-desc { width: 100%; }
.sale-line .oos-note { color: #9a4b00; font-weight: 600; font-size: .82rem; margin-top: .15rem; }
.sale-line.is-short { background: #fffaf0; }
.chip.warn { background: #fff0d1; color: #8a4b00; }
.sr-avail.out { background: #fde7c8; color: #8a4b00; border-radius: 999px; padding: .05rem .5rem; font-weight: 700; }
.sale-result:disabled { opacity: 1; }
.sale-custom-btn { margin-top: .4rem; }
.tag-custom { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: .05rem .4rem; border: 1px solid #888; border-radius: 4px; color: #444; }
.sheet-onorder { font-weight: 800; color: #8a4b00; font-size: 9pt; margin-top: .15rem; }

.sheet-items .c-desc { overflow-wrap: anywhere; }
.sheet-items .line-text { font-weight: 600; font-feature-settings: "calt" 0, "liga" 0; }
.sale-fee[hidden], .sale-oos[hidden], .sale-line .oos-note[hidden] { display: none; }
.sale-line .cust-desc { min-width: 9rem; margin-top: .25rem; }
.sales-card .history-scroll { flex: none; max-height: 20rem; margin: 0 -1.25rem -1.15rem; }
