:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #191c20;
  background: #f5f5f3;
  font-synthesis: none;
  --muted: #535a63;
  --border: #dedfdc;
  --accent: #064b79;
  --success: #176343;
  --error: #9e252c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.club-header { background: #181b20; color: #fff; border-bottom: 3px solid #be932e; }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 12px; }
.header-inner img { object-fit: contain; }
.header-inner strong, .header-inner span { display: block; }
.header-inner span { font-size: .8rem; color: #d6d9de; }
.header-inner .local-label { margin-left: auto; border: 1px solid #52565d; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.finance-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.finance-nav button { color: var(--muted); }
.finance-nav button[aria-pressed=true] { background: #064b79; border-color: #064b79; color: white; }
.intro { padding-block: 34px 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.045em; line-height: 1.1; }
h2 { font-size: 1.1rem; letter-spacing: -.02em; }
.intro > p:last-child { color: var(--muted); margin-top: 10px; }
.eyebrow { color: var(--accent); font-size: .73rem; font-weight: 700; letter-spacing: .12em; margin-bottom: 10px; }
.workflow { display: grid; grid-template-columns: 1fr 1.15fr; gap: 16px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.step { display: grid; place-items: center; border-radius: 7px; background: #eef3f7; color: var(--accent); font: 700 .75rem system-ui; min-width: 29px; min-height: 27px; }
.muted { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.file-picker { margin-top: 17px; padding: 14px; background: #f7f8f9; border: 1px dashed #aab4bd; border-radius: 9px; }
.file-picker label { display: block; margin-bottom: 9px; font-weight: 650; font-size: .88rem; }
input, select, button { font: inherit; max-width: 100%; color: inherit; }
input[type=file] { width: 100%; font-size: .85rem; }
input::file-selector-button, button { background: #fff; border: 1px solid #b9bfc4; border-radius: 7px; padding: 8px 10px; color: #20252c; font-weight: 600; }
input::file-selector-button { margin-right: 8px; }
button.primary { color: #fff; background: #064b79; border-color: #064b79; }
button.primary:not(:disabled):hover { background: #033a60; }
button.plain { border-color: transparent; }
button:disabled { opacity: .55; }
button, select, summary, input::file-selector-button { cursor: pointer; }
button:disabled, input:disabled::file-selector-button { cursor: default; }
:focus-visible { outline: 2px solid #136ca6; outline-offset: 2px; }
.preview { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.preview p { font-size: .86rem; margin-bottom: 10px; }
.preview-rows { margin: 0 0 12px; padding-top: 0; border-top: 0; }
.preview-rows .table-scroll { max-height: 225px; }
.preview-rows td:first-child { overflow-wrap: anywhere; }
.message { font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; }
.message:empty { display: none; }
#import-message, #ledger-message { margin-top: 10px; }
[data-kind=success] { color: var(--success); }
[data-kind=error] { color: var(--error); }
details { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
summary { font-size: .88rem; font-weight: 650; }
.count { color: var(--muted); margin-left: 3px; font-variant-numeric: tabular-nums; }
#import-list, #check-list { list-style: none; padding: 0; margin: 8px 0 0; }
#import-list li, #check-list li { padding: 8px 0; overflow-wrap: anywhere; font-size: .82rem; }
#import-list li + li, #check-list li + li { border-top: 1px solid var(--border); }
#import-list span { display: block; color: var(--muted); margin-top: 3px; }
fieldset { border: 0; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
fieldset label { font-size: .79rem; font-weight: 650; }
fieldset input, select { border: 1px solid #b9bfc4; border-radius: 7px; background: #fff; padding: 7px 8px; min-height: 36px; }
fieldset input { display: block; width: 100%; min-width: 0; margin-top: 5px; font-variant-numeric: tabular-nums; font-size: .9rem; }
fieldset:disabled input { background: #f6f6f5; }
.balance-line { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 8px 0; font-size: .9rem; border-top: 1px solid var(--border); }
.balance-line dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.difference { padding-bottom: 12px; }
.check-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.saved-check { margin-top: 9px; }
.ledger { margin-top: 16px; }
.ledger-head { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 14px; }
.totals { display: flex; gap: 16px; }
.totals span { display: block; color: var(--muted); font-size: .75rem; }
.totals strong { display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }
.bank-filters { display: grid; grid-template-columns: 1fr 2fr 1fr 1fr; gap: 8px; align-items: end; margin-top: 14px; }
.bank-filters label, .allocation-form label, .backup-controls label { font-size: .82rem; font-weight: 650; }
.bank-filters input, .bank-filters select, .allocation-form input, .allocation-form select {
  display: block; width: 100%; min-width: 0; margin-top: 4px; border: 1px solid #b9bfc4;
  background: #fff; border-radius: 7px; padding: 7px 8px; min-height: 36px; font-weight: 400;
}
.subs-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; margin-block: 12px; }
.subs-view-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.subs-summary { margin: 12px 0; color: var(--muted); font-size: .9rem; font-weight: 650; }
.subs-paid { background: #eaf6ee; }
.subs-unpaid { background: #fceeee; }
.subs-paid td:first-child { border-inline-start: 3px solid #26845c; }
.subs-unpaid td:first-child { border-inline-start: 3px solid #a9363d; }
.subs-section-title { font-size: 1rem; margin: 16px 0 6px; }
.bank-linked-row { outline: 2px solid var(--accent); outline-offset: -2px; }
.cash-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 167px), 1fr)); gap: 10px; }
.cash-metric { border: 1px solid var(--border); border-radius: 9px; background: #fafafa; padding: 12px; }
.cash-metric span, .cash-metric small { display: block; font-size: .82rem; color: var(--muted); }
.cash-metric strong { display: block; font-size: 1.38rem; margin: 4px 0; font-variant-numeric: tabular-nums; }
.cash-chart { margin-top: 14px; min-width: 0; }
.cash-legend { display: flex; flex-wrap: wrap; gap: 7px 17px; padding: 0; margin: 0 0 6px; list-style: none; }
.cash-legend li { display: flex; align-items: center; gap: 6px; font-size: .81rem; }
.cash-swatch { width: 24px; border-top: 3px solid currentColor; }
.cash-actual { color: #20252c; }
.cash-saved { color: #956816; }
.cash-latest { color: #0a669d; }
.cash-swatch.cash-saved { border-top-style: dashed; }
.cash-swatch.cash-latest { border-top-style: dotted; }
.cash-plot svg { display: block; width: 100%; height: auto; }
.cash-line { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cash-line.cash-saved { stroke-width: 4; stroke-dasharray: 9 6; }
.cash-line.cash-latest { stroke-width: 2; stroke-dasharray: 2 5; }
.cash-point { fill: currentColor; stroke: white; stroke-width: 1; }
.cash-key-point { fill: none; stroke: #0a669d; stroke-width: 1.4; }
.cash-grid, .cash-zero { stroke: #dedfdc; stroke-width: 1; }
.cash-zero { stroke: #899099; stroke-width: 1.4; }
.cash-axis { fill: var(--muted); font-size: 11px; }
.cash-note { margin: 8px 0 11px; }
.accounts-checks { padding-inline-start: 18px; margin-block: 10px; font-size: .87rem; line-height: 1.55; }
.parent-accounts { margin-top: 12px; overflow: hidden; border: 1px solid #d9d8d3; border-radius: 10px; background: #fcfcfa; }
.accounts-masthead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 19px 20px;
  background: linear-gradient(90deg, #151618 0%, #151618 51%, rgb(21 22 24 / 48%) 100%),
    repeating-linear-gradient(108deg, #161719 0 18px, #dedee0 18px 30px);
  color: #fff; border-bottom: 4px solid #be932e; }
.accounts-masthead img { object-fit: contain; width: clamp(48px, 8vw, 72px); height: auto; }
.accounts-masthead h2 { margin: 3px 0 4px; font-size: clamp(1.25rem, 4vw, 2.25rem); line-height: 1.05; letter-spacing: -.045em; }
.accounts-club { font-size: .73rem; font-weight: 750; letter-spacing: .12em; color: #efd79c; }
.accounts-period { font-size: .82rem; color: #ebebeb; }
.accounts-tag { justify-self: end; padding: 5px 8px; font-size: .76rem; color: #f5e1b2; background: #212123;
  border: 1px solid #827451; border-radius: 4px; }
.accounts-content { padding: 18px; }
.accounts-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.accounts-figure { background: #fff; padding: 11px; border: 1px solid #e0dfdb; border-radius: 6px; min-width: 0; }
.accounts-figure dt { display: flex; align-items: center; gap: 6px; color: #53545a; font-size: .79rem; font-weight: 650; }
.accounts-figure-symbol { display: grid; min-width: 21px; height: 21px; place-items: center; border-radius: 3px;
  color: #202124; background: #eeede8; font-size: .75rem; font-weight: 750; }
.accounts-figure dd { margin: 6px 0 0; font-weight: 780; font-size: clamp(1.1rem, 2.8vw, 1.7rem);
  letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.accounts-figure-closing { background: #202124; color: #fff; border-color: #202124; box-shadow: inset 0 -3px #be932e; }
.accounts-figure-closing dt { color: #f0deae; }
.accounts-figure-closing .accounts-figure-symbol { background: #f0deae; }
.accounts-breakdown { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; }
.accounts-breakdown section { min-width: 0; border: 1px solid #e0dfdb; border-radius: 6px; background: #fff; padding: 13px; }
.accounts-breakdown h3, .accounts-treasurer-note h3 { font-size: 1.05rem; letter-spacing: -.02em; margin: 0 0 8px; }
.accounts-income .table-scroll { margin-top: 0; }
.accounts-income th:last-child, .accounts-income td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.accounts-spend-figure { margin: 0; }
.accounts-spend-figure figcaption { color: #53545a; font-size: .77rem; margin-bottom: 5px; }
.accounts-spend-band { display: flex; height: 24px; border-radius: 4px; overflow: hidden; background: #e7e7e4; margin-bottom: 10px; }
.accounts-spend-band span { flex-shrink: 0; }
.accounts-chart { list-style: none; margin: 0; padding: 0; }
.accounts-chart li { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto 42px; align-items: baseline; gap: 7px;
  padding: 6px 0; font-size: .83rem; }
.accounts-chart li + li { border-top: 1px solid #edede9; }
.accounts-spend-key { height: 9px; border-radius: 2px; }
.accounts-chart strong, .accounts-spend-share { white-space: nowrap; font-variant-numeric: tabular-nums; }
.accounts-spend-share { color: #53545a; text-align: right; font-size: .75rem; }
.accounts-treasurer-note { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.accounts-treasurer-note p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.45; }
textarea[name="note"] { display: block; width: 100%; resize: vertical; padding: 8px; margin-top: 5px;
  border: 1px solid #b9bfc4; border-radius: 7px; font: inherit; font-weight: 400; }
@media (max-width: 640px) {
  .accounts-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounts-breakdown { grid-template-columns: 1fr; }
  .accounts-masthead { grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 14px; }
  .accounts-tag { grid-column: 2; justify-self: start; }
  .accounts-content { padding: 12px; }
}
.empty { border-top: 1px solid var(--border); margin-top: 12px; padding: 16px 0 3px; color: var(--muted); font-size: .9rem; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--border); text-align: left; }
th { background: #f6f7f7; font-size: .78rem; }
td strong { font-weight: 600; }
td .muted { display: block; font-size: .78rem; }
td select { width: 100%; min-width: 145px; font-size: .82rem; }
.money { text-align: right; font-variant-numeric: tabular-nums; }
td.money, .date { white-space: nowrap; }
.credit { color: var(--success); }
footer { padding: 18px 0; color: var(--muted); font-size: .83rem; }
.club-panel { margin-bottom: 14px; }
.club-panel h2 { margin-bottom: 6px; }
.club-panel > p.muted { margin-bottom: 13px; }
.club-panel > label { display: block; max-width: 680px; }
.club-panel label, .club-form label { font-size: .84rem; font-weight: 650; min-width: 0; }
.club-panel label > select, .club-panel label > input, .club-form label > input {
  display: block; width: 100%; min-width: 0; margin-top: 5px; padding: 7px 8px;
  border: 1px solid #b9bfc4; border-radius: 7px; background: white; min-height: 36px; font-weight: 400;
}
.club-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 11px; align-items: end; margin-block: 12px; }
.club-form button { justify-self: start; }
.club-status { margin-bottom: 12px; }
.club-panel .table-scroll td { font-variant-numeric: tabular-nums; }
.match-note { margin-top: 12px; color: var(--accent); font-weight: 650; font-size: .9rem; }
.transaction-details { margin-top: 6px; padding-top: 0; border: 0; }
.transaction-details summary { color: var(--accent); }
.transaction-details .club-form { grid-template-columns: minmax(150px, 1fr); }
.review-table td { vertical-align: middle; }
.review-table .suggested-row { background: #eff8f3; }
.review-table .suggested-row td:first-child { border-inline-start: 3px solid #26845c; padding-inline-start: 10px; }
.review-transaction, .review-proposal { display: grid; gap: 3px; overflow-wrap: anywhere; }
.review-transaction { min-width: 180px; }
.review-proposal { min-width: 160px; }
.review-player { font-weight: 600; }
.review-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.suggested-badge { width: fit-content; padding: 2px 7px; border-radius: 999px; background: #d8efe3; color: #155538; font-size: .73rem; font-weight: 700; }
.review-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 114px; }
.review-actions button { padding: 6px 9px; white-space: nowrap; }
.review-editor td { background: #f4f6f7; padding: 10px 13px; }
.allocation-form { min-width: min(100%, 500px); }
.allocation-form > label { display: block; max-width: 400px; margin-top: 12px; }
.allocation-form .allocation-line { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); align-items: end; }
.allocation-line legend { font-weight: 700; font-size: .85rem; margin-bottom: 5px; }
.allocation-line button { justify-self: start; }
.allocation-actions, .backup-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 12px; }
.allocation-remaining, .remaining-text { font-size: .83rem; font-weight: 650; }
.remaining-text { color: var(--accent); }
.backup-controls input { display: block; margin-top: 4px; }
.backup-description { margin-top: 6px; }
#backup-preview { margin-top: 12px; }
#backup-summary { margin-bottom: 8px; }
@media (max-width: 780px) {
  .workflow { grid-template-columns: 1fr; }
  .shell { width: calc(100% - 28px); }
}
@media (max-width: 520px) {
  .panel { padding: 14px; }
  fieldset { grid-template-columns: 1fr; }
  .bank-filters { grid-template-columns: 1fr 1fr; }
  .intro { padding-top: 25px; }
}

.parent-portal, .portal-admin { display: grid; gap: 1rem; }
.parent-portal { padding-bottom: 2rem; }
.parent-portal .intro { margin-bottom: 0; }
.portal-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.portal-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding: .8rem 1rem; margin-block: .8rem; background: #f4efe1; border-left: 4px solid #b88724; border-radius: .35rem; }
.portal-balance strong { font-size: 1.65rem; }
.portal-status { display: inline-block; border-radius: .35rem; padding: .2rem .45rem; font-weight: 650; }
.portal-settled { color: #22533a; background: #e6f1ea; }
.portal-owing { color: #733520; background: #faeee5; }
.portal-payment { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1rem; }
.portal-payment dd { margin: 0; font-weight: 700; }
.portal-admin { margin-top: .5rem; }
.portal-admin select[multiple] { min-height: 8rem; }
.portal-admin input[type="checkbox"] { inline-size: 1.1rem; block-size: 1.1rem; }
.portal-reminder-lines { margin: 0; padding-left: 1.15rem; }
