/* White, Airtable-style theme (Morris 2026-10-23): light backgrounds, dark text, thin gray dividers, colour-coded statuses,
   compact controls and the full browser width. Always light, also when the Mac is in dark mode. */
:root {
  color-scheme: light;
  --bg: #f5f6f8; --card: #ffffff; --text: #1d1f25; --muted: #616670; --line: #e1e3e8; --accent: #166ee1; --accent-text: #ffffff;
  --ok: #0f7a3d; --ok-bg: #dff5e7; --warn: #8a5a00; --warn-bg: #ffefcc; --bad: #b4231b; --bad-bg: #ffe2df; --protect: #1557b0; --protect-bg: #e3edfd;
  --head: #fafbfc; --hover: #f0f3f7; --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.3rem; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.top { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .3rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: .1rem; flex: 1 1 auto; }
.nav a { padding: .35rem .7rem; border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 500; min-height: 36px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { background: var(--protect-bg); color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.who { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .95rem; }
.who form { margin: 0; }
.main { max-width: none; margin: 0; padding: .75rem 1rem; }
.foot { padding: .5rem 1rem; color: var(--muted); font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 .75rem; }
.card.narrow { max-width: 640px; }
.card.highlight { border-color: var(--accent); }
.link { word-break: break-all; font-family: ui-monospace, Menlo, monospace; background: var(--bg); padding: .5rem; border-radius: 8px; }
.tiles { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.tiles li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; display: flex; flex-direction: column; }
.tiles strong { font-size: 1.4rem; line-height: 1.2; }
.tiles span { color: var(--muted); }
.note { background: var(--card); border-left: 4px solid var(--accent); padding: .5rem .75rem; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .warn-text { color: var(--warn); }
.empty { color: var(--muted); padding: 1rem 0; }
.flash { padding: .5rem .8rem; border-radius: var(--radius); margin: 0 0 .6rem; }
.flash-ok { background: var(--ok-bg); color: var(--ok); } .flash-bad { background: var(--bad-bg); color: var(--bad); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .6rem; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill-ok, .st-completed { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill-warn, .st-pending { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill-protect, .st-approved { background: var(--protect-bg); color: var(--protect); border-color: transparent; }
.st-rejected, .st-failed { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
/* Request Status (Morris 2026-10-26): gray = awaiting approval, yellow = swapping, green = swapped, orange = needs
   attention, red = denied. Orange is the warning and danger tokens mixed (dark text on a pale peach), so it stays
   between the yellow and the red and keeps its contrast. */
.pill-gray { background: var(--hover); color: var(--muted); border-color: var(--line); }
.pill-yellow { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill-orange { background: color-mix(in srgb, var(--warn-bg) 40%, var(--bad-bg)); color: color-mix(in srgb, var(--warn) 65%, var(--bad)); border-color: color-mix(in srgb, var(--warn) 65%, var(--bad) 35%); }
.pill-bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill-label { font-size: .75rem; font-weight: 500; color: var(--muted); }
/* A table row or list item that opens its item anywhere it is clicked: the main link's ::after covers it; other links
   and buttons inside sit above it. Keyboard users tab to the main link as before. */
.row-link { position: relative; cursor: pointer; }
.row-link .row-link-main::after { content: ""; position: absolute; inset: 0; }
.row-link a:not(.row-link-main), .row-link button, .row-link form { position: relative; z-index: 1; }
.row-link:focus-within { background: var(--hover); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: .3rem .9rem; border-radius: var(--radius); white-space: nowrap; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-secondary { background: var(--card); color: var(--accent); border-color: var(--line); }
.btn:hover { filter: brightness(.96); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-go { background: var(--ok); border-color: var(--ok); color: #fff; }
.oneclick .defaults { list-style: none; padding: 0; margin: .5rem 0; }
.oneclick .defaults li::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.oneclick .defaults li { margin: .25rem 0; }
/* Decision card at the top of a pending live swap (approve above reject) and the number summary card. */
.decision { border-left: 4px solid var(--ok); }
.decision .kv { margin-bottom: .75rem; }
.decision .oneclick, .decision .reject { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
.decision .btn { white-space: normal; text-align: center; }
@media (min-width: 700px) { .decision .form .btn { align-self: flex-start; min-width: 16rem; } .decision .reject .form { max-width: 36rem; } }
.num-summary h1 { gap: .4rem .75rem; } .num-summary .kv { margin-bottom: .75rem; }
.btn-link { background: none; border: none; color: var(--accent); padding: .3rem; min-height: 30px; font-weight: 500; text-decoration: underline; }
.form { display: flex; flex-direction: column; gap: .6rem; margin: 0; }
.field { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 0; }
.lbl { font-weight: 600; }
.hint { color: var(--muted); font-size: .85rem; }
.err { color: var(--bad); font-size: .9rem; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--bad); }
input, select, textarea { font: inherit; font-size: 14px; padding: .35rem .55rem; border: 1px solid #cfd3da; border-radius: var(--radius); background: var(--card); color: var(--text); min-height: 34px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: .5rem; align-items: flex-start; }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: none; }
.row2 { display: flex; gap: .75rem; flex-wrap: wrap; }
.row2 .field { min-width: 200px; }
.search { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.search input { flex: 1 1 220px; width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .6rem; }
.chips a { padding: .2rem .75rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); background: var(--card); min-height: 30px; font-size: .9rem; display: inline-flex; align-items: center; }
.chips a[aria-current="page"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: .35rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; color: var(--muted); font-weight: 600; background: var(--head); position: sticky; top: 0; }
.table tbody tr:hover { background: var(--hover); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions form { margin: 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .85rem; } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.decide { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.plain { list-style: none; padding: 0; margin: 0; } .plain li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Location from the area code (not confirmed by RingCentral). */
.src { font-size: .75rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 0 .45rem; white-space: nowrap; }
/* Inline forms on the Users page. */
.inline { display: inline-flex; gap: .25rem; align-items: center; margin: .25rem .5rem 0 0; }
.small-input { width: 10rem; min-height: 36px; padding: .3rem .5rem; font-size: .9rem; }
/* Assistant chat. */
.chat { max-width: 760px; margin: 0 auto; }
.chat-log { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .6rem; }
.msg { max-width: 92%; padding: .65rem .9rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.msg p { margin: 0 0 .35rem; } .msg p:last-child { margin-bottom: 0; }
.msg-me { align-self: flex-end; background: var(--protect-bg); border-color: transparent; }
.msg-bot { align-self: flex-start; }
.chat-sub { font-weight: 600; margin-top: .5rem; }
.chat-nums { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-direction: column; gap: .35rem; }
.chat-nums li { display: grid; grid-template-columns: minmax(8.5rem, auto) 1fr; gap: .1rem .75rem; padding: .45rem .6rem; border-radius: 10px; background: var(--bg); }
.chat-nums .where { overflow-wrap: anywhere; }
/* Sales history answers: levels × days; scrolls inside the message on a phone, never the page. */
.sales-grid-wrap { overflow-x: auto; margin: .5rem 0; } .sales-grid { font-size: .9rem; } .sales-grid td, .sales-grid tbody th { white-space: nowrap; }
.chat-summary { margin: .5rem 0; padding: .6rem; background: var(--bg); border-radius: 10px; }
.chat-form { position: sticky; bottom: 0; background: var(--bg); padding: .5rem 0; display: flex; flex-direction: column; gap: .5rem; }
.chat-input { display: flex; gap: .5rem; }
.chat-input input { flex: 1 1 auto; width: auto; }
.quick { display: flex; flex-wrap: wrap; gap: .5rem; }
.quick .btn { min-height: 40px; font-weight: 500; }
.chat-reset { margin: 0; }
/* Typing bubble while the Assistant answers (public/assistant.js). */
.msg.typing { display: flex; gap: .3rem; align-items: center; min-height: 2.2rem; padding-top: .7rem; padding-bottom: .7rem; }
.msg.typing .dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; opacity: .35; animation: typing-dot 1.2s infinite ease-in-out; }
.msg.typing .dot:nth-child(2) { animation-delay: .2s; }
.msg.typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: .9; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg.typing .dot { animation: none; opacity: .6; } }
.chat-busy .chat-form { opacity: .6; }
/* Phones: tables become stacked cards with labels. */
@media (max-width: 640px) {
  .main { padding: .75rem; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table { border: none; background: none; }
  .table tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 .75rem; padding: .25rem 0; }
  .table td { border: none; padding: .3rem .9rem; display: flex; gap: .75rem; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; min-width: 6.5rem; flex: none; }
  .who { width: 100%; justify-content: space-between; }
  .msg { max-width: 100%; }
  .chat-nums li { grid-template-columns: 1fr; }
  .sales-grid tbody th { display: block; padding: .3rem .9rem; } .sales-grid td { white-space: normal; }
}
/* Page title bar with its main actions (New Request, filters). */
.page-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: 0 0 .6rem; }
.page-bar h1 { margin: 0; }
.subtabs { margin-bottom: .6rem; }
.filters { align-items: flex-end; }
.filters .mini { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; color: var(--muted); }
.filters .mini input, .filters .mini select { flex: none; width: auto; min-width: 9rem; }
.filters .mini input[type="search"] { min-width: 18rem; }
.table td.small { overflow-wrap: anywhere; word-break: break-word; max-width: 42vw; }
/* Phones and narrow windows keep comfortable touch targets. */
@media (max-width: 640px) {
  .btn, input, select, textarea, .nav a { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
}

/* Completed swap result (Morris 2026-10-26): OLD → NEW, large; stacks with a down arrow on narrow screens. */
.swap-result h2 { margin-top: 0; }
.swap-result { border-left: 4px solid var(--ok); }
.swap-pair { display: grid; grid-template-columns: auto auto auto; justify-content: start; align-items: center; gap: .5rem 1.25rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.swap-pair:last-of-type { border-bottom: 0; }
.swap-side { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
.swap-label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.swap-num { font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15; }
.swap-old { color: var(--muted); }
.swap-arrow { font-size: 2rem; font-weight: 800; color: var(--ok); line-height: 1; }
.swap-facts { margin-top: .5rem; }
.ok-text { color: var(--ok); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) {
  .swap-pair { grid-template-columns: 1fr; justify-items: start; }
  .swap-arrow { transform: rotate(90deg); margin: .1rem 0 .1rem .6rem; }
}

/* Swap line on the Requests page (admins; swap-queue fix 4): three columns, stacked on narrow screens. */
.queue h2 { margin-top: 0; }
.queue-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.25rem; }
.queue-col { min-width: 0; }
.queue-col h3 { margin: .25rem 0 .4rem; font-size: 1rem; }
.queue-list { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.queue-list li { overflow-wrap: anywhere; min-width: 0; }
.queue .q-run { border-left: 3px solid var(--warn); padding-left: .6rem; }
.queue .q-wait { border-left: 3px solid var(--line); padding-left: .6rem; }
.queue .q-att { border-left: 3px solid var(--bad); padding-left: .6rem; }
@media (max-width: 760px) { .queue-cols { grid-template-columns: 1fr; } }
/* A status pill with its reason (Needs attention: why): the reason on its own line, the pill never stretched. */
.status-why { display: block; margin-top: .2rem; }
@media (max-width: 640px) { .table td[data-label="Status"] { flex-wrap: wrap; align-items: flex-start; } .table td[data-label="Status"] .status-why { flex-basis: 100%; padding-left: 7.25rem; } }

/* Save on change (public/autosave.js, Morris 2026-10-27): the Save button of a dropdown that saves itself is hidden */
[data-save-btn][hidden] { display: none !important; }
form.saving { opacity: .6; }
/* Scanner (lib/scanner_pages.js) */
.card > .actions, .card > dl + .actions { margin-top: .75rem; }
.kv.pairs { grid-template-columns: minmax(8rem, max-content) 1fr; gap: .35rem 1.25rem; align-items: baseline; }
.table td > .cell { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cell ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.kv.pairs { grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); } .kv.pairs dd { min-width: 0; } .kv.pairs .pill { white-space: normal; }
.info-head { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; }
/* A short fade-in on every page load (Morris 2026-10-30: "when i reload the page it shows no sign of reload ... a .3 second reload screen refresh"; then .45 s). */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.main { animation: page-in .45s ease-out; }
@media (prefers-reduced-motion: reduce) { .main { animation: none; } }
.prio { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .5rem; } .prio h3 { margin: 0 0 .35rem; font-size: 1rem; }
/* Scanner end date: one rule at a time (Morris 2026-10-30: "the other should grey out once one is selected"): the date
   box is greyed out and can't be used unless "On a date…" is chosen. */
.end-date { display: flex; flex: 1 1 0; }
.end-date .field { min-width: 200px; }
form:has(select[name="end_choice"] option[value="date"]:not(:checked)) .end-date { opacity: .4; pointer-events: none; }
form:has(select[name="end_choice"] option[value="date"]:not(:checked)) .end-date input { background: var(--hover); }
.inline-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; } .inline-form select, .inline-form input[type=text] { width: auto; min-width: 8rem; }
.remit-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .25rem 1rem; align-items: end; margin-bottom: .75rem; } .remit-filters .actions { margin: 0 0 .9rem; }
.remit-period { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin: .5rem 0 .75rem; } .remit-period .actions { margin: 0; align-items: center; gap: .5rem; }
.remit-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 0 1.25rem; }
.remit-people .remit-vendor-row td { background: var(--soft, rgba(0,0,0,.03)); } .remit-people details summary { cursor: pointer; } .remit-people details .table { margin-top: .5rem; }
details.card > summary { cursor: pointer; } details.card[open] > summary { margin-bottom: .5rem; }
.inline-form input[type=date], .inline-form input[type=text] { width: auto; min-width: 0; } .inline-form input[type=date] { max-width: 11rem; }
/* Remittance explorer (Morris 2026-11-01: "make UI more nice"). */
.subnav { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin: 0 0 .9rem; }
.subnav a { padding: .45rem .8rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.remit-period { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin: 0 0 .9rem; }
.segs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 2px; }
.seg { padding: .3rem .9rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; }
.seg.on { background: var(--accent); color: #fff; }
.period-step { display: inline-flex; align-items: center; gap: .25rem; } .period-step .btn-link { font-size: 1.1rem; padding: .1rem .5rem; text-decoration: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; display: flex; flex-direction: column; gap: .15rem; }
.kpi-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.kpi-value { font-size: 1.35rem; font-weight: 700; } .kpi-value .num { font-weight: 700; }
.kpi-sub { color: var(--muted); font-size: .8rem; }
.kpi-good { border-left: 4px solid var(--ok); } .kpi-bad { border-left: 4px solid var(--bad); } .kpi-warn { border-left: 4px solid #f29900; }
.num.soft { font-weight: 500; } .num.neg { color: var(--bad); }
.sharebar { display: block; width: 100%; min-width: 120px; height: 8px; border-radius: 4px; overflow: hidden; background: #eef0f3; margin: .2rem 0; }
.sharebar.big { height: 14px; border-radius: 7px; }
.dot { width: .65rem; height: .65rem; vertical-align: -1px; }
.vcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.vcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; text-decoration: none; color: var(--text); transition: box-shadow .15s, border-color .15s; }
.vcard:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(22, 110, 225, .12); }
.vcard-head { display: flex; align-items: center; gap: .4rem; justify-content: space-between; } .vcard-head strong { font-size: 1.05rem; }
.vcard-net { font-size: 1.5rem; font-weight: 700; margin: .25rem 0 0; color: var(--ok); } .vcard-net.neg { color: var(--bad); }
.vcard-people { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .15rem .6rem; align-items: center; }
.event-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin: 0 0 .75rem; } .event-title { font-size: 1.25rem; margin: 0; display: flex; gap: .4rem; align-items: center; }
.event-charts { display: grid; grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) minmax(0, 1fr); gap: .75rem; margin: 0 0 1rem; align-items: start; }
@media (max-width: 900px) { .event-charts { grid-template-columns: 1fr 1fr; } .event-charts .chart-legend { grid-column: 1 / -1; } }
.chart-card h3, .chart-legend h3 { font-size: .9rem; margin: 0 0 .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.donut { width: 100%; max-width: 190px; display: block; margin: 0 auto; }
.donut-n { font-size: 5px; font-weight: 700; fill: var(--text); } .donut-s { font-size: 3px; fill: var(--muted); }
.remit-events .sharebar { max-width: 220px; }
.remit-search { display: flex; gap: .5rem; margin: 0 0 .5rem; } .remit-search input[type=search] { max-width: 360px; }
.upload-fold > summary { list-style: none; cursor: pointer; } .upload-fold > summary::-webkit-details-marker { display: none; }
.upload-fold[open] { flex-basis: 100%; } .upload-fold[open] > summary { margin-bottom: .5rem; }
tr.adj-row td { background: #fff8f7; } tr.sel td { background: var(--protect-bg); }
.remit-events td[data-label="Event"] { min-width: 13rem; } .remit-events.compact td[data-label="Who sold it"] { min-width: 9rem; } .remit-events.compact .sharebar { min-width: 80px; }
.vcard-head { justify-content: flex-start; } .vcard-head .pill { margin-left: auto; }
.bulk-assign { margin: .25rem 0 .75rem; padding: .5rem .75rem; background: var(--head); border: 1px solid var(--line); border-radius: var(--radius); }
a.sort { color: inherit; text-decoration: none; display: inline-flex; gap: .25rem; align-items: center; white-space: nowrap; } a.sort:hover { color: var(--accent); }
a.sort .sort-arrow { color: #b0b5bd; font-size: .75em; } a.sort.on { color: var(--accent); } a.sort.on .sort-arrow { color: var(--accent); }
a.kpi-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; } a.kpi-link:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(22, 110, 225, .12); } .kpi-go { color: var(--accent); }
tr.adj-subs td { background: #fff8f7; } .remit-adj td[data-label="Event"] { min-width: 12rem; }
.adj-groups { margin: 0 0 .75rem; } .adj-section h2 { display: flex; gap: .5rem; align-items: baseline; }
.remit-adj td[data-label="Date"] .small:first-child { white-space: nowrap; }
.remit-period { justify-content: flex-start; } .period-step { gap: .1rem; }
.period-pick { position: relative; } .period-pick > summary { list-style: none; cursor: pointer; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.period-pick > summary::-webkit-details-marker { display: none; } .period-pick > summary:hover { border-color: var(--accent); } .pick-caret { color: var(--muted); font-size: .8em; }
.pick-list { position: absolute; z-index: 20; top: calc(100% + .3rem); left: 0; min-width: 12rem; max-height: 22rem; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: .3rem; display: flex; flex-direction: column; }
.pick-list a { padding: .35rem .6rem; border-radius: 6px; text-decoration: none; color: var(--text); white-space: nowrap; } .pick-list a:hover { background: var(--hover); } .pick-list a[aria-current] { background: var(--protect-bg); color: var(--accent); font-weight: 600; }
.btn.disabled { color: #c3c7cd; pointer-events: none; }
th.who-col, td[data-label="Who sold it"] { padding-left: 1.25rem; }
.fees-chart { display: block; width: 100%; height: 170px; } .bar-l { font-size: 10px; fill: var(--muted); } .bar-v { font-size: 10px; fill: var(--text); font-weight: 600; }
.chart-head { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; } .chart-head h2 { margin: 0 0 .25rem; }
.range-form { margin-bottom: .9rem; } .range-form input[type=search] { min-width: 14rem; }
.bar-col:hover rect[fill="#f29900"] { fill: #d97f00; } .bar-col:hover rect[fill="transparent"] { fill: rgba(242, 153, 0, .08); }
.year-col:hover rect[fill="#166ee1"] { fill: #0d4fa6; } .year-col:hover rect[fill="transparent"] { fill: rgba(22, 110, 225, .08); } .bar-y { font-size: 9px; fill: var(--accent); font-weight: 700; } .bar-l.on { fill: var(--text); font-weight: 700; }
.fees-chart { overflow: visible; } .fee-bar { fill: #f29900; } .fee-bar.on { fill: #c26a00; } .year-bar { fill: #166ee1; }
.hov-area { fill: transparent; } .hov:hover .hov-area { fill: rgba(22, 110, 225, .06); }
.fees-chart .tip { opacity: 0; pointer-events: none; transition: opacity .1s; } .fees-chart .hov:hover .tip { opacity: 1; }
.tip rect { fill: #1d1f25; } .tip text { fill: #fff; font-size: 12px; } .tip .tip-h { font-weight: 700; }
.export-btn { margin-left: auto; }
.million-bar { display: block; width: 100%; height: 14px; } .m-track { fill: #eef0f3; } .m-fill { fill: var(--accent); } .m-fill.over { fill: var(--ok); } .m-tick { fill: #fff; } .ok-text { color: var(--ok); }
html { background: #f5f6f8; }
.rev-bar { fill: #34a853; } .rev-bar.on { fill: #1e7e34; } .fee-bar { fill: #8e44ad; } .fee-bar.on { fill: #5e2a76; }
.legend { display: inline-flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: center; font-size: .85rem; } .sw { display: inline-block; width: .7rem; height .7rem; border-radius: 2px; vertical-align: -1px; }
.sw-rev { background: #34a853; height: .7rem; } .sw-fee { background: #8e44ad; height: .7rem; }
.million { margin-top: .6rem; } .million-head { margin-bottom: .25rem; } .million-bar { height: 8px; } .m-fill { fill: #34a853; } .m-fill.over { fill: #1e7e34; }
/* Remittance pages larger (Morris 2026-11-01: "make all bigger by a %"). */
.main.remit { zoom: 1.12; }
.main.remit .remit-two { grid-template-columns: 1fr; }
.payout-cards .vcard { padding: 1rem 1.2rem; } .payout-owed { font-size: 2rem; font-weight: 800; color: #b06000; margin: .3rem 0 0; } .payout-owed.zero { color: var(--ok); } .payout-cards .kv { margin-top: .6rem; }
.m-line { stroke: #1e7e34; stroke-width: 2; stroke-dasharray: 6 4; } .m-line-l { font-size: 10px; fill: #1e7e34; font-weight: 700; } .sw-line { background: #1e7e34; height: 3px !important; width: 1rem; vertical-align: 2px; }
.rev-bar { fill: #f29900; } .rev-bar.on { fill: #c26a00; } .fee-bar { fill: #8e44ad; } .fee-bar.on { fill: #5e2a76; } .sw-rev { background: #f29900; }
.type-pill { font-size: .7rem; padding: 0 .35rem; } .type-form { margin-left: auto; }
.net-bar { fill: #34a853; } .loss-bar { fill: var(--bad); } .bar-n { font-size: 9px; fill: #1e7e34; font-weight: 700; } .bar-n.neg { fill: var(--bad); } .sw-net { background: #34a853; }
.subs-bar { fill: #d93025; } .other-bar { fill: #f4b6c2; } .sw-subs { background: #d93025; } .sw-other { background: #f4b6c2; }
