/* OFFCANNY, Inc. billing. Foundations live in tokens.css. */

/* ---------- shell ---------- */
/* floating liquid-glass bar: sticky, inset from the edges, see-through */
.header {
  position: sticky; top: 14px; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  margin: 14px 20px 0; padding: 0 18px 0 20px; height: 54px;
  border-radius: 16px; isolation: isolate; color: var(--heading);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.2));
  -webkit-backdrop-filter: blur(9px) saturate(190%) brightness(1.04);
  backdrop-filter: blur(9px) saturate(190%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 0 0.5px rgba(18, 22, 31, 0.05),
    0 1px 1px rgba(18, 22, 31, 0.05),
    0 12px 32px -12px rgba(18, 22, 31, 0.28);
}
/* specular sheen across the top edge */
.header::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(120% 140% at 12% -30%, rgba(255, 255, 255, 0.85), transparent 45%),
    radial-gradient(80% 120% at 92% 130%, rgba(226, 85, 47, 0.07), transparent 60%);
}
.header__wm { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 800; font-size: 15px; letter-spacing: -0.02em; text-decoration: none; }
.header__wm:hover { text-decoration: none; }
.header__mark { width: 10px; height: 10px; border-radius: 3px; background: var(--signal); box-shadow: 0 0 0 3px var(--signal-tint); flex: none; }
.header__mid { color: var(--ink-2); font-size: 14px; padding-left: 16px; border-left: 1px solid rgba(18, 22, 31, 0.14); line-height: 20px; }
.header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; }
.header__right .btn.quiet { color: var(--ink-2); }
.header__right .btn.quiet:hover { color: var(--heading); background: rgba(255, 255, 255, 0.7); }
.header__secure { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.header__secure svg { width: 14px; height: 14px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 40px 24px 80px; }
.wrap.narrow { max-width: 480px; padding-top: 72px; }
.wrap.wide { max-width: 1160px; }
.wrap.form { max-width: 1120px; }

body { background:
  radial-gradient(1100px 420px at 85% -120px, rgba(226, 85, 47, 0.10), transparent 70%),
  radial-gradient(900px 380px at 8% -160px, rgba(44, 79, 163, 0.07), transparent 70%),
  var(--desk); background-repeat: no-repeat; }
.footer { max-width: 1160px; margin: 0 auto; padding: 8px 24px 40px; display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; font-size: 13px; color: var(--ink-3); }

/* ---------- type ---------- */
h1.display { font-size: 44px; line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; margin: 0 0 10px; color: var(--heading); text-wrap: balance; }
.wrap.narrow h1.display { font-size: 34px; }
h2.sec { font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; margin: 40px 0 14px; color: var(--heading); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h3.sub { font-size: 15px; font-weight: 600; margin: 28px 0 6px; color: var(--heading); }
.lede { color: var(--ink-2); margin: 0 0 28px; max-width: 62ch; }
.eyebrow { font-size: 14px; color: var(--ink-3); margin: 0 0 8px; }
.eyebrow a { color: var(--ink-3); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono-amt { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
code { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 13px; background: var(--well); border: 1px solid var(--line); border-radius: var(--r-1); padding: 1px 5px; }
a.u { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- surfaces ---------- */
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--lift); }
.panel + .panel { margin-top: 20px; }
.panel__head { padding: 20px 24px 0; }
.panel__head h2 { font-size: 17px; font-weight: 600; margin: 0; color: var(--heading); letter-spacing: -0.005em; }
.panel__head p { margin: 4px 0 0; font-size: 14px; color: var(--ink-3); }
.panel__body { padding: 20px 24px 24px; }
.panel__foot { padding: 16px 24px; border-top: 1px solid var(--line-2); background: var(--well); border-radius: 0 0 var(--r-3) var(--r-3); font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; align-items: flex-start; }
.panel__foot svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  font-size: 14px; font-weight: 600; line-height: 1;
  border-radius: var(--r-2);
  border: 1px solid var(--line); background: var(--sheet); color: var(--ink);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), box-shadow 140ms var(--ease), transform 140ms var(--ease);
}
.btn:hover { text-decoration: none; border-color: var(--field-hover); background: var(--well); }
.btn:active { transform: translateY(1px); }
.btn.loud { background: var(--act); border-color: var(--act); color: #fff; box-shadow: 0 1px 2px rgba(18, 22, 31, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn.loud:hover { background: var(--act-dk); border-color: var(--act-dk); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 10px; }
.btn.quiet:hover { background: var(--line-2); color: var(--heading); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn.quiet.sm { padding: 0 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* ---------- status ---------- */
.tape {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  font-size: 12.5px; font-weight: 600; line-height: 1;
  border-radius: 999px; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
}
.tape::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.tape.flare { background: var(--ok-tint); color: var(--ok); }
.tape.live { background: var(--due-tint); color: var(--due); }
.tape.bad { background: var(--bad-tint); color: var(--bad); }
.tape.info { background: var(--info-tint); color: var(--info); }
.tape.void { text-decoration: line-through; }
.tape.void::before { display: none; }

/* ---------- notices ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--blue-line); background: var(--blue-tint); color: var(--ink); border-radius: var(--r-2); padding: 12px 14px; margin: 0 0 20px; font-size: 14px; }
.notice.warn { border-color: var(--bad-line); background: var(--bad-tint); color: #7E1C16; }
.notice.ok { border-color: var(--ok-line); background: var(--ok-tint); color: #0B5434; }
.notice strong { font-weight: 600; }

/* ---------- forms ---------- */
.field { display: block; margin: 0 0 16px; min-width: 0; }
.field > span { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field > span i { font-style: normal; font-weight: 400; color: var(--ink-3); }
.field small { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.field input, .field textarea, .field select, .items input, .items select {
  width: 100%; height: 44px; padding: 0 12px;
  background: var(--field); color: var(--ink);
  border: 1px solid var(--field-line); border-radius: var(--r-2);
  font-size: 15px;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.field textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field select, .items select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%234A5161' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field input::placeholder, .items input::placeholder { color: var(--placeholder); }
.field input:hover, .field select:hover, .field textarea:hover, .items input:hover, .items select:hover { border-color: var(--field-hover); }
.field input:focus, .field textarea:focus, .field select:focus, .items input:focus, .items select:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(226, 85, 47, 0.16); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-addr { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 16px; }
.narrow-form { max-width: 360px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { display: none; }

/* segmented choice (account type) */
/* how to be paid: five quiet tiles, the chosen one inked */
.methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.method { position: relative; cursor: pointer; }
.method input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.method > span { display: flex; align-items: center; justify-content: center; text-align: center; height: 46px; padding: 0 8px; border: 1px solid var(--field-line); border-radius: var(--r-2); background: var(--field); color: var(--ink-2); transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), color 140ms var(--ease); }
.method b { font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.method input:checked + span b { color: var(--heading); }
.method:hover > span { border-color: var(--field-hover); }
.method input:checked + span { border-color: var(--heading); box-shadow: inset 0 0 0 1px var(--heading); color: var(--heading); }
.method input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.via-pane[hidden], [data-pane][hidden] { display: none; }
fieldset.via-pane { border: 0; padding: 0; margin: 0; min-width: 0; }

/* paying by hand: the handle to send to, then confirm */
.manual { display: grid; gap: 18px; max-width: 560px; }
.manual__send { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--well); }
.manual__send small { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 2px; }
.manual__handle { all: unset; display: block; width: 100%; font-size: 17px; font-weight: 700; color: var(--heading); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; }
.manual__send > div { min-width: 0; flex: 1; }
.manual__form { display: grid; gap: 14px; }
.manual__form .btn { justify-self: start; }
.seg { display: inline-grid; box-shadow: inset 0 1px 2px rgba(18, 22, 31, 0.06); grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--line-2); border-radius: var(--r-2); padding: 3px; gap: 3px; width: 100%; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; height: 36px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background 140ms var(--ease), color 140ms var(--ease), box-shadow 140ms var(--ease); }
.seg input:checked + span { background: var(--raise); color: var(--heading); box-shadow: 0 1px 2px rgba(18, 22, 31, 0.12), 0 0 0 1px rgba(18, 22, 31, 0.06); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.seg-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }

.checkline { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--well); cursor: pointer; margin: 0 0 20px; font-size: 14px; }
.checkline input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.checkline b { display: block; font-weight: 600; }
.checkline span span { color: var(--ink-3); }

/* line items */
.items { margin: 0 0 4px; }
.items__head, .item { display: grid; grid-template-columns: minmax(0, 1fr) 104px 76px 132px 100px 32px; gap: 10px; align-items: center; }
.items__head-price { grid-column: span 2; }
.item:not(.is-hourly) .item__hours { display: none; }
.item:not(.is-hourly) .money-in { grid-column: 3 / span 2; }
.unit-in { position: relative; display: block; }
.unit-in input { padding-right: 38px; text-align: right; }
.unit-in i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--ink-3); pointer-events: none; }
.items select.item__per { height: 42px; width: 100%; padding: 0 30px 0 12px; font-size: 14px; background-position: right 10px center; }
.money-in__per { display: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--ink-3); pointer-events: none; }
.item.is-hourly .money-in__per { display: block; }
.item.is-hourly .money-in input { padding-right: 36px; }
.panel__head--split { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; }
.seg.seg--sm { width: auto; }
.seg.seg--sm span { height: 32px; padding: 0 12px; font-size: 13.5px; }
.money-in { position: relative; display: block; }
.money-in span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.items .money-in input { padding-left: 24px; text-align: right; }
.items__head { font-size: 13px; font-weight: 500; color: var(--ink-3); padding: 0 0 8px; }
.item { padding: 0 0 10px; }
.items input { height: 42px; }
.item__amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink); }
.item__x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: none; border: 0; border-radius: 6px; color: var(--ink-3); cursor: pointer; }
.item__x:hover { background: var(--bad-tint); color: var(--bad); }
.item__x svg { width: 16px; height: 16px; }
.add-line { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; color: var(--heading); font-weight: 600; font-size: 14px; cursor: pointer; }
.add-line:hover { text-decoration: underline; text-underline-offset: 3px; }
.add-line svg { width: 16px; height: 16px; color: var(--signal); }

/* the accountant's total: hairline above, double rule below */
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0 10px; border-top: 1px solid var(--line-ink); border-bottom: 3px double var(--line-ink); }
.total span { font-size: 14px; font-weight: 600; color: var(--heading); }
.total strong { font-size: 28px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--heading); }
.items__total { margin-top: 16px; }

/* ---------- the invoice form ---------- */
.page-head { margin: 0 0 28px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.summary { position: sticky; top: 84px; }
.summary .panel__body { padding: 22px 22px 18px; }
.summary__to { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.summary__to svg { width: 40px; height: 40px; flex: none; }
.summary__to small { display: block; font-size: 13px; color: var(--ink-3); }
.summary__to b { display: block; font-weight: 600; color: var(--heading); }
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.summary__row b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary .total { margin: 0 0 18px; }
.stub { position: relative; padding: 22px 22px 22px; border-top: 1.5px dashed var(--field-line); background: var(--well); border-radius: 0 0 var(--r-3) var(--r-3); }
.stub::before, .stub::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--desk); box-shadow: inset 0 0 0 1px var(--line); }
.stub::before { left: -11px; clip-path: inset(0 0 0 50%); }
.stub::after { right: -11px; clip-path: inset(0 50% 0 0); }
.stub__label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.summary .btn.lg { width: 100%; }
.next { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line-2); counter-reset: n; display: grid; gap: 12px; }
.next li { counter-increment: n; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.next li::before { content: counter(n); display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--signal-tint); color: var(--signal); font-size: 12px; font-weight: 700; }
.u-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- invoice page ---------- */
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding: 26px 28px 24px; border-bottom: 1px solid var(--line-2); }
.inv-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 4px; color: var(--heading); }
.inv-head p { margin: 0; color: var(--ink-3); font-size: 14px; }
.amount { font-size: 44px; line-height: 1; font-weight: 900; letter-spacing: -0.04em; color: var(--heading); font-variant-numeric: tabular-nums; text-align: right; margin: 0 0 8px; }
.inv-head__amt { text-align: right; }
.inv-body { padding: 8px 28px 28px; }
.inv-action { padding: 20px 28px; border-top: 1px solid var(--line-2); background: var(--well); border-radius: 0 0 var(--r-3) var(--r-3); }
.inv-action .notice { margin: 0 0 14px; }
.inv-action .notice:last-child { margin: 0; }
.inv-action > p { margin: 0; color: var(--ink-2); font-size: 14px; }

.kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 24px; }
.kv > div { padding: 14px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.kv dt { font-size: 13px; color: var(--ink-3); margin-bottom: 2px; }
.kv dd { margin: 0; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

.pay-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 560px; text-align: left; padding: 14px 18px; border: 1px solid var(--act); border-radius: var(--r-2); background: var(--act); color: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); transition: background 140ms var(--ease); }
.pay-opt:hover { background: var(--act-dk); }
.pay-opt b { display: block; font-size: 16px; font-weight: 600; }
.pay-opt span { display: block; font-size: 13px; color: #C9CED8; margin-top: 2px; }
.pay-opt svg { width: 20px; height: 20px; flex: none; }

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-weight: 500; font-size: 13px; color: var(--ink-3); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list .r { text-align: right; padding-right: 0; padding-left: 16px; white-space: nowrap; }
table.list tfoot td { border-top: 1px solid var(--line-ink); border-bottom: 3px double var(--line-ink); font-weight: 600; color: var(--heading); padding-top: 12px; padding-bottom: 12px; }
table.list a.row-a { font-weight: 600; color: var(--heading); white-space: nowrap; }
table.list tr.is-void td { color: var(--ink-3); }
table.list tr.is-void .mono-amt { text-decoration: line-through; }
.table-card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--lift); padding: 4px 20px; }
.empty { padding: 28px 0; color: var(--ink-3); font-size: 14px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wrap.wide .scroll table.list { min-width: 820px; }
.wrap.wide .scroll table.list.fit { min-width: 0; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.cell-sub { display: block; font-size: 13px; color: var(--ink-3); }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 28px; }
.stat { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-3); padding: 18px 20px; box-shadow: var(--lift); }
.stat dt { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.stat dd { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; color: var(--heading); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat dd a { font-size: 15px; font-weight: 600; }
.stat small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { margin: 0; }

.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: -8px 0 28px; padding: 4px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-2); width: fit-content; max-width: 100%; }
.subnav a { padding: 7px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.subnav a:hover { background: var(--well); color: var(--heading); text-decoration: none; }
.subnav a[aria-current="page"] { background: var(--act); color: #fff; }

.year-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.year-row .field { margin: 0 0 16px; min-width: 120px; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 0 0 16px; }
.filters .field { margin: 0; flex: 1 1 160px; }
form.inline, .inline { display: inline-flex; margin: 0; }
form.mini { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin: 0; }
form.mini select, form.mini input { height: 32px; padding: 0 8px; font-size: 13px; background: var(--field); color: var(--ink); border: 1px solid var(--field-line); border-radius: 6px; max-width: 160px; }
.actions-cell { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.actions-cell form { margin: 0; }
input.num { width: 104px; height: 32px; padding: 0 8px; text-align: right; font-size: 13px; background: var(--field); color: var(--ink); border: 1px solid var(--field-line); border-radius: 6px; }
label.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
label.check input { accent-color: var(--blue); width: 16px; height: 16px; }
.submit-box { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--sheet); box-shadow: var(--lift); }
.submit-box p { margin: 0 0 14px; font-size: 14px; }
.submit-box .field { max-width: 320px; }
fieldset.choice { margin: 0 0 16px; }
fieldset.choice legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
fieldset.choice label { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; cursor: pointer; }
fieldset.choice input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; }

/* utilities (inline styles are blocked by the CSP) */
.u-m0 { margin: 0 !important; } .u-grow { flex: 1; margin: 0 !important; } .u-end { align-self: end; } .u-span { grid-column: 1 / -1; }
.u-mb20 { margin: 0 0 20px; } .u-mb10 { margin: 0 0 10px; } .u-inline { display: inline; } .u-memo { margin-top: 20px; white-space: pre-wrap; }
.u-mt32 { margin-top: 32px; } .u-mt12 { margin-top: 12px; } .u-right { text-align: right; } .u-mt40 { margin-top: 40px; }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 760px) {
  .grid3, .stats { grid-template-columns: 1fr; }
  .wrap.wide .scroll table.list { min-width: 680px; }
}
@media (max-width: 640px) {
  .methods { grid-template-columns: repeat(2, 1fr); }
  .header { margin: 10px 10px 0; top: 10px; padding: 0 14px; height: 52px; border-radius: 14px; }
  h1.display { font-size: 34px; }
  .amount { font-size: 36px; }
  .header__mid, .header__secure span { display: none; }
  .wrap { padding: 24px 14px 56px; }
  .wrap.narrow { padding-top: 40px; }
  .panel__head { padding: 18px 18px 0; }
  .panel__body { padding: 16px 18px 20px; }
  .panel__foot { padding: 14px 18px; }
  .grid2, .grid-addr { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .kv > div { padding: 12px 0; }
  .items__head { display: none; }
  .item { grid-template-columns: 92px 78px minmax(0, 1fr) 32px; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .item > :first-child { grid-column: 1 / 4; grid-row: 1; }
  .item .item__x { grid-column: 4; grid-row: 1; }
  .item .item__per { grid-column: 1; grid-row: 2; }
  .item .item__hours { grid-column: 2; grid-row: 2; }
  .item .money-in { grid-column: 3 / 5; grid-row: 2; }
  .item:not(.is-hourly) .money-in { grid-column: 2 / 5; }
  .item .item__amt { grid-column: 1 / 5; grid-row: 3; font-size: 13px; color: var(--ink-3); }
  .item:not(.is-hourly) .item__amt { display: none; }
  .inv-head, .inv-body, .inv-action { padding-left: 18px; padding-right: 18px; }
  .inv-head__amt, .amount { text-align: left; }
  table.list .hide-sm { display: none; }
  .table-card { padding: 4px 14px; }
  .footer { padding: 0 14px 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
