:root {
  --navy-900: #0b2f38; --navy-800: #11404a;
  --teal-600: #0b8a86; --teal-100: #dff3f1;
  --ink: #1f3338; --muted: #5f7478; --line: #d9e4e4;
  --surface: #ffffff; --canvas: #f4f8f8;
  --danger: #a52a22; --success: #1f7a4d; --warning: #9a6a00;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: var(--ink); background: var(--canvas); line-height: 1.5; font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal-600); text-underline-offset: .2em; }
button,input,select,textarea { font: inherit; }
button,.button { border: 1px solid var(--teal-600); border-radius: 6px; background: var(--teal-600); color: var(--surface); padding: .65rem 1rem; text-decoration: none; cursor: pointer; display: inline-block; white-space: nowrap; }
button:hover,.button:hover { background: var(--navy-800); border-color: var(--navy-800); }
button:disabled { opacity: .55; cursor: default; }
.secondary { background: var(--surface); color: var(--teal-600); border-color: var(--line); }
.secondary:hover { background: var(--teal-100); color: var(--navy-900); border-color: var(--teal-600); }
.quiet { background: transparent; border-color: var(--navy-800); color: var(--surface); width: 100%; }
input,select,textarea { border: 1px solid var(--line); border-radius: 6px; padding: .6rem; background: var(--surface); color: var(--ink); max-width: 100%; width: 100%; min-width: 0; }
:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 3px; }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
small { font-size: .8rem; font-weight: 400; color: var(--muted); }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 20; padding: .6rem 1rem; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--navy-900); color: var(--surface); padding: 24px 16px 18px; display: flex; flex-direction: column; overflow-y: auto; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.65rem; letter-spacing: -.04em; font-weight: 700; color: var(--surface); text-decoration: none; padding: 0 8px 25px; }
.brand img { object-fit: contain; }
.company-picker { margin: 0 0 24px; }
.company-picker label { font-size: .75rem; color: var(--line); margin: 0 0 6px 8px; }
.company-picker select { font-size: .85rem; background: var(--navy-800); border-color: var(--navy-800); color: var(--surface); }
.workspace-navigation { display: grid; gap: 6px; }
.workspace-navigation a,.workspace-navigation summary { display: block; padding: 10px 12px; color: var(--line); border-radius: 6px; text-decoration: none; font-size: .88rem; }
.workspace-navigation summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; font-weight: 600; }
.workspace-navigation summary > a { padding: 0; color: inherit; font-size: inherit; flex: 1; }
.workspace-navigation summary > a[aria-current] { background: transparent; color: var(--surface); }
.workspace-navigation summary::-webkit-details-marker { display: none; }
.workspace-navigation summary::after { content: '+'; }
.workspace-navigation details[open] > summary::after { content: '−'; }
.workspace-navigation details > div { padding: 0 0 6px 12px; }
.workspace-navigation a:hover,.workspace-navigation summary:hover { background: var(--navy-800); color: var(--surface); }
.workspace-navigation a[aria-current] { background: var(--teal-100); color: var(--navy-900); font-weight: 650; }
.sidebar-footer { margin-top: auto; padding-top: 26px; }
.console-link { color: var(--line); font-size: .85rem; display: block; margin-bottom: 15px; }
.user-chip { border-top: 1px solid var(--navy-800); padding: 18px 0 14px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.user-chip > div { min-width: 0; }
.initials { background: var(--navy-800); border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; font-size: .7rem; flex-shrink: 0; }
.user-email { display: block; font-size: .75rem; overflow-wrap: anywhere; }
.user-chip small { display: block; color: var(--line); }
.topbar { margin-left: 248px; min-height: 72px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 20px; padding: 14px 32px; position: relative; z-index: 6; }
.section-title { font-weight: 600; }
.create-menu { margin-left: auto; position: relative; }
.create-menu summary { list-style: none; min-width: 108px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.create-menu summary::-webkit-details-marker { display: none; }
.create-menu ul { position: absolute; right: 0; top: 100%; width: 220px; margin: 8px 0 0; padding: 8px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px color-mix(in srgb,var(--navy-900) 14%,transparent); }
.create-menu a { display: block; padding: 9px 12px; text-decoration: none; color: var(--ink); border-radius: 6px; }
.create-menu a:hover { background: var(--teal-100); }
.menu-toggle { display: none; }
main { margin: 0 0 0 248px; padding: 32px; min-width: 0; }
h1 { font-size: 1.8rem; line-height: 1.2; margin: 0 0 1.5rem; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: 1.05rem; margin: 0 0 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; margin-bottom: 20px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-heading h1 { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 1.5rem; }
.field { margin-bottom: 1.1rem; }
.line-row { display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: .8rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.line-row .remove-line { align-self: center; }
.total { display: flex; justify-content: flex-end; gap: 2rem; font-size: 1.2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.buttons { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.search label { margin: 0; }
.search input { flex: 1; min-width: min(12rem,100%); width: auto; }
.search select { width: auto; }
.table-scroll,.scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .75rem; border-bottom: 1px solid var(--line); }
td,th { padding: .8rem .6rem; vertical-align: top; }
td { border-bottom: 1px solid var(--line); }
td small { display: block; margin-top: 3px; }
.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.summary div { flex: 1; min-width: 9rem; }
dt { color: var(--muted); font-size: .8rem; }
dd { margin: .25rem 0; }
.status { background: var(--teal-100); border-radius: 20px; padding: .35rem 1rem; color: var(--navy-900); }
.message { padding: 1rem; border-radius: 6px; background: var(--teal-100); }
.message.error,.errorlist,[role=status] { color: var(--danger); }
.errorlist { list-style: none; padding: 0; margin: .3rem 0; font-size: .85rem; }
.pagination { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.5rem; }
.reversal-row { color: var(--danger); background: var(--canvas); }
.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; }
input[type=checkbox] { width: 1.2rem; height: 1.2rem; }
.section-links { padding-left: 1.2rem; }
.section-links li { margin: .8rem 0; }
[aria-disabled=true],.muted { color: var(--muted); }
.status-filters { display: flex; gap: .7rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.status-filters a { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.status-filters a[aria-current] { background: var(--teal-100); font-weight: 650; }
[data-reconciliation] input[type=checkbox]+label { display: inline; margin-left: .5rem; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 24px; }
.dashboard-heading h1 { margin-bottom: 8px; }
.dashboard-heading p { margin: 0; color: var(--muted); font-size: .85rem; }
.earnings { text-align: right; }
.earnings strong,.earnings small { display: block; }
.earnings strong { font-size: 1.1rem; color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.stat-card { padding: 20px; min-width: 0; }
.stat-card h2 { color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.stat-value { font-size: clamp(1.4rem,2.1vw,2rem); font-weight: 650; letter-spacing: -.03em; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.stat-note { font-size: .75rem; color: var(--muted); margin: 0; }
.stat-note strong { font-weight: 600; }
.account-balances { margin: 0; padding: 0; list-style: none; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.account-balances li { display: flex; justify-content: space-between; gap: 12px; }
.dashboard-work { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 20px; }
.attention:only-child { grid-column: 1 / -1; }
.attention ul { list-style: none; padding: 0; margin: 0; }
.attention li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.attention li:last-child { border-bottom: 0; }
.attention .empty-state { color: var(--muted); padding: 16px 0; }
.attention .button { font-size: .8rem; padding: 6px 12px; }
.quick-actions > div { display: grid; gap: 6px; }
.quick-actions a { display: flex; justify-content: space-between; gap: 10px; text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: .85rem; background: var(--canvas); }
.quick-actions a:hover { background: var(--teal-100); }
.pill { display: inline-block; font-size: .7rem; font-weight: 600; border-radius: 20px; padding: 3px 9px; white-space: nowrap; }
.pill-muted { background: var(--canvas); color: var(--muted); }
.pill-teal { background: var(--teal-100); color: var(--teal-600); }
.pill-success { background: color-mix(in srgb,var(--success) 10%,var(--surface)); color: var(--success); }
.pill-danger { background: color-mix(in srgb,var(--danger) 10%,var(--surface)); color: var(--danger); }
.pill-warning { background: color-mix(in srgb,var(--warning) 10%,var(--surface)); color: var(--warning); }
.recent-activity table { min-width: 720px; }
.recent-activity td:first-child { white-space: nowrap; }
.account-detail > summary { cursor: pointer; font-weight: 600; font-size: .85rem; }
.account-detail[open] > summary { margin-bottom: 20px; }
.account-detail h2 { margin-top: 24px; }
.auth-layout .topbar { display: none; }
.auth-layout main { margin: 0; padding: 48px 16px; }
.auth-card { max-width: 560px; margin: 0 auto; padding: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.auth-brand { width: 176px; max-height: 130px; object-fit: contain; display: block; margin: 0 auto 28px; }
.auth-card h1 { text-align: center; font-size: 1.6rem; }
.auth-card form > p { margin: 0 0 18px; }
.auth-card form > button { width: 100%; }
.auth-card .helptext { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.company-cards { display: grid; gap: 12px; }
.company-card { border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.company-card h2 { margin-bottom: 4px; }
.company-card p { margin: 0; font-size: .8rem; color: var(--muted); }
.company-card a { white-space: nowrap; }
.platform-company > section,.console-content > section { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; margin: 24px 0; overflow-x: auto; }
.console-layout main { margin: 0 auto; max-width: 1250px; }
.console-layout .topbar { margin-left: 0; }
.console-layout .topbar form { margin-left: auto; }
.console-content > nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
form.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 12px 0; }
textarea { min-height: 4rem; }
@media(max-width:1100px) and (min-width:901px) { .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:900px) {
  .topbar { margin-left: 0; padding: 12px 16px; min-height: 64px; gap: 16px; }
  .menu-toggle { display: block; }
  .menu-toggle summary { cursor: pointer; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; list-style: none; }
  .menu-toggle summary::-webkit-details-marker { display: none; }
  .sidebar { display: none; top: 64px; max-width: calc(100vw - 32px); }
  body:has(.menu-toggle[open]) .sidebar { display: flex; box-shadow: 10px 0 30px color-mix(in srgb,var(--navy-900) 20%,transparent); }
  main { margin-left: 0; padding: 24px 16px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-heading { flex-direction: column; }
  .earnings { text-align: left; }
  .dashboard-work { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 20px; }
}
@media(max-width:650px) {
  .form-grid,.line-row { grid-template-columns: 1fr; }
  .line-row .field { margin-bottom: 0; }
  .line-row .remove-line { justify-self: start; }
  .total { justify-content: space-between; }
  .stat-grid { grid-template-columns: 1fr; gap: 0; }
  .stat-value { font-size: 2rem; }
  .auth-layout main { padding-top: 24px; }
  .auth-card { padding: 24px 20px; }
  .company-card { align-items: start; }
}

/* Accounting documents share the shell's tokens and working controls. */
.document-header { margin-bottom: 24px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .8rem; margin-bottom: 14px; }
.breadcrumb a { text-decoration: none; }
.heading-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.heading-title h1 { margin: 0; }
.document-header > p { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
.document-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.document-layout > * { min-width: 0; }
.summary-card dl { margin: 0; }
.summary-card dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; }
.summary-card .summary { display: flex; }
.summary-card .summary > div { display: block; padding: 0; }
.summary-card dd { font-weight: 600; }
.summary-card .total { margin: 8px 0; font-size: 1.25rem; }
.state-note { font-size: .8rem; padding: 14px; border-radius: 6px; background: var(--canvas); color: var(--muted); margin: 18px 0 0; }
.form-footer { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; z-index: 2; }
.lines-table { min-width: 610px; }
.lines-table td:first-child { width: 30px; color: var(--muted); }
.lines-table td:nth-child(2) { width: 36%; }
.lines-table td:nth-child(3) { width: 27%; }
.lines-table td:nth-child(4) { width: 19%; min-width: 100px; }
.lines-table input[name$="-amount"] { text-align: right; font-variant-numeric: tabular-nums; }
.lines-table button { padding: .6rem .7rem; font-size: .8rem; }
[data-add-line] { margin-top: 16px; }
.memo-field { margin: 24px 0 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin: 0 0 24px; }
.filter-bar > div:first-child { flex: 1; min-width: min(250px,100%); }
.filter-bar label { font-size: .8rem; color: var(--muted); }
.filter-bar select { min-width: 160px; }
.list-empty { padding: 48px 20px; text-align: center; }
.list-empty p { color: var(--muted); margin-bottom: 24px; }
.destination-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.destination-card { text-decoration: none; display: flex; flex-direction: column; margin: 0; color: var(--ink); }
.destination-card:hover { border-color: var(--teal-600); background: var(--teal-100); }
.destination-card p { font-size: .85rem; color: var(--muted); margin: 0 0 24px; }
.destination-card > span { font-size: .8rem; color: var(--teal-600); margin-top: auto; }
.message.success { color: var(--success); }
@media(max-width:900px) {
  .document-layout { grid-template-columns: 1fr; gap: 0; }
  .destination-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .destination-grid { grid-template-columns: 1fr; }
  .form-footer { padding: 12px; align-items: start; flex-wrap: wrap; }
  .form-footer .buttons { gap: 8px; }
  .form-footer .button,.form-footer button { padding: .6rem .8rem; }
  .filter-bar > div { width: 100%; }
}

.lines-table td { position: relative; }

/* Bank review, statements and the platform console share the design tokens. */
.bank-account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.feed-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.account-card { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.account-card h2 { margin-bottom: 8px; }
.account-card p { font-size: .85rem; color: var(--muted); margin: 0; }
.account-card dl { display: flex; gap: 32px; margin: 0; }
.account-card dd { font-weight: 650; }
.transaction-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: -8px 0 24px; }
.match-rows { list-style: none; padding: 0; margin: 0; }
.match-rows li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.match-row { display: flex; align-items: center; gap: 16px; margin: 0; cursor: pointer; }
.match-row input[type=radio] { width: 18px; height: 18px; flex-shrink: 0; }
.match-row > span { flex: 1; }
.match-row small { display: block; margin-top: 6px; }
.categorise-panels details > summary { font-weight: 650; cursor: pointer; }
.categorise-panels details[open] > summary { margin-bottom: 24px; }
.reconciliation-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
.reconciliation-columns > section { min-width: 0; overflow-x: auto; margin-bottom: 0; }
.reconciliation-columns > section[data-reconciliation-action]:not([data-reconciliation-action=clear]):not([data-reconciliation-action=unclear]) { grid-column: 1 / -1; }
.action-description { color: var(--muted); font-size: .85rem; }
.report-heading .print-button { margin-left: auto; }
.report-filter .field { margin: 0; }
.total-row { font-weight: 650; border-top: 2px solid var(--line); background: var(--canvas); }
p.total-row { padding: 16px; }
.console-layout main { margin-left: 248px; margin-right: 0; max-width: none; }
.console-layout .topbar { margin-left: 248px; }
.sidebar-label { color: var(--line); font-size: .75rem; margin: 0 12px 20px; text-transform: uppercase; letter-spacing: .08em; }
.console-content > section { margin: 0 0 20px; }
.console-content form.controls label { flex: 1; min-width: min(180px,100%); }
.console-content td form { margin-bottom: 8px; }
.console-content .scroll { overflow-x: auto; }
.console-content h1 { margin-bottom: 24px; }
.auth-card > p { color: var(--muted); }
.auth-card .field { margin-bottom: 20px; }
@media(max-width:900px) {
  .console-layout main,.console-layout .topbar { margin-left: 0; }
  .reconciliation-columns,.bank-account-grid { grid-template-columns: 1fr; }
  .match-row { flex-wrap: wrap; }
}
@media print {
  .sidebar,.topbar,.report-filter,button,.button,.skip-link { display: none !important; }
  body { background: white; color: black; }
  main,.console-layout main { margin: 0 !important; padding: 0; width: 100%; max-width: none; }
  .card { border: 0; padding: 0; margin: 16px 0; }
  .table-scroll { overflow: visible; }
  table { width: 100%; }
  tr { break-inside: avoid; }
  .report-heading h1 { font-size: 1.5rem; }
}

[data-feed-lines] { min-width: 720px; }
[data-feed-lines] td:first-child,.reconciliation-columns td:nth-child(2) { white-space: nowrap; }
.reconciliation-columns td:first-child label { white-space: nowrap; }
.reconciliation-columns table { min-width: 400px; }

.invoice-lines { min-width: 1080px; }
.invoice-lines td:nth-child(2),.invoice-lines td:nth-child(3) { width: 21%; }
.invoice-lines td:nth-child(4) { width: 23%; }
.invoice-lines td:nth-child(5),.invoice-lines td:nth-child(6),.invoice-lines td:nth-child(7) { min-width: 100px; }
.invoice-lines input[name$="-quantity"],.invoice-lines input[name$="-rate"] { text-align: right; }
.invoice-print main { margin: 0 auto; max-width: 900px; padding: 32px; }
.invoice-print dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 24px; }
.invoice-print dd { margin: 0; }
.invoice-print [data-invoice-totals] { margin-left: auto; width: max-content; text-align: right; }

/* One searchable field, with lists outside scrollable transaction tables. */
.combo { position: relative; min-width: 0; }
.combo input { padding-right: 2.8rem; }
.combo .combo-toggle { position: absolute; right: 0; top: 0; bottom: 0; width: 2.6rem; padding: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; background: transparent; color: var(--muted); }
.combo .combo-toggle:hover { background: var(--teal-100); color: var(--navy-900); }
.combo-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; border: 0 !important; }
.combo-list { position: fixed; z-index: 100; margin: 0; padding: .35rem 0; list-style: none; overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px #0b2f3826; }
.combo-list[hidden] { display: none; }
.combo-list li { padding: .55rem .85rem; cursor: pointer; overflow-wrap: anywhere; }
.combo-list .combo-create { color: var(--teal-600); font-weight: 600; border-bottom: 1px solid var(--line); }
.combo-list .combo-clear { color: var(--muted); }
.combo-list .combo-highlight { background: var(--teal-100); color: var(--navy-900); }
#create-drawer { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: flex-end; background: #0b2f3870; }
#create-drawer[hidden] { display: none; }
.drawer { width: 420px; height: 100%; overflow-y: auto; background: var(--surface); color: var(--ink); padding: 24px; box-shadow: -8px 0 32px #0b2f3826; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.drawer-header h2 { margin: 0; color: var(--navy-900); font-size: 1.4rem; }
.drawer-close { padding: .25rem .7rem; font-size: 1.5rem; }
.drawer-form { display: flex; flex-direction: column; gap: 16px; }
.drawer-form input[type=checkbox] { width: auto; }
.drawer-field-error,.drawer-error { margin: .35rem 0 0; color: var(--danger); font-size: .9rem; }
.drawer-field-error:empty,.drawer-error:empty { display: none; }
.drawer-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
@media(max-width:650px) { .drawer { width: 100%; } }
@media print { .combo-list,#create-drawer,.drawer { display: none !important; } }

/* Banking completion and traceable reports. */
.date-presets { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin: 1rem 0; }
.statement-print { background: white; color: #172d36; }
.statement-print main { max-width: 70rem; margin: 2rem auto; padding: 1rem; }
.statement-print dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; }
[data-import-mapping] textarea[hidden] { display: none; }
@media print { .statement-print main { margin: 0; padding: 0; max-width: none; } }

/* Accounting dimension matrices retain their column order on narrow screens. */
[data-dimension-matrix] table { min-width: 40rem; }
[data-dimension-matrix] th.money { white-space: nowrap; }
[data-dimension-matrix] .total-row { font-weight: 600; }

/* Keep company membership actions legible when several forms share a row. */
.user-actions { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.user-actions form { margin: 0; }
.user-actions .field { margin-bottom: .25rem; }

/* B12: reserve sidebar scroll space without changing its inner width. */
.sidebar { scrollbar-gutter: stable; }

/* B12 dashboard tiles and attention; printed reports retain their existing rules. */
@media screen {
  .dashboard-heading + .stat-grid { gap: 16px; margin-bottom: 20px; }
  .dashboard-heading + .stat-grid .stat-card { border: 1px solid var(--line); border-radius: 12px; box-shadow: none; padding: 20px; margin-bottom: 0; display: flex; flex-direction: column; }
  .dashboard-heading + .stat-grid .stat-value { font-size: clamp(1.4rem,2.5vw,28px); font-variant-numeric: tabular-nums; }
  .dashboard-heading + .stat-grid .tile-link { font-size: 13px; font-weight: 600; margin-top: auto; padding-top: 16px; }
  .dashboard-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 5px 9px; }
  .dashboard-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; margin-right: 3px; background: var(--pill-dot); }
  .dashboard-pill[data-tone="amber"] { background: #fff4d6; color: #7a4f00; --pill-dot: #b37400; }
  .dashboard-pill[data-tone="green"] { background: #e4f5ec; color: #185f3e; --pill-dot: #1f7a4d; }
  .dashboard-work .attention [data-attention] > li { height: 44px; padding: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .dashboard-work .attention [data-attention] > li:last-child { border-bottom: 0; }
  .dashboard-work .attention [data-attention] > [data-attention-empty] { height: auto; border: 1px dashed #cfdadb; border-radius: 10px; padding: 16px; justify-content: flex-start; }
  .dashboard-work .attention [data-attention] > [data-attention-empty]:last-child { border-bottom: 1px dashed #cfdadb; }
  [data-attention-empty] svg { flex: 0 0 24px; }
}
@media screen and (max-width:1100px) { .dashboard-heading + .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media screen and (max-width:650px) { .dashboard-heading + .stat-grid { grid-template-columns: 1fr; } }

/* B14 user access tables and native row menus. */
.users-access-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.users-access-header h1 { margin: 0 0 6px; }
.users-access-header p { margin: 0; color: var(--muted); }
.seats-pill { display: inline-flex; white-space: nowrap; padding: 6px 10px; border-radius: 999px; background: #e4f5ec; color: #185f3e; font-size: 12px; font-weight: 600; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell > svg { flex-shrink: 0; color: #6b8086; }
.user-cell strong { font-weight: 600; }
.user-cell small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.user-you { display: inline-block; margin-left: 8px; font-size: 11px; padding: 2px 6px; background: #e4f5ec; color: #185f3e; border-radius: 4px; }
.status-indicator { display: inline-flex; align-items: center; gap: 7px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6b8086; }
.status-dot[data-status="Active"] { background: #1f7a4d; }
.status-dot[data-status="Pending"] { background: #b37400; }
.row-menu { position: relative; width: 36px; }
.row-menu summary { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; list-style: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary:hover, .row-menu[open] summary { background: #edf3f4; }
.row-menu > div { position: absolute; top: 100%; right: 0; z-index: 20; min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.row-menu form { margin: 0; }
.row-menu button:not(.sr-only) { display: block; width: 100%; text-align: left; padding: 9px 10px; background: transparent; color: var(--ink); border: 0; border-radius: 4px; font-weight: 400; }
.row-menu button:not(.sr-only):hover { background: #edf3f4; }
[data-role-form] select { width: auto; min-width: 130px; }
[data-users-access] .table-scroll, [data-console-memberships] { overflow: visible; }
@media (max-width:650px) { .users-access-header { align-items: flex-start; flex-direction: column; } }

.console-content .membership-scroll { overflow: visible; }
