/* Поток — task-focused, accessible application layer. */
:root {
  --bg: #f4f6f3;
  --paper: #fff;
  --ink: #1c352a;
  --muted: #627268;
  --line: #dee6df;
  --green: #245b43;
  --lime: #cbed8a;
  --soft: #edf3e9;
  --orange: #946020;
  --radius: 14px;
  --shadow: 0 2px 6px #17382904, 0 8px 24px #17382903;
}
html { scroll-padding-top: 100px; }
body { font-size: 14px; line-height: 1.55; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:hover { filter: none; }
button:disabled, .btn:disabled { cursor: not-allowed; opacity: .48; }
:focus-visible { outline: 3px solid #4d8c60; outline-offset: 3px; }
h1 { font-size: 31px; font-weight: 650; line-height: 1.2; letter-spacing: -.9px; }
h1:focus, h2[tabindex]:focus { outline: none; }
h2 { font-size: 17px; line-height: 1.4; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.subtitle { font-size: 13px; line-height: 1.6; color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.45px; color: #607454; }
.small, .table .small { font-size: 12px; line-height: 1.55; color: var(--muted); }
.amount, .num, .kpi-value, .operation-amount { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; top: 12px; left: 20px; z-index: 250; padding: 12px 18px; border-radius: 8px; background: #fff; color: var(--green); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
[hidden] { display: none !important; }

/* Shell and wayfinding. */
.sidebar { width: 248px; padding: 26px 16px 18px; background: #162f25; overflow-x: hidden; }
.brand { width: 100%; padding: 0 16px; font-size: 30px; font-weight: 700; color: #f3f7ee; text-align: left; border-radius: 8px; min-height: 44px; }
.brand-wordmark { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.workspace { margin: 22px 8px 18px; padding: 12px 10px; border-color: #ffffff17; font-size: 12px; }
.workspace small { font-size: 11px; color: #607454; }
.workspace-avatar { width: 34px; height: 34px; }
.nav { gap: 3px; }
.nav-label { font-size: 10px; letter-spacing: 1.4px; color: #607454; padding: 16px 14px 3px; margin: 0; }
.nav button { min-height: 43px; font-size: 13px; font-weight: 500; border-radius: 8px; color: #c2d0c6; gap: 11px; padding: 10px 13px; position: relative; }
.nav button:hover, .sidebar-bottom button:hover { background: #ffffff0b; color: #fff; }
.nav button.active { color: #fff; background: #ffffff12; }
.nav button.active:before { content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--lime); }
.nav button .count { font-size: 10px; min-width: 20px; text-align: center; padding: 1px 5px; }
.nav button .attention-count { background: #d4ef9e; color: #294329; font-weight: 650; }
.sidebar-bottom { padding-top: 22px; }
.sidebar-bottom button { min-height: 42px; font-size: 12px; width: 100%; border-radius: 8px; }
.sidebar-bottom [aria-current=page] { background: #ffffff12; color: #fff; }
.sidebar-local { display: block; font-size: 10px; color: #607454; margin: 12px 13px 0; }
.main { margin-left: 248px; width: calc(100% - 248px); }
.topbar { position: sticky; top: 0; z-index: 25; height: 76px; padding: 0 32px; gap: 20px; background: #fffffff5; backdrop-filter: blur(14px); }
.breadcrumb { font-size: 12px; min-width: 120px; gap: 9px; }
.breadcrumb-home { color: #607454; }
.breadcrumb strong { font-size: 13px; color: #43584a; font-weight: 600; white-space: nowrap; }
.global-search-trigger { min-height: 39px; border: 1px solid var(--line); background: #f7f9f5; border-radius: 9px; padding: 8px 11px; display: flex; align-items: center; gap: 9px; color: #607454; text-align: left; max-width: 365px; flex: 1; }
.global-search-trigger span { font-size: 12px; flex: 1; }
.global-search-trigger:hover { border-color: #afc4ad; }
kbd { font: 10px/1.4 var(--sans); border: 1px solid #dbe3d8; background: #fff; border-radius: 4px; padding: 2px 5px; color: #607454; white-space: nowrap; }
.topbar-actions { gap: 14px; }
.local-chip { display: inline-flex; max-width: 150px; font-size: 11px; line-height: 1.4; color: #637a64; }
.local-chip:before { content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #71956a; align-self: center; }
.local-chip[data-status=error] { color: #ac4b35; }
.local-chip[data-status=error]:before { background: #ac4b35; }
.local-chip[data-status=saving]:before { background: #bd913e; animation: status-pulse 1s infinite alternate; }
@keyframes status-pulse { to { opacity: .3; } }
.content { max-width: 1510px; padding: 32px; }
.page-heading { margin-bottom: 25px; align-items: center; }
.page-heading .eyebrow { margin-bottom: 7px; }
.page-heading .subtitle { max-width: 750px; }
.page-filters { justify-content: flex-end; flex-shrink: 0; max-width: 60%; }
.control-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.control-field > span { font-size: 11px; color: #657766; font-weight: 550; }
.page-filters .select { max-width: 330px; min-width: 200px; }
.mobile-bottom-nav { display: none; }

/* Controls: one scale, sufficient contrast and touch targets. */
.btn { min-height: 42px; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 10px 15px; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { background: #f2f6ee; border-color: #b6c9b0; }
.btn.primary { background: var(--lime); border-color: var(--lime); color: #233d25; }
.btn.primary:hover:not(:disabled) { background: #bfe273; border-color: #bfe273; }
.btn.dark { background: #244b36; color: #fff; border-color: #244b36; }
.btn.dark:hover:not(:disabled) { background: #306143; }
.btn.soft { color: #345d3c; background: #edf3e7; border-color: #e0e9d8; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: #a64336; background: #fff7f3; border-color: #edd7cc; }
.btn.danger.ghost { background: transparent; border-color: transparent; }
.icon-btn { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; }
.icon-btn:hover { background: #f0f5eb; border-color: #b6c9b0; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, .select, textarea { min-height: 43px; border: 1px solid #cdd9cb; border-radius: 8px; background: #fff; color: #2c4534; font: 13px/1.5 var(--sans); padding: 10px 12px; max-width: 100%; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: #376b43; flex-shrink: 0; cursor: pointer; }
.select { height: 43px; padding-right: 28px; }
input::placeholder, textarea::placeholder { color: #607454; opacity: 1; }
.field label, label.field, .field > span { font-size: 12px; font-weight: 550; color: #506650; }
.field { margin-bottom: 18px; }
.field small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.field .select { max-width: none; width: 100%; }
.check-field { font-size: 12px; line-height: 1.7; color: #4e654e; gap: 10px; }
.field-section { font-size: 13px; margin-top: 25px; }
.search { display: block; min-width: 180px; }
.search svg { top: 13px; left: 13px; }
.search input:not([type=checkbox]) { width: 100%; padding-left: 39px; }
.password-control { position: relative; }
.password-control input { width: 100%; padding-right: 82px !important; }
.password-control button { position: absolute; right: 5px; top: 4px; height: 35px; padding: 0 9px; color: #456e40; font-size: 11px; border-radius: 5px; }
.password-control button:hover { background: #f0f5eb; }
.link-button { font-size: 12px; font-weight: 550; min-height: 30px; }
.link-button:hover { color: #234c2c; text-decoration: underline; text-underline-offset: 3px; }
.optional-label { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 6px; }
.form-error { font-size: 13px; line-height: 1.6; background: #fff2e9; color: #9c3d28; border: 1px solid #f0d8c9; padding: 12px 14px; }

/* Dashboard hierarchy. */
.panel { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { padding: 22px 24px 0; }
.panel-head .subtitle { font-size: 12px; margin-top: 5px; }
.panel-body { padding: 22px 24px; }
.section-gap { margin-top: 24px; }
.getting-started { display: flex; align-items: center; gap: 16px; border: 1px solid #d7e6c8; border-radius: var(--radius); padding: 20px 23px; background: linear-gradient(110deg,#eef5e4,#f6f9ef); margin-bottom: 23px; }
.getting-started-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: #4d7540; background: #e0edcf; flex-shrink: 0; }
.getting-started > div:nth-child(2) { flex: 1; }
.getting-started h2 { font-size: 16px; }
.getting-started p { color: #66785e; font-size: 12px; margin-top: 4px; }
.overview-period { padding: 18px 23px; display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.overview-period h2 { font-size: 15px; }
.overview-period .subtitle { font-size: 11px; margin-top: 4px; }
.overview-period form { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.overview-period form > .form-error { align-self: stretch; }
.date-fields { display: flex; align-items: flex-end; gap: 9px; }
.date-fields > span { align-self: center; padding-top: 18px; color: #607454; }
.overview-period label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: #67785f; }
.overview-period input[type=date] { width: 151px; }
.period-presets { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.period-presets .btn { min-height: 29px; padding: 4px 9px; font-size: 11px; border: none; background: transparent; color: #677960; }
.period-presets .btn:hover { background: #f0f5e9; }
.period-presets .btn.active { background: #e9f2df; color: #3f6638; }
.kpis { gap: 16px; margin-bottom: 18px; }
.kpi { min-height: 150px; padding: 22px 22px 19px; border-color: var(--line); border-radius: var(--radius); min-width: 0; text-align: left; box-shadow: var(--shadow); container-type: inline-size; }
button.kpi { transition: transform .15s, border-color .15s, box-shadow .15s; }
button.kpi:hover { transform: translateY(-2px); border-color: #9ebc90; box-shadow: 0 6px 22px #244a3610; }
.kpi-label { font-size: 12px; font-weight: 500; color: #66775f; margin-bottom: 16px; min-height: 20px; }
.kpi-value { font-size: 28px; font-size: clamp(20px,11cqi,34px); font-weight: 600; letter-spacing: -.8px; line-height: 1.2; }
.kpi-value .currency { font-size: 15px; color: #607454; }
.kpi-foot { font-size: 11px; color: #607454; margin-top: 15px; }
.kpi-foot svg:last-child { margin-left: auto; }
.kpi.featured { background: #234d38; border-color: #234d38; }
.kpi.featured .kpi-label, .kpi.featured .kpi-foot { color: #c4d8b8; }
.cash-scope-note { font-size: 12px; margin: -2px 0 19px; color: #63775f; }
.cash-scope-note summary { cursor: pointer; width: fit-content; padding: 4px 0; }
.cash-scope-note p { line-height: 1.8; margin-top: 7px; max-width: 1100px; }
.operational-summary { background: transparent; border: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 0 3px 6px; gap: 28px; margin-bottom: 23px; }
.operational-summary > div { padding-left: 17px; border-left: 2px solid #dce5d4; }
.operational-summary .small { font-size: 12px; }
.operational-summary strong { font-size: 19px; font-weight: 600; letter-spacing: -.3px; margin: 5px 0; }
.operational-summary small { font-size: 11px; color: #6b7b64; }
.attention-panel { margin-bottom: 27px; }
.attention-panel .panel-head { padding: 19px 22px 0; }
.attention-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 18px 10px 15px; }
.attention-task { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; min-width: 0; border-radius: 9px; margin: 0 4px; }
.attention-task:hover { background: #f2f6ed; }
.task-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: #edf3e5; color: #607454; }
.attention-task.has-tasks .task-icon { color: #976e2b; background: #faf1df; }
.task-copy { min-width: 0; flex: 1; }
.task-copy strong { display: block; font-size: 13px; font-weight: 600; }
.task-copy small { display: block; font-size: 11px; color: #607454; line-height: 1.6; margin-top: 3px; }
.task-count { font-size: 19px; font-weight: 600; color: #48623d; }
.attention-task.is-complete .task-count { color: #607454; }
.contract-metrics-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 1px 12px; gap: 14px; }
.contract-metrics-heading h2 { font-size: 15px; }
.contract-metrics-heading > span { font-size: 11px; color: #607454; }
.contract-kpis .kpi { min-height: 114px; padding: 17px 20px; box-shadow: none; background: #fafcf8; }
.contract-kpis .kpi-label { font-size: 11px; color: #687b60; margin-bottom: 8px; }
.contract-kpis .kpi-value { font-size: 25px; letter-spacing: -.6px; }
.contract-kpis .kpi-foot { font-size: 10px; color: #607454; margin-top: 7px; }
.contract-budget, .additional-expenses { background: #eff4e9; border-color: #dde7d4; border-radius: var(--radius); }
.additional-expenses { margin: 22px 0; padding: 20px 23px; }
.cards-overview-toggle, .budget-toggle { font-size: 16px; font-weight: 600; }
.cards-overview-heading .eyebrow, .contract-budget .eyebrow { font-size: 10px; }
.cards-overview-heading .subtitle { font-size: 12px; }
.cards-overview-total span { font-size: 11px; }
.cards-overview-total strong { font-size: 23px; }
.additional-expense-kpis { grid-template-columns: repeat(auto-fit,minmax(185px,1fr)); gap: 12px; }
.additional-expense-kpis .kpi { min-height: 145px; padding: 18px; }
.additional-expense-kpis .kpi-value { font-size: 23px; font-size: clamp(18px,11cqi,27px); }
.additional-expense-subtitle { font-size: 11px; color: #677d5c; }
.next-payments { margin: 23px 0; }
.next-payments .panel-head { padding-bottom: 18px; }
.next-payment-list { border-top: 1px solid var(--line); }
.next-payment-list > button { width: 100%; padding: 16px 24px; border-bottom: 1px solid #eaf0e4; display: grid; grid-template-columns: 108px minmax(0,1fr) auto 17px; align-items: center; gap: 18px; text-align: left; }
.next-payment-list > button:last-child { border: 0; }
.next-payment-list > button:hover { background: #f5f8f0; }
.next-payment-list small { display: block; color: #607454; font-size: 11px; margin-top: 4px; }
.next-payment-name strong { font-size: 13px; font-weight: 550; }
.next-payment-date { font-size: 12px; font-weight: 550; }
.next-payment-list .amount { font-size: 14px; }
.next-payment-empty { padding: 15px 24px 23px; }
.analytics { gap: 20px; }
.analytics .panel-head { padding-bottom: 5px; }
.chart-svg { height: 228px; }
.legend, .chart-bottom, .breakdown-row { font-size: 11px; }
.footer-note { font-size: 11px; line-height: 1.8; margin-top: 27px; color: #607454; }

/* Tables and bank workspace. */
.table { font-size: 12px; line-height: 1.6; }
.table thead th { font-size: 11px; font-weight: 600; color: #63765b; padding: 14px 20px; background: #f6f9f2; }
.table tbody td { padding: 16px 20px; border-bottom-color: #e6ece0; }
.table tbody tr:hover { background: #f8faf4; }
.table .name strong { font-size: 12px; font-weight: 600; }
.table .small { font-size: 11px; color: #607454; margin-top: 4px; }
.table .amount { font-size: 13px; font-weight: 600; }
.table-wrap { scrollbar-width: thin; scrollbar-color: #becdb6 transparent; }
.table-wrap:focus-visible { outline-offset: -3px; }
.table-bottom { font-size: 11px; color: #677b5f; padding: 14px 22px; gap: 15px; flex-wrap: wrap; }
.pill { font-size: 10px; padding: 4px 8px; color: #5a6f51; background: #eef3e8; border-radius: 5px; font-weight: 550; }
.pill.green { color: #3c6b36; background: #eaf3e1; }
.pill.orange { color: #8a6027; background: #fbf0df; }
.pill.red { color: #a44d3b; background: #fff0e9; }
.pill.blue { color: #406f86; background: #ecf4f9; }
.pagination > div { display: flex; align-items: center; gap: 8px; }
.row-action { font-size: 11px; min-height: 35px; padding: 7px 10px; }
.bank-filter-panel { overflow: visible; padding: 20px 22px 14px; margin-bottom: 20px; }
.bank-main-filters { display: flex; align-items: flex-end; gap: 12px; }
.bank-search { flex: 1; min-width: 180px; }
.bank-main-filters .control-field { min-width: 210px; }
.bank-main-filters .control-field .select { width: 100%; max-width: none; }
.bank-advanced-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.bank-advanced-filters .select { width: 100%; max-width: none; }
.bank-advanced-filters > p { grid-column: 1/-1; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; align-items: center; }
.filter-chip { min-height: 29px; border-radius: 6px; display: inline-flex; align-items: center; gap: 9px; padding: 5px 9px; background: #edf3e7; color: #446c38; font-size: 11px; overflow-wrap: anywhere; text-align: left; }
.filter-chip:hover { background: #e2edda; }
.filter-summary { font-size: 11px; color: #607454; line-height: 1.7; margin-top: 12px; }
.bank-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.bank-tabs { margin: 0; flex-wrap: wrap; background: #e8efdf; }
.bank-tabs button { min-height: 35px; font-size: 11px; padding: 7px 10px; display: inline-flex; gap: 7px; align-items: center; color: #5f7651; }
.bank-tabs button > span { background: #d9e5ce; border-radius: 4px; padding: 0 5px; font-size: 10px; }
.bank-tabs button.active { background: #fff; color: #34582d; box-shadow: 0 1px 5px #283c1610; }
.sort-control { flex-shrink: 0; }
.sort-control .select { font-size: 12px; }
.bank-list-head { padding: 19px 22px 15px; }
.bank-list-head .subtitle { margin-top: 7px; }
.bank-list-head .subtitle strong { font-weight: 550; }
.bank-contract-summary { padding: 10px 22px; border-top: 1px solid var(--line); background: #f7faf2; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 11px; color: #5f7950; }
.bank-register > .table-wrap { max-height: 690px; max-height: min(68vh,780px); }
.bank-table thead th { position: sticky; top: 0; z-index: 2; }
.bank-table .name { max-width: 380px; min-width: 230px; }
.bank-purpose { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; max-width: 360px; }
.card-owner-label { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: #456e3b; margin-top: 5px; }
.bank-table td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -8px 0 10px #fff; }
.bank-table tr:hover td:last-child { background: #f8faf4; }
.bank-table .amount { font-size: 13px; }
.queue-toolbar { padding: 18px 22px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.queue-toolbar .search { max-width: 300px; flex: 1; }
.queue-selection-label { margin-left: auto; color: #5e7950; font-size: 12px; }
.unassigned-payments-head { padding-bottom: 18px; }
.unassigned-payments-scroll { max-height: 620px; }
.unassigned-payments-scroll thead th { position: sticky; top: 0; z-index: 2; }
.unassigned-payment-actions { gap: 7px; }
.unassigned-payment-actions .btn { font-size: 11px; min-height: 35px; padding: 6px 9px; }
.unassigned-purpose { min-width: 220px; }
.unassigned-payments-total span { font-size: 11px; }
.unassigned-payments-total strong { font-size: 22px; }
.queue-batch-preview { margin-top: 22px; }
.queue-batch-preview p { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.queue-batch-preview small { display: block; color: #607454; margin-top: 5px; }

/* Forms and financial detail dialogs. */
.modal-open { overflow: hidden; }
.modal-backdrop { background: #13291e73; backdrop-filter: blur(4px); padding: 28px; }
.modal { width: 730px; border-radius: 17px; max-height: calc(100dvh - 56px); box-shadow: 0 24px 90px #0e271d38; }
.modal.wide { width: 1150px; }
.modal-header { padding: 23px 27px 19px; }
.modal-header h2 { font-size: 21px; font-weight: 650; letter-spacing: -.5px; }
.modal-header p { font-size: 12px; line-height: 1.7; color: #607454; max-width: 720px; }
.modal-body { padding: 23px 27px; }
.modal-footer { padding: 17px 27px; gap: 9px; background: #fffffff7; backdrop-filter: blur(12px); flex-wrap: wrap; }
.modal-unsaved { background: #fff6e6; color: #8c682d; font-size: 11px; padding: 9px 27px; border-bottom: 1px solid #ecdcc4; }
.modal .metrics-inline { gap: 24px; }
.metrics-inline label { font-size: 11px; color: #677d5b; }
.metrics-inline strong { font-size: 21px; font-weight: 600; }
.metrics-inline { gap: 22px 30px; }
.operation-summary > div { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.operation-date { color: #607454; font-size: 12px; }
.operation-amount { display: block; font-size: 34px; letter-spacing: -.8px; margin: 17px 0 15px; font-weight: 600; }
.operation-summary h3 { font-size: 16px; margin-bottom: 7px; }
.operation-summary > p { font-size: 13px; color: #536c49; line-height: 1.8; overflow-wrap: anywhere; }
.operation-assignment { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.operation-assignment > h3 { margin-bottom: 18px; font-size: 15px; }
.operation-assignment > .field-section:first-of-type { display: none; }
.operation-assignment .select { width: 100%; max-width: none; }
.allocation-projects, .operation-source { border: 1px solid var(--line); border-radius: 9px; padding: 13px 15px; margin-top: 17px; }
.allocation-projects summary, .operation-source summary { font-size: 12px; font-weight: 550; cursor: pointer; }
.allocation-projects[open] summary, .operation-source[open] summary { margin-bottom: 15px; }
.operation-source { background: #f8faf5; }
.operation-source dl { margin: 0; }
.operation-source dl > div { margin: 12px 0; }
.operation-source dt { font-size: 11px; color: #607454; }
.operation-source dd { font-size: 12px; margin: 3px 0 0; overflow-wrap: anywhere; }
.operation-source p { font-size: 11px; color: #5f7852; margin-top: 10px; }
.operation-secondary { margin-right: auto; display: flex; gap: 6px; align-items: center; }
.operation-secondary .btn { font-size: 11px; }
.inline-help, .source-quote { font-size: 12px; color: #5a744e; line-height: 1.85; padding: 14px 16px; }
.notice-inline { font-size: 12px; color: #5a754c; line-height: 1.85; padding: 15px 18px; }
.section-description, .text-block { font-size: 13px; color: #5c7352; line-height: 1.85; }
.notice { font-size: 13px; }
.notice small { font-size: 12px; }
.balance-note { font-size: 12px; line-height: 1.8; color: #607454; padding: 15px 22px; }
.calculation-explanation { border-top: 1px solid var(--line); padding-top: 16px; }
.calculation-explanation summary { font-size: 12px; color: #527346; cursor: pointer; }
.calculation-explanation .inline-help { margin-top: 14px; }
.payroll-filter { gap: 12px; }
.payroll-filter label { font-size: 12px; color: #657b58; }
.payroll-panel > .panel-head { align-items: flex-start; flex-wrap: wrap; }
.payroll-panel .metrics-inline > div { flex: 1 1 180px; }
.payroll-panel .metrics-inline > div:nth-child(4) { background: #edf5e3; border: 1px solid #d9e9c8; border-radius: 10px; padding: 14px 16px; margin-top: -14px; min-width: 235px; }
.payroll-panel .metrics-inline .small { display: block; font-size: 10px; margin-top: 7px; line-height: 1.6; }
.settings-grid { gap: 24px; }
.settings-panel { padding: 26px; }
.settings-panel h2 { margin-bottom: 19px; }
.accounting-rules { margin-bottom: 23px; padding: 17px 22px; }
.accounting-rules summary { font-size: 13px; font-weight: 600; cursor: pointer; }
.accounting-rules p { margin-top: 15px; }
.settings-advanced { margin: 24px 0; padding: 16px; background: #f7faf2; border: 1px solid var(--line); border-radius: 9px; }
.settings-advanced summary { font-size: 13px; font-weight: 550; cursor: pointer; }
.settings-advanced[open] summary { margin-bottom: 16px; }
.backup-status { display: flex; gap: 13px; padding: 16px; background: #f1f6e9; border: 1px solid #e1ebd6; border-radius: 10px; margin: 19px 0; color: #557745; }
.backup-status strong { display: block; font-size: 13px; }
.backup-status span { display: block; font-size: 11px; margin-top: 4px; color: #607454; }
.backup-actions .btn { min-height: 44px; font-size: 12px; }
.quote-saved-versions { margin-bottom: 22px; padding: 18px 22px; }
.quote-saved-versions > summary { font-size: 13px; font-weight: 600; cursor: pointer; }
.quote-saved-versions > p { font-size: 12px; color: #607454; margin-top: 14px; }
.quote-saved-versions .count { margin-left: 7px; padding: 2px 7px; border-radius: 5px; background: #eaf1e1; }
.quote-toolbar .filter-label, .quote-stages > label, .quote-reference > small { font-size: 12px; }
.quote-stage-totals span { font-size: 11px; color: #607454; }
.quote-extra summary, .quote-basis > summary { font-size: 13px; }
.quote-section-name > strong { font-size: 12px; }
.quote-building { padding: 20px; margin-bottom: 20px; }
.quote-building legend { font-size: 13px; font-weight: 600; }

/* Upload as a guided task, with the chat still available. */
.upload-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.upload-steps { display: flex; list-style: none; padding: 0; margin: 0; gap: 27px; }
.upload-steps li { display: flex; align-items: center; gap: 9px; color: #657d56; font-size: 12px; }
.upload-steps b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d0dec3; background: #eef5e5; color: #5d7d49; font-size: 11px; }
.upload-intents { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.upload-intents > button { border: 1px solid var(--line); border-radius: 12px; padding: 20px 23px; background: #fff; display: flex; align-items: center; gap: 16px; text-align: left; }
.upload-intents > button[aria-pressed=true] { background: #f0f7e5; border-color: #a2c783; box-shadow: inset 0 0 0 1px #a2c783; }
.upload-intents > button > svg { color: #607454; }
.upload-intents strong { font-size: 14px; font-weight: 600; display: block; }
.upload-intents small { display: block; font-size: 12px; color: #607454; margin-top: 4px; }
.intent-radio { margin-left: auto; width: 18px; height: 18px; border: 1px solid #b9c9ae; border-radius: 50%; flex-shrink: 0; }
[aria-pressed=true] > .intent-radio { background: #5e873f; border-color: #5e873f; box-shadow: inset 0 0 0 4px #f2f7eb; }
.chat-layout { grid-template-columns: minmax(0,1.65fr) minmax(250px,1fr); gap: 24px; }
.chat-layout > aside { display: block; }
.chat-panel { min-height: 0; }
.upload-document-head { padding: 25px 27px 0; }
.upload-document-head p { color: #607454; font-size: 12px; margin-top: 6px; }
.upload-drop-wrap { padding: 23px 27px 18px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1.5px dashed #b6cfa1; background: #f7faf2; padding: 32px 20px; border-radius: 11px; color: #607454; margin: 0; }
.dropzone > svg { margin-bottom: 9px; }
.dropzone > strong { font-size: 17px; font-weight: 600; color: #486e36; }
.dropzone > span { font-size: 12px; color: #607454; }
.dropzone > span.btn { font-size: 12px; color: #284424; margin: 10px 0 5px; }
.dropzone > small { font-size: 11px; color: #607454; }
.dropzone:hover, .dropzone:focus-visible { background: #f0f6e6; border-color: #7ea75d; }
.dropzone.dragging { background: #eaf4db; border-color: #5d8c3a; }
.dropzone.is-busy { opacity: .65; pointer-events: none; }
.upload-reassurance { display: flex; align-items: flex-start; gap: 9px; margin: 0 27px 25px; font-size: 12px; color: #607454; }
.upload-reassurance svg { margin-top: 2px; }
.chat-assistance { border-top: 1px solid var(--line); background: #fdfefb; }
.chat-assistance > summary { display: flex; align-items: center; gap: 9px; padding: 18px 26px; font-size: 13px; font-weight: 550; color: #577643; cursor: pointer; }
.chat-assistance > summary .small { font-size: 11px; font-weight: 400; color: #607454; margin-left: auto; }
.messages { min-height: 100px; max-height: 390px; padding: 20px 26px; gap: 18px; }
.message-content { font-size: 13px; color: #526f42; }
.message-content small { font-size: 10px; color: #607454; }
.chat-compose { background: #fff; padding: 13px 17px; }
.compose-row input:not([type=checkbox]) { border: 0; background: transparent; }
.compose-row .send { width: 42px; height: 42px; }
.aside-panel { padding: 23px; }
.aside-panel h2 { font-size: 15px; }
.upload-result-list { margin-top: 21px; display: grid; gap: 18px; }
.upload-result-list > div { display: flex; align-items: flex-start; gap: 12px; color: #607454; }
.upload-result-list strong { font-size: 12px; font-weight: 600; display: block; color: #476b35; }
.upload-result-list small { display: block; font-size: 11px; color: #607454; margin-top: 4px; }
.upload-format-help { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.upload-format-help summary { font-size: 12px; color: #5e7b48; cursor: pointer; }
.upload-format-help p { font-size: 11px; color: #607454; margin-top: 12px; line-height: 1.8; }
.import-history-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.import-history-item:last-child { border: none; padding-bottom: 0; }
.import-history-item > div:first-child { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.import-history-item time { font-size: 10px; color: #607454; }
.import-history-item > strong { display: block; font-size: 11px; color: #486b37; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; margin: 9px 0 6px; }
.import-history-item > p { font-size: 10px; color: #607454; }
.import-history-item .controls { margin-top: 11px; }
.empty-aside { font-size: 12px; color: #607454; margin-top: 16px; line-height: 1.8; }
.admin-login-panel { width: 470px; max-width: 100%; margin: 30px auto 60px; }
.admin-login-panel .panel-body { padding: 33px; }
.admin-lock { width: 56px; height: 56px; display: grid; place-items: center; background: #eef5e3; color: #607454; border-radius: 15px; margin-bottom: 22px; }
.admin-login-panel h2 { font-size: 23px; margin-bottom: 12px; }
.admin-login-panel .text-block { font-size: 13px; }
.admin-login-panel form { margin: 24px 0 18px; }
.admin-login-panel form > button { width: 100%; }
.admin-login-panel .subtitle, .login-details { font-size: 11px; color: #607454; line-height: 1.8; }
.login-details { margin-top: 14px; }
.login-details summary { cursor: pointer; }
.login-details p { margin-top: 8px; }
.admin-login-panel .btn.ghost { margin-top: 15px; font-size: 12px; }

/* Search and short, optional usage guidance. */
.command-dialog.wide { width: 780px; }
.command-dialog .modal-body { padding-top: 19px; }
.command-search { display: flex; align-items: center; gap: 10px; border: 1px solid #b7ccaa; border-radius: 10px; padding: 4px 14px; color: #607454; }
.command-search input[type=search] { width: 100%; border: 0; font-size: 15px; background: transparent; box-shadow: none; }
.command-search input:focus { outline: none; }
.command-search:focus-within { outline: 2px solid #b6d49c; outline-offset: 2px; }
.command-count { font-size: 11px; color: #607454; margin: 15px 0 7px; }
.command-results { padding: 0; margin: 0 -9px; list-style: none; max-height: 46vh; overflow-y: auto; }
.command-results li > button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 10px; text-align: left; border-radius: 8px; }
.command-results li > button:hover, .command-results li > button:focus-visible { background: #edf4e3; }
.command-result-icon { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #e0e9d7; color: #607454; background: #f6faf0; border-radius: 9px; flex-shrink: 0; }
.command-result-copy { min-width: 0; flex: 1; }
.command-result-copy strong { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-result-copy small { display: block; font-size: 11px; margin-top: 4px; color: #607454; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-results .amount { font-size: 12px; white-space: nowrap; font-weight: 550; }
.command-hint { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #607454; margin-top: 17px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.guide-grid > button { display: flex; align-items: flex-start; gap: 12px; background: #f6faf0; border: 1px solid #dfead6; padding: 19px; border-radius: 10px; text-align: left; color: #607454; }
.guide-grid > button:hover { background: #edf5df; border-color: #b4cca0; }
.guide-grid > button > span { flex: 1; }
.guide-grid strong { display: block; color: #3e642d; font-size: 13px; font-weight: 600; }
.guide-grid small { display: block; font-size: 11px; line-height: 1.7; color: #607454; margin-top: 7px; }
.guide-keyboard { font-size: 11px; color: #607454; margin-top: 20px; }
#toast { font-size: 13px; line-height: 1.6; left: calc(50% + 124px); max-width: min(650px,85vw); padding: 13px 20px; border-radius: 10px; }

@media (min-width: 1700px) {
  .content { padding: 38px 42px; }
  .topbar { padding: 0 42px; }
}
@media (max-width: 1390px) {
  .topbar { gap: 13px; padding: 0 25px; }
  .breadcrumb-home, .breadcrumb .crumb-divider { display: none; }
  .topbar .local-chip { display: none; }
  .content { padding: 28px 25px; }
  .global-search-trigger { max-width: 305px; }
  .attention-task { gap: 9px; padding: 10px; }
  .task-copy small { font-size: 10px; }
  .task-icon { width: 31px; height: 31px; }
  .bank-main-filters { flex-wrap: wrap; }
  .bank-main-filters .bank-search { flex: 1 1 270px; }
  .bank-main-filters .control-field { flex: 1 1 220px; }
  .bank-toolbar { flex-wrap: wrap; }
  .page-filters { max-width: 100%; }
}
@media (max-width: 1150px) {
  .sidebar { width: 224px; padding-left: 12px; padding-right: 12px; }
  .main { margin-left: 224px; width: calc(100% - 224px); }
  .global-search-trigger kbd { display: none; }
  .global-search-trigger span { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions { gap: 9px; }
  .help-trigger { display: none; }
  .overview-period { align-items: flex-start; flex-direction: column; gap: 15px; }
  .overview-period form { width: 100%; align-items: flex-start; }
  .period-presets { justify-content: flex-start; }
  .attention-grid { grid-template-columns: 1fr; padding: 8px 14px 15px; }
  .attention-task { margin: 3px 0; padding: 12px; }
  .task-copy small { font-size: 11px; }
  .task-icon { width: 36px; height: 36px; }
  .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-value { font-size: 28px; }
  .additional-expense-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .additional-expense-kpis .kpi-value { font-size: 25px; }
  .chat-layout { grid-template-columns: 1fr; }
  .upload-aside { display: grid !important; grid-template-columns: 1fr 1fr; gap: 18px; }
  .upload-aside > .section-gap { margin-top: 0; }
  .settings-grid { grid-template-columns: 1fr; }
  .queue-toolbar { flex-wrap: wrap; }
  .queue-selection-label { margin-left: 0; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 88px; }
  .sidebar { width: 270px; transform: translateX(-100%); transition: transform .18s ease; z-index: 80; }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay.show { display: block; position: fixed; inset: 0; background: #0c231b70; z-index: 75; }
  .menu-open { overflow: hidden; }
  .main { width: 100%; margin-left: 0; }
  .mobile-menu { display: inline-grid; place-items: center; width: 39px; height: 39px; padding: 0; }
  .breadcrumb { min-width: 0; }
  .breadcrumb strong { font-size: 12px; }
  .topbar { height: 68px; padding: 0 21px; gap: 15px; }
  .global-search-trigger { flex: 1; max-width: 275px; }
  .topbar-actions > .btn { min-height: 39px; padding: 8px 12px; font-size: 11px; }
  .content { padding: 26px 21px 100px; }
  .mobile-bottom-nav { display: grid; grid-template-columns: repeat(5,1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; padding: 7px 12px max(7px,env(safe-area-inset-bottom)); background: #fffffff7; backdrop-filter: blur(16px); border-top: 1px solid #dce8d2; box-shadow: 0 -4px 22px #203b1410; }
  .mobile-bottom-nav button { min-height: 47px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; font-size: 10px; color: #607454; border-radius: 8px; }
  .mobile-bottom-nav button[aria-current=page] { background: #eaf4dc; color: #3e6f2e; font-weight: 600; }
  .mobile-bottom-nav button:hover { background: #f0f6e8; }
  .operational-summary { grid-template-columns: 1fr 1fr 1fr; gap: 17px; }
  .operational-summary strong { font-size: 18px; }
  .page-heading { align-items: flex-start; gap: 17px; flex-wrap: wrap; }
  .page-filters { width: auto; max-width: 100%; justify-content: flex-start; }
  .page-filters .select { max-width: 330px; }
  .attention-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .attention-task { padding: 10px; }
  .task-copy strong { font-size: 12px; }
  .task-copy small { display: none; }
  .task-count { font-size: 17px; }
  .analytics { grid-template-columns: 1fr 1fr; }
  #toast { left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); max-width: calc(100vw - 34px); font-size: 12px; }
}
@media (max-width: 650px) {
  h1 { font-size: 27px; letter-spacing: -.6px; }
  h2 { font-size: 16px; }
  .subtitle { font-size: 12px; }
  .eyebrow { font-size: 9px; }
  .topbar { padding: 0 15px; gap: 10px; height: 64px; }
  .global-search-trigger { flex: 0 0 38px; border-color: transparent; padding: 9px; background: transparent; margin-left: auto; }
  .global-search-trigger > span, .global-search-trigger > kbd { display: none; }
  .breadcrumb > strong { display: block; max-width: 135px; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions > .btn { padding: 8px 10px; font-size: 10px; gap: 5px; }
  .topbar-actions > .btn svg { width: 14px; }
  .content { padding: 23px 15px 96px; }
  .page-heading { margin-bottom: 20px; gap: 16px; }
  .controls { width: auto; }
  .page-filters { width: 100%; display: grid; grid-template-columns: 1fr; }
  .page-filters:has(#period-filter) { grid-template-columns: 1fr 1fr; }
  .page-filters .select { min-width: 0; max-width: none; width: 100%; font-size: 12px; }
  .control-field > span { font-size: 11px; }
  .btn { min-height: 43px; padding: 10px 13px; font-size: 12px; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, .select, textarea { font-size: 16px; }
  .overview-period { padding: 16px; margin-bottom: 16px; gap: 15px; }
  .overview-period form { gap: 12px; }
  .date-fields { width: 100%; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
  .date-fields > span { display: none; }
  .overview-period input[type=date] { width: 100%; min-width: 0; padding: 9px 6px; font-size: 12px; }
  .date-fields .btn { min-height: 42px; padding: 9px 10px; font-size: 11px; }
  .period-presets { width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; }
  .period-presets .btn { font-size: 10px; min-height: 36px; padding: 6px 3px; white-space: normal; line-height: 1.4; }
  .getting-started { flex-wrap: wrap; padding: 17px; gap: 12px; margin-bottom: 18px; }
  .getting-started-icon { width: 38px; height: 38px; }
  .getting-started h2 { font-size: 14px; }
  .getting-started p { font-size: 11px; }
  .getting-started > .btn { width: 100%; }
  .kpis { gap: 10px; margin-bottom: 16px; }
  .kpi { padding: 16px 13px; min-height: 135px; border-radius: 11px; }
  .kpi-label { font-size: 10px; min-height: 29px; align-items: flex-start; margin-bottom: 11px; gap: 7px; }
  .kpi-label svg { width: 15px; height: 15px; }
  .kpi-value { font-size: 22px; font-size: clamp(17px,12cqi,27px); letter-spacing: -.6px; }
  .kpi-value .currency { font-size: 12px; margin-left: 3px; }
  .kpi-foot { font-size: 10px; margin-top: 11px; }
  .cash-scope-note { font-size: 11px; margin-bottom: 18px; }
  .operational-summary { grid-template-columns: 1fr 1fr; gap: 15px 12px; margin: 0 0 20px; }
  .operational-summary > div { padding-left: 11px; }
  .operational-summary > div:last-child { grid-column: 1/-1; }
  .operational-summary strong { font-size: 18px; }
  .operational-summary .small { font-size: 10px; }
  .operational-summary small { font-size: 10px; }
  .attention-panel .panel-head { padding: 17px 17px 0; }
  .attention-panel .panel-head .subtitle { font-size: 10px; }
  .attention-grid { grid-template-columns: 1fr; padding: 7px 8px 11px; }
  .attention-task { gap: 11px; padding: 11px; }
  .task-copy strong { font-size: 12px; }
  .task-copy small { display: block; font-size: 10px; }
  .task-count { font-size: 18px; }
  .contract-metrics-heading { align-items: flex-start; flex-direction: column; gap: 3px; margin-bottom: 11px; }
  .contract-metrics-heading h2 { font-size: 14px; }
  .contract-kpis .kpi { min-height: 106px; padding: 14px 12px; }
  .contract-kpis .kpi-label { font-size: 10px; min-height: 0; }
  .contract-kpis .kpi-value { font-size: 23px; }
  .contract-kpis .kpi-foot { font-size: 9px; }
  .additional-expenses, .contract-budget { padding: 17px; }
  .cards-overview-toggle, .budget-toggle { font-size: 15px; }
  .cards-overview-actions { flex-wrap: wrap; gap: 14px; }
  .cards-overview-total strong { font-size: 21px; }
  .cards-overview-total span { font-size: 10px; }
  .additional-expense-kpis .kpi { padding: 15px 12px; min-height: 140px; }
  .additional-expense-kpis .kpi-label { font-size: 12px; min-height: 0; }
  .additional-expense-kpis .kpi-value { font-size: 21px; font-size: clamp(17px,12cqi,26px); margin-top: 13px; }
  .additional-expense-subtitle { font-size: 10px; }
  .additional-expense-kpis .kpi-foot { flex-wrap: wrap; gap: 4px; }
  .additional-expense-kpis .kpi-foot .link-button { font-size: 10px; }
  .analytics { grid-template-columns: 1fr; }
  .next-payment-list > button { grid-template-columns: 90px minmax(0,1fr) 14px; padding: 15px 17px; gap: 10px; }
  .next-payment-list .amount { grid-column: 2; grid-row: 2; font-size: 14px; }
  .next-payment-list > button > svg { grid-column: 3; grid-row: 1/3; }
  .next-payment-name strong { font-size: 11px; }
  .next-payment-date { font-size: 11px; }
  .next-payment-list small { font-size: 10px; }
  .next-payments .panel-head { align-items: flex-start; }
  .next-payments .panel-head .btn { padding: 6px 5px; font-size: 10px; min-height: 30px; }
  .panel-head { padding: 18px 17px 0; }
  .panel-head .subtitle { font-size: 11px; }
  .panel-body { padding: 18px 17px; }
  .table { font-size: 12px; }
  .table thead th { padding: 12px 14px; font-size: 10px; }
  .table tbody td { padding: 13px 14px; }
  .table-bottom { padding: 13px 16px; font-size: 10px; }
  .table .name { min-width: 170px; }
  .bank-filter-panel { padding: 15px; }
  .bank-main-filters { gap: 11px; display: grid; grid-template-columns: 1fr auto; }
  .bank-main-filters .bank-search { grid-column: 1/-1; min-width: 0; width: 100%; }
  .bank-main-filters .control-field { min-width: 0; }
  .bank-main-filters > .btn.primary { grid-column: 1/-1; width: 100%; }
  .bank-main-filters .control-field .select { font-size: 12px; }
  .bank-advanced-filters { grid-template-columns: 1fr; gap: 13px; }
  .bank-advanced-filters .select { font-size: 13px; }
  .filter-chip { font-size: 10px; }
  .filter-chips > .link-button { font-size: 11px; }
  .bank-toolbar { gap: 12px; }
  .bank-tabs { width: 100%; display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; padding: 4px; }
  .bank-tabs button { padding: 8px 5px; font-size: 10px; justify-content: center; gap: 4px; min-height: 39px; }
  .bank-tabs button > span { font-size: 9px; padding: 0 4px; }
  .sort-control { width: 100%; }
  .sort-control .select { width: 100%; max-width: none; font-size: 12px; }
  .bank-list-head { padding: 16px; align-items: flex-start; }
  .bank-list-head .subtitle { font-size: 10px; }
  .bank-list-head .btn { font-size: 10px; min-height: 37px; padding: 8px 10px; }
  .bank-contract-summary { padding: 12px 16px; font-size: 10px; }
  .bank-contract-summary .link-button { font-size: 10px; }
  .bank-register > .table-wrap { max-height: none; }
  .bank-table { display: block; }
  .bank-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .bank-table tbody { display: block; }
  .bank-table .bank-operation-row { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: 'party amount' 'date type' 'project stage' 'action action'; gap: 9px 13px; padding: 18px 16px 15px; border-bottom: 1px solid var(--line); }
  .bank-table .bank-operation-row > td { display: block; border: 0; padding: 0; min-width: 0; max-width: none; position: static; box-shadow: none; background: transparent; }
  .bank-table .bank-operation-row > td:nth-child(1) { grid-area: date; font-size: 10px; }
  .bank-table .bank-operation-row > td:nth-child(2) { grid-area: party; }
  .bank-table .bank-operation-row > td:nth-child(3) { grid-area: project; }
  .bank-table .bank-operation-row > td:nth-child(4) { grid-area: type; text-align: right; }
  .bank-table .bank-operation-row > td:nth-child(5) { grid-area: amount; font-size: 15px; }
  .bank-table .bank-operation-row > td:nth-child(6) { grid-area: stage; text-align: right; }
  .bank-table .bank-operation-row > td:nth-child(7) { grid-area: action; text-align: right; }
  .bank-table .bank-operation-row > td .small { font-size: 10px; }
  .bank-table .bank-operation-row .name strong { font-size: 12px; }
  .bank-table .bank-operation-row .pill { font-size: 9px; }
  .bank-table .bank-operation-row .row-action { min-height: 34px; padding: 6px 10px; font-size: 11px; }
  .bank-purpose { max-width: none; -webkit-line-clamp: 3; font-size: 10px !important; }
  .pagination { justify-content: space-between; }
  .pagination .btn { min-height: 39px; font-size: 11px; }
  .queue-toolbar { padding: 15px 16px; display: grid; grid-template-columns: 1fr; gap: 11px; }
  .queue-toolbar .search { max-width: none; width: 100%; }
  .queue-toolbar .btn { width: 100%; }
  .queue-selection-label { font-size: 11px; }
  .unassigned-payments-total strong { font-size: 19px; }
  .unassigned-payments-head { gap: 12px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { border-radius: 17px 17px 0 0; max-height: 95dvh; width: 100%; max-width: 100%; }
  .modal-header { padding: 19px 18px 15px; }
  .modal-header h2 { font-size: 20px; }
  .modal-header p { font-size: 11px; }
  .modal-body { padding: 19px 18px; }
  .modal-footer { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  .modal-footer > .btn { flex: 1; min-height: 44px; white-space: normal; line-height: 1.4; }
  .modal-unsaved { padding: 9px 18px; font-size: 10px; }
  .operation-secondary { flex-basis: 100%; margin-bottom: 3px; }
  .operation-secondary .btn { min-height: 35px; padding: 6px 8px; }
  .operation-amount { font-size: 30px; }
  .operation-summary h3 { font-size: 15px; }
  .operation-summary p { font-size: 12px; }
  .operation-assignment > h3 { font-size: 14px; }
  .field label, label.field { font-size: 12px; }
  .field small { font-size: 11px; }
  .field-grid { grid-template-columns: 1fr; gap: 14px; }
  .allocation-row { grid-template-columns: 1fr 102px 34px; }
  .allocation-row .select { font-size: 11px; }
  .allocation-row input { font-size: 13px !important; }
  .metrics-inline { gap: 20px; }
  .metrics-inline strong { font-size: 19px; }
  .payroll-panel .metrics-inline > div { min-width: 0; flex: 1 1 130px; }
  .payroll-panel .metrics-inline > div:nth-child(4) { flex-basis: 100%; margin-top: 0; }
  .payroll-panel > .panel-head .controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .payroll-panel > .panel-head .controls .btn { font-size: 10px; padding: 8px; white-space: normal; }
  .payroll-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .payroll-filter input[type=date] { width: 100%; min-width: 0; font-size: 12px; }
  .payroll-filter > .btn { font-size: 11px; }
  .settings-panel { padding: 20px 18px; }
  .settings-panel > .btn { margin-bottom: 8px; font-size: 11px; }
  .settings-grid { gap: 18px; }
  .backup-status { padding: 13px; }
  .backup-status strong { font-size: 12px; }
  .source-cards { grid-template-columns: 1fr; }
  .contract-card { padding: 20px 18px; }
  .contract-card-top { flex-wrap: wrap; }
  .contract-card .meta { gap: 17px; }
  .upload-topline { align-items: flex-start; gap: 13px; }
  .upload-topline > .btn { min-height: 34px; font-size: 10px; padding: 6px 9px; }
  .upload-steps { gap: 10px; flex-wrap: wrap; }
  .upload-steps li { gap: 5px; font-size: 10px; }
  .upload-steps b { width: 21px; height: 21px; font-size: 9px; }
  .upload-intents { grid-template-columns: 1fr; gap: 11px; margin-bottom: 18px; }
  .upload-intents > button { padding: 16px; gap: 12px; }
  .upload-intents strong { font-size: 13px; }
  .upload-intents small { font-size: 11px; }
  .upload-document-head { padding: 20px 18px 0; }
  .upload-document-head h2 { font-size: 16px; }
  .upload-document-head p { font-size: 11px; }
  .upload-drop-wrap { padding: 19px 18px 17px; }
  .dropzone { padding: 27px 13px; }
  .dropzone > strong { font-size: 16px; }
  .dropzone > span { font-size: 11px; }
  .upload-reassurance { margin: 0 18px 20px; font-size: 11px; }
  .chat-assistance > summary { padding: 17px 18px; font-size: 12px; }
  .chat-assistance > summary .small { display: none; }
  .messages { padding: 18px; }
  .message-content { font-size: 12px; }
  .upload-aside { grid-template-columns: 1fr; }
  .aside-panel { padding: 20px 18px; }
  .admin-login-panel { margin: 15px auto 30px; }
  .admin-login-panel .panel-body { padding: 26px 23px; }
  .admin-login-panel h2 { font-size: 22px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-grid > button { padding: 17px; }
  .command-dialog .modal-body { padding-bottom: 28px; }
  .command-results { max-height: 50dvh; }
  .command-results .amount { font-size: 11px; }
  .command-hint { display: none; }
  .similar-controls { gap: 12px; }
  .similar-controls .field { min-width: 0; width: 100%; }
  .similar-controls .select { font-size: 12px; }
  .quote-building-grid { grid-template-columns: 1fr; }
  .quote-toolbar .controls { width: 100%; }
  .quote-toolbar .controls .btn { flex: 1; font-size: 11px; }
  .quote-stage-totals { gap: 18px 12px; }
  .quote-kpis .kpi-value { font-size: 22px; }
  .quote-extra-row { grid-template-columns: 1fr; }
  .quote-extra-row .field:nth-child(4) { grid-column: auto; }
  .year-report .table { min-width: 1100px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  button.kpi:hover { transform: none; }
}

.page-size-control { display: flex; gap: 8px; align-items: center; font-size: 11px; color: #607454; }
.page-size-control .select { width: 70px; min-height: 34px; height: 34px; padding: 5px 8px; font-size: 12px; }
@media(max-width:650px){.page-size-control { font-size: 10px; }.page-size-control .select { min-height: 38px; height: 38px; }}

/* Dense data stays legible on both light and dark surfaces. */
.sidebar .nav-label, .sidebar .workspace small, .sidebar .sidebar-local { color: #a9c1af; }
.discipline-card .discipline-subtitle, .fee-note, .budget-footnote, .budget-heading .subtitle, .normative-budget-note { font-size: 12px; line-height: 1.75; color: #607454; }
.discipline-card .discipline-name { font-size: 13px; }
.norm-components { font-size: 12px; }
.budget-price > span { font-size: 11px; color: #607454; }
.budget-heading { flex-wrap: wrap; }
.budget-heading .controls { max-width: 100%; }
.sidebar-close { display: none; }
.period-presets [data-action=toggle-custom-period] { display: none; }
.bank-advanced-filters .mobile-contract-filter { display: none; }
@media(max-width:900px) {
  .sidebar-close { display: grid; position: absolute; right: 16px; top: 29px; background: #ffffff10; border-color: #ffffff20; color: #d7e7ce; width: 34px; height: 34px; }
  .sidebar .brand { max-width: 210px; }
}
@media(max-width:650px) {
  .overview-period .date-fields { display: none; grid-template-columns: 1fr 1fr; }
  .overview-period.custom-period-open .date-fields { display: grid; }
  .date-fields > .btn { grid-column: 1/-1; }
  .period-presets [data-action=toggle-custom-period] { display: inline-flex; }
  .period-presets [data-preset=last_month] { display: none; }
  body[data-view=bank] .page-heading .page-filters { display: none; }
  .bank-advanced-filters .mobile-contract-filter { display: flex; }
  .bank-main-filters > .btn.primary { display: none; }
  .overview-period .period-description .subtitle { font-size: 11px; }
  .discipline-card .discipline-subtitle, .fee-note, .budget-footnote { font-size: 11px; }
  .normative-budget-note { font-size: 11px; }
}
.cash-data-scope { font-size: 11px; font-weight: 550; color: #607454; margin: 0 2px 10px; }
.page-draft-bar { border: 1px solid #e7d3a8; background: #fff7e8; color: #7b592d; border-radius: 9px; padding: 12px 15px; font-size: 12px; line-height: 1.7; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-draft-bar .btn { color: #7b592d; font-size: 11px; padding: 6px 8px; min-height: 32px; }
@media(max-width:650px){.page-draft-bar { flex-wrap: wrap; font-size: 11px; gap: 8px; }}
.save-status-alert { border: 1px solid #efcbb5; background: #fff3e9; color: #943f26; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 17px; border-radius: 10px; margin-bottom: 22px; font-size: 12px; line-height: 1.65; }
.save-status-alert > span { display: flex; align-items: center; gap: 10px; }
.save-status-alert .btn { flex-shrink: 0; }
@media(max-width:650px){.save-status-alert { flex-wrap: wrap; padding: 13px; font-size: 11px; }.save-status-alert .btn { width: 100%; }}
/* Consistent disclosure affordance, including touch and keyboard focus. */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary:after { content: ''; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); vertical-align: 3px; margin-left: 13px; margin-right: 3px; flex: 0 0 6px; }
details[open] > summary:after { transform: rotate(225deg); vertical-align: -1px; }
@media(max-width:360px){.cash-kpis { grid-template-columns:1fr; }.cash-kpis .kpi-value { font-size:28px; }.cash-kpis .kpi-label { font-size:12px;min-height:0; }}
.cards-locked .subtitle { max-width: 650px; margin-top: 7px; }
.cards-admin-session { display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;font-size:12px;color:#607454; }
.cards-admin-session > span { display:flex;align-items:center;gap:8px; }
@media(max-width:650px){.cards-admin-session { flex-wrap:wrap; }.cards-admin-session .btn { font-size:11px; }}

/* Application access and the expense workspace. */
.program-login{min-height:100dvh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(ellipse at top left,#eaf2df,transparent 60%),#f4f6f3}
.program-login-card{width:min(100%,430px);padding:40px;background:#fff;border:1px solid #e4e9e2;border-radius:20px;box-shadow:0 24px 70px #17382a0d}
.program-login-brand{display:flex;align-items:center;gap:14px;margin-bottom:40px;color:#1e4433}
.program-login-brand .brand-wordmark{font-size:38px;font-weight:800;line-height:1}
.program-login-brand .brand-symbol{color:#b8df70}
.program-login h1{font-size:28px;line-height:1.2;margin:10px 0 12px;letter-spacing:-.8px}
.program-login p{color:#718077;font-size:14px;line-height:1.6}
.program-login form{margin-top:28px;display:grid;gap:20px}
.program-login .field{margin:0;gap:8px}.program-login input{width:100%;height:46px}.program-login .password-control{display:flex;width:100%}
.program-login [type=submit]{width:100%;justify-content:center;height:46px}.program-login .program-login-note{font-size:12px;margin:24px 0 0}
.expense-navigation{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:26px;padding:7px;background:#eaf0e6;border:1px solid #e0e8db;border-radius:13px;width:fit-content;max-width:100%}
.expense-navigation button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:11px 18px;color:#617365;border:0;background:transparent;border-radius:9px;font:inherit;font-size:13px;cursor:pointer}
.expense-navigation button.active{background:#fff;box-shadow:0 1px 5px #193a2610;color:#224b37;font-weight:600}
.sidebar-logout{color:#cee5bf!important}.program-logout{white-space:nowrap}.unassigned-payments.section-gap{margin-top:0}
@media(max-width:640px){.program-login-card{padding:28px 24px}.program-login-brand{margin-bottom:30px}.expense-navigation{display:grid;width:100%;grid-template-columns:1fr}.expense-navigation button{justify-content:flex-start}.topbar-actions .program-logout{display:inline-flex!important;padding:8px 10px;font-size:12px}.sidebar-bottom{padding-bottom:24px}}

/* Read a contract appendix without asking for bank columns. */
.import-recognized{display:flex;align-items:center;gap:9px;color:#2f6846;font-size:13px;background:#f0f6e9;padding:11px 14px;border-radius:9px;margin-bottom:18px}
.import-contract-identity strong{font-size:19px;line-height:1.4}.import-contract-identity p{color:#6c7b70;font-size:13px;line-height:1.6;margin:8px 0 20px}
.annex-import-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 24px}
.annex-import-summary>div{padding:15px;border:1px solid #e4eadf;background:#fafbf8;border-radius:10px;min-width:0}
.annex-import-summary span{display:block;font-size:11px;color:#74816e;margin-bottom:8px}.annex-import-summary strong{font-size:18px;line-height:1.4;overflow-wrap:anywhere}
.import-details{margin:15px 0;border:1px solid #e4e9e0;border-radius:10px;padding:14px 16px}.import-details summary{cursor:pointer;font-weight:600;color:#34533c;min-height:24px}.import-details[open] summary{margin-bottom:20px}.import-details .field-grid{margin-top:10px}.import-stage-details .table-wrap{max-height:50vh;overflow:auto;margin-top:14px}
.import-confirm-note{font-size:13px;line-height:1.6;color:#75806f;margin-top:22px}
@media(max-width:700px){.annex-import-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.annex-import-summary strong{font-size:16px}.annex-import-summary>div{padding:12px}.import-details{padding:12px}}

/* Keep unfinished contract uploads visible and resumable. */
.contract-draft-list{margin:0 0 26px}.contract-draft-list>.panel-head{padding:8px 0 16px;align-items:flex-start}.contract-draft-list h2{font-size:18px}.contract-draft-list .subtitle{font-size:12px;line-height:1.6;margin-top:7px;max-width:760px}
.contract-draft-card{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:21px 24px;margin-bottom:12px;background:#fffdf6;border-color:#eee4c8}.contract-draft-card h3{font-size:18px;margin:12px 0 7px}.contract-draft-card p{font-size:13px;line-height:1.6;margin-bottom:6px;color:#68776c}.contract-draft-card .small{overflow-wrap:anywhere}.contract-draft-card strong{display:block;font-size:14px;margin-top:10px;font-weight:600}.contract-draft-card>.btn{flex-shrink:0}
.contract-saved-notice{display:flex;align-items:center;gap:12px;padding:17px 20px;border:1px solid #d5e7c7;background:#eef7e6;border-radius:11px;color:#28513a;margin-bottom:20px;font-weight:600}
.upload-problem{padding:20px 24px;margin-bottom:22px;background:#fff4eb;border-color:#edd8c9}.upload-problem h2{font-size:17px;margin-bottom:8px}.upload-problem p,.upload-error-message{white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.7;color:#8c4730}
@media(max-width:700px){.contract-draft-card{align-items:stretch;flex-direction:column;padding:19px;gap:16px}.contract-draft-card>.btn{justify-content:center;width:100%}.contract-draft-list h2{font-size:16px}.contract-saved-notice{align-items:flex-start;font-size:13px}}
