:root {
  color-scheme: light;
  --ink: #192c28; --muted: #53665e; --line: #dfe7e2;
  --paper: #fff; --bg: #f6f8f7; --accent: #116552; --accent-soft: #eaf4ee;
  --surface-subtle: #f1f5f2; --radius: 12px; --focus: #a16608;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 "Segoe UI", Arial, sans-serif; }
a { color: #0b6250; text-underline-offset: 3px; }
a:hover { color: #073e32; }
.suite-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1440px; margin: auto; display: flex; align-items: center; gap: 32px; padding: 16px 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 750; letter-spacing: -.7px; text-decoration: none; color: var(--ink); white-space: normal; min-width: 0; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: white; }
.public-navigation { justify-content: flex-end; align-items: center; }
.public-navigation .button { padding: 8px 18px; color: white; }
.account-menu form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.account-menu form button { width: 100%; text-align: left; padding: 10px 12px; min-height: 44px; border-radius: 6px; }
.brand small { font-size: 11px; font-weight: 400; letter-spacing: .1px; border-left: 1px solid var(--line); padding-left: 10px; }
nav { display: flex; gap: 24px; flex: 1; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--muted); padding: 6px 0; }
nav a[aria-current=page] { color: var(--accent); border-bottom: 3px solid var(--accent); font-weight: 650; }
.account-menu { margin: 0; padding: 0; border: 0; position: relative; }
.account-menu summary { font-size: 14px; padding: 10px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.account-menu[open] summary { background: var(--accent-soft); color: var(--accent); }
.account-menu>div { position: absolute; z-index: 10; right: 0; top: calc(100% + 8px); width: min(280px,calc(100vw - 32px)); max-height: calc(100dvh - 100px); overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: 0 12px 35px #142b2417; }
.account-menu a { display: block; padding: 10px 12px; min-height: 44px; border-radius: 5px; text-decoration: none; }
.account-menu a:hover { background: var(--bg); }
.office-context { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px max(24px,calc((100% - 1376px)/2)); background: var(--surface-subtle); border-bottom: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.office-context>span:first-child { color: var(--muted); }
.context-kind { margin-left: auto; color: var(--muted); }
main { max-width: 1440px; margin: 32px auto; padding: 0 32px; min-height: 65vh; }
h1 { font-size: 34px; line-height: 1.2; font-weight: 750; letter-spacing: -.9px; margin: 0 0 8px; overflow-wrap: anywhere; }
h2 { font-size: 20px; letter-spacing: -.3px; margin: 28px 0 12px; }
p { margin: 8px 0 18px; }
.muted, small { color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: 1.8px; font-weight: 750; color: var(--accent); text-transform: uppercase; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head>div { min-width: 0; }
.button,button { display: inline-block; border: 1px solid var(--accent); border-radius: 8px; padding: 10px 18px; background: var(--accent); color: white; text-decoration: none; font: 600 14px/1.5 "Segoe UI",Arial,sans-serif; cursor: pointer; min-height: 42px; }
.button:hover,button:hover { background: #084e3e; color: white; }
.secondary { background: white; color: var(--accent); border-color: var(--line); }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 6px; min-height: 36px; }
.danger { background: white; color: #962b28; border-color: #962b28; }
button:disabled { opacity: .6; cursor: not-allowed; }
form { margin: 0; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 5px; }
input,select,textarea { font: inherit; color: inherit; border: 1px solid #718579; border-radius: 6px; background: white; padding: 9px 10px; max-width: 100%; width: 100%; min-height: 44px; }
textarea { resize: vertical; }
input[type=checkbox] { width: 20px; min-height: 20px; margin-right: 8px; vertical-align: middle; }
/* Keep the date field outlined while its native calendar control has focus. */
:focus-visible, input[type=date]:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 24px; max-width: 900px; }
.wide { grid-column: 1/-1; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 18px; margin: 20px 0; background: white; border: 1px solid var(--line); border-radius: 10px; }
.filters>div { flex: 1 1 140px; max-width: 240px; }
.filters label { margin-top: 0; }
.filters>.form-grid { flex-basis: 100%; max-width: none; width: 100%; }
.table-wrap { overflow: auto; border: 1px solid var(--line); background: white; border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { background: var(--surface-subtle); text-align: left; font-size: 11px; letter-spacing: .6px; color: #415a4d; text-transform: uppercase; }
td,th { padding: 16px; border-bottom: 1px solid #e8eeea; vertical-align: top; }
td { overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.status { display: inline-block; border-radius: 20px; background: #edf1ef; color: #3c5145; padding: 4px 9px; white-space: nowrap; font-size: 11px; font-weight: 600; }
.status.paid { background: #dff2e8; color: #14583c; }
.status.unpaid { background: #fee8e7; color: #8b2420; }
.status.review { background: #fff1cf; color: #72500a; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty strong { display: block; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.totals { display: flex; flex-wrap: wrap; gap: 24px; padding: 18px 0; font-size: 14px; }
.totals strong { font-size: 19px; display: block; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; margin-top: 18px; font-size: 14px; }
.pagination nav { flex: 0 1 auto; gap: 16px; }
.notice,.errors { padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; background: #eaf5ee; margin: 16px 0; }
.errors { border-color: #ab2b28; background: #fff0ee; }
.validation-summary-valid { display: none; }
.errors ul { margin: 0; padding-left: 18px; }
.login { max-width: 440px; margin: 60px auto; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.login button { width: 100%; margin-top: 24px; }
.login .muted { font-size: 14px; }
.tabs { display: flex; gap: 8px; margin: 24px 0; flex-wrap: wrap; }
.tabs a { padding: 10px 16px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-decoration: none; }
.tabs a[aria-current=page] { background: var(--accent); color: white; border-color: var(--accent); }
.details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.details dt { font-size: 12px; color: var(--muted); }
.details dd { margin: 4px 0; overflow-wrap: anywhere; font-weight: 600; }
details { margin: 22px 0; border-top: 1px solid var(--line); padding-top: 18px; }
summary { font-size: 16px; font-weight: 600; cursor: pointer; }
code { overflow-wrap: anywhere; }
footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px; }
.skip { position: absolute; left: 10px; top: -100px; z-index: 100; background: white; padding: 12px; }
.skip:focus { top: 10px; }
[hidden] { display: none!important; }
.inline-label { display: flex; align-items: center; gap: 6px; }
.prose { max-width: 800px; }
.break { overflow-wrap: anywhere; }
.block { display: block; margin-top: 5px; }
.approval-card,.office-card { padding: 24px; margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); min-width: 0; }
.approval-card dd { margin: 0 0 10px; overflow-wrap: anywhere; }
.approval-card dt { font-size: 13px; color: var(--muted); }
.legal-paragraph { white-space: pre-line; }
.legal-copy { max-width: 900px; overflow-wrap: anywhere; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; margin: 24px 0; }
.summary-card { min-width: 0; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.summary-card:first-child { background: var(--accent-soft); border-color: #b8d4c4; }
.summary-card h2 { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 0 0 16px; font-weight: 600; }
.summary-card h2 a { color: inherit; text-decoration: none; }
.summary-card h2 a:hover { color: var(--accent); text-decoration: underline; }
.summary-card strong { display: block; font-size: 34px; line-height: 1.15; font-weight: 750; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.summary-card small { display: block; margin-top: 12px; line-height: 1.5; }
.office-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); gap: 16px; }
.office-card h2 { font-size: 19px; overflow-wrap: anywhere; margin-top: 0; }
td details { min-width: 200px; }
td form+form { margin-top: 12px; }
.management-table td::before { display: none; }
.public-payment { max-width: 580px; text-align: center; }
.public-payment textarea { text-align: left; }
.payment-amount { font-size: 36px; font-weight: 700; }
.payment-qr { display: block; max-width: 100%; height: auto; margin: 24px auto; background: white; padding: 12px; }
.public-payment .status { white-space: normal; }
.secondary-navigation nav { display: flex; flex-wrap: wrap; gap: 12px; }
.environment { font-size: 12px; padding: 8px 32px; text-align: center; background: #fff4d8; color: #574013; border-bottom: 1px solid #e9d8a8; }
/* Shared workspace and categorical charts; counts stay readable without graphics. */
.office-context label { margin: 0; font-size: 12px; }
.office-context select { flex: 1 1 260px; width: auto; max-width: 480px; min-width: 0; }
.office-context button { font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 20px; margin: 24px 0; }
.dashboard-grid .office-card { margin: 0; }
.distribution-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 20px; }
.distribution-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.distribution-heading a { text-decoration: none; font-size: 14px; }
.distribution-heading a:hover { text-decoration: underline; }
.distribution-heading strong { font-variant-numeric: tabular-nums; }
.distribution-list meter { appearance: none; display: block; width: 100%; height: 10px; border: 0; background: var(--surface-subtle); border-radius: 10px; }
.distribution-list meter::-webkit-meter-bar { border: 0; background: var(--surface-subtle); border-radius: 10px; height: 10px; }
.distribution-list meter::-webkit-meter-optimum-value { background: var(--accent); border-radius: 10px; }
.distribution-list meter::-moz-meter-bar { background: var(--accent); border-radius: 10px; }
.source-list { list-style: none; padding: 0; margin: 20px 0; }
.source-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.source-list li:first-child { padding-top: 0; }
.source-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.source-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.source-list p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.section-heading { margin-top: 32px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 8px 0 0; }
@media(max-width:900px) { .brand small { display: none; } .header-inner { gap: 24px; } }
@media(max-width:760px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .office-context select { flex-basis: 100%; max-width: none; }
  .header-inner { padding: 14px 18px; gap: 12px; flex-wrap: wrap; }
  .header-inner nav { order: 3; flex-basis: 100%; gap: 20px; font-size: 14px; }
  .account-menu { margin-left: auto; } .context-kind { margin-left: 0; }
  main { margin: 24px auto; padding: 0 16px; } h1 { font-size: 26px; }
  .page-head { align-items: flex-start; flex-wrap: wrap; } .form-grid { grid-template-columns: 1fr; gap: 4px; }
  .details { grid-template-columns: 1fr 1fr; padding: 16px; }
  .filters { padding: 12px; gap: 10px; } .filters>div { max-width: none; flex-basis: calc(50% - 10px); min-width: 0; }
  td,th { padding: 12px 10px; } .environment { padding: 8px 16px; }
  .pagination { align-items: flex-start; } .login { margin: 36px auto; padding: 22px; }
  .table-wrap { max-width: 100%; } .totals { gap: 20px; }
  .management-table,.management-table tbody,.management-table tbody tr,.management-table td { display: block; width: 100%; }
  .management-table caption { display: block; width: 100%; padding: 8px 14px; text-align: left; }
  .management-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .management-table tbody tr { border-bottom: 2px solid var(--line); padding: 8px 0; }
  .management-table tbody tr:last-child { border-bottom: 0; }
  .management-table td { border: 0; padding: 10px 14px; }
  .management-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
  .management-table td details { min-width: 0; } .management-table td p { margin-bottom: 8px; }
  .management-table button { max-width: 100%; }
}
@media(max-width:380px) { .details { grid-template-columns: 1fr; } .header-inner nav { gap: 12px; } .summary-grid { grid-template-columns: 1fr; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto!important; } }
/* Record details reuse the shared cards; all source fields remain visible. */
.record-heading { margin-top: 24px; }
.record-heading .status { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.record-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 20px; margin: 24px 0; }
.record-grid .office-card,.document-grid .office-card { margin: 0; }
.record-grid h3,.document-grid h3,.document-summary h3 { font-size: 16px; margin: 0 0 12px; }
.record-grid h3 { margin-top: 24px; }
.details.details-plain { grid-template-columns: repeat(2,minmax(0,1fr)); border: 0; padding: 0; background: transparent; margin: 20px 0 0; }
.value-list { margin: 0 0 16px; }
.value-list>div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.value-list dt { color: var(--muted); font-size: 13px; }
.value-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.value-list .value-highlight { padding: 16px; margin: 8px -8px; border: 0; border-radius: 8px; background: var(--accent-soft); }
.value-highlight dt { color: var(--accent); }
.value-highlight dd { font-size: 24px; color: var(--accent); }
.document-list { list-style: none; margin: 0; padding: 0; }
.document-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.document-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.document-list span { font-size: 13px; color: var(--muted); }
.document-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.document-summary>div { flex: 1 1 300px; min-width: 0; }
.document-summary p { margin: 0; }
.record-timeline { list-style: none; padding: 0; margin: 24px 0; }
.record-timeline li { position: relative; padding: 0 0 24px 24px; margin-left: 5px; border-left: 2px solid var(--line); }
.record-timeline li:last-child { padding-bottom: 0; }
.record-timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.record-timeline strong,.record-timeline span { display: block; }
.record-timeline span { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media(max-width:760px) { .record-grid { grid-template-columns: 1fr; } }
@media(max-width:380px) { .details.details-plain { grid-template-columns: 1fr; } }
