:root {
  color-scheme: light;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --card-min: min(100%, 180px);
  --panel-min: min(100%, 360px);
  --field-min: min(100%, 170px);
  --sidebar-width: 240px;
  --sidebar-rail-width: 64px;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f5;
  --text: #182025;
  --muted: #63717b;
  --line: #dbe3e7;
  --teal: #157c72;
  --teal-soft: #dff1ed;
  --blue: #2c6ebd;
  --blue-soft: #e3eefb;
  --amber: #a86613;
  --amber-soft: #f7ead8;
  --red: #b84b4b;
  --red-soft: #f6e2e0;
  --shadow: 0 12px 30px rgba(24, 32, 37, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

html {
  width: 100%;
}

body {
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

input,
button,
select,
textarea {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(.app-shell, .sidebar, .workspace, .topbar, .toolbar, .title-block, .panel, .pl-panel, .metric-card, .direction-section, .direction-head, .summary-main, .summary-meta, .payment-column, .cash-plan-tabs, .cash-plan-tablist, .cash-plan-tab-panel, .cash-plan-loading, .general-settlement-panel, .general-settlement-head, .planned-summary-board, .planned-summary-head, .planned-summary-visual, .cash-bridge-panel, .planned-flow-lanes, .cash-control-section, .cash-control-card, .quality-control-grid, .quality-control-panel, .quality-control-row, .control-document-panel, .closed-period-head, .closed-period-metrics, .loan-counterparty-row, .outflow-breakdown-item, .outflow-budget-list, .outflow-budget-row, .outflow-nested-list, .model-card, .model-card-head, .project-detail, .table-wrap, .cfo-dashboard, .cfo-kpi-card, .cfo-center-card, .cfo-panel, .cfo-article-group, .cfo-article-row) {
  min-width: 0;
}

:where(.metric-card > span, .summary-copy h2, .summary-number strong, .direction-head h2, .direction-metrics strong, .article-values strong, .payment-column-head > span, .counterparty-row strong, .bar-value, .summary-insight small, .variance-item b, .driver-item strong, .business-line b, .expense-row b, .waterfall-row strong, .model-main-value strong, .model-metrics b, .model-specials b, .comparison-pill strong, .model-detail-row strong, .admin-row strong, .admin-summary > strong, .tree-row strong, .tree-row span:not(.tree-name), .tree-row b, .tree-child strong, .tree-child span:not(.tree-name), .tree-child b, .project-summary-line strong, .project-detail summary strong, .project-detail-grid b, .account-balance-stats strong, .account-currency-strip strong, .account-row b, .general-settlement-result strong, .general-settlement-row strong, .planned-summary-result strong, .cash-bridge-meta small, .cash-bridge-net strong, .cash-bridge-delta strong, .planned-flow-head strong, .planned-flow-head b, .planned-flow-values strong, .planned-flow-segment-head strong, .planned-flow-segment-head b, .planned-flow-segment-values strong, .planned-summary-footnote strong, .cash-control-card strong, .cash-control-metrics b, .quality-control-metrics b, .quality-control-amount, .control-article-row b, .control-document-row b, .summary-modal-metrics strong, .summary-modal-row-main strong, .summary-modal-row-values b, .summary-modal-payments b, .loan-counterparty-main b, .loan-counterparty-metrics strong, .outflow-breakdown-numbers b, .outflow-breakdown-status, .outflow-budget-head b, .outflow-budget-amount b, .outflow-budget-status, .outflow-budget-more b, .outflow-nested-list header b, .outflow-nested-list p b) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

:where(.metric-card strong, .metric-card > small, .panel-head h2, .panel-head span, .summary-copy p, .summary-insight strong, .driver-item span, .driver-item small, .business-line strong, .business-line span, .business-line small, .expense-meta strong, .expense-meta span, .model-card p, .model-card-head h3, .model-detail-note, .allocation-note, .admin-summary > span, .planned-summary-title p, .planned-summary-result em, .planned-flow-status, .planned-bullet-caption, .planned-summary-footnote, .outflow-budget-main strong, .payment-empty) {
  overflow-wrap: anywhere;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f5f7f8 0%, #e8f1f0 55%, #f6eee4 100%);
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-panel,
.panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 28px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 48%),
    linear-gradient(135deg, var(--teal), var(--blue));
  display: inline-block;
}

.brand-name {
  font-weight: 720;
  letter-spacing: 0;
}

.auth-panel h1 {
  margin: 28px 0 20px;
  font-size: 30px;
  line-height: 1.1;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label,
.month-picker {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.login-form input,
.month-picker input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.login-form input:focus,
.month-picker input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.login-form button,
.secondary-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

.login-form button {
  color: #fff;
  background: var(--teal);
  font-weight: 720;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  font-weight: 650;
}

.form-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 14px;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 100vh;
  padding: 22px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fbfcfc;
  transition: transform 180ms ease, box-shadow 180ms ease, width 180ms ease, padding 180ms ease;
}

.sidebar-hover-zone {
  display: none;
}

.sidebar-mode-toggle {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  cursor: pointer;
}

.sidebar-mode-toggle:hover,
.sidebar-mode-toggle:focus-visible {
  color: var(--text);
  border-color: var(--muted);
  outline: 0;
}

.sidebar-mode-icon {
  position: relative;
  width: 16px;
  height: 14px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.sidebar-mode-icon::before {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 5px;
  width: 2px;
  background: currentColor;
  opacity: 0.55;
}

.sidebar-mode-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 2px;
  width: 5px;
  height: 5px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.sidebar-pinned .sidebar-mode-icon::after {
  right: 5px;
  transform: rotate(225deg);
}

.sidebar-auto-hide .workspace {
  margin-left: var(--sidebar-rail-width);
}

.sidebar-auto-hide .sidebar {
  width: var(--sidebar-width);
  padding-inline: 18px;
  transform: translateX(calc(var(--sidebar-rail-width) - var(--sidebar-width)));
}

.sidebar-auto-hide .sidebar-hover-zone {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 25;
  display: block;
  width: var(--sidebar-rail-width);
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar-hover-zone {
  pointer-events: none;
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar,
.sidebar-auto-hide .sidebar:hover,
.sidebar-auto-hide .sidebar:focus-within {
  transform: translateX(0);
  box-shadow: 18px 0 38px rgba(24, 32, 37, 0.12);
}

.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar {
  transform: translateX(0);
  box-shadow: 18px 0 38px rgba(24, 32, 37, 0.12);
}

.sidebar-auto-hide.sidebar-force-collapsed .sidebar,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar:hover,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar:focus-within {
  width: var(--sidebar-width);
  padding-inline: 18px;
  transform: translateX(calc(var(--sidebar-rail-width) - var(--sidebar-width)));
  box-shadow: none;
}

.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-row {
  gap: 0;
}

.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-row {
  gap: 0;
}

.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-mark,
.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-name,
.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .nav-list {
  width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-mark,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-name,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .nav-list {
  width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar .brand-mark {
  width: 22px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar:not(:hover):not(:focus-within) .brand-mark {
  width: 22px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar .brand-mark {
  width: 22px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar:not(:hover):not(:focus-within) .brand-mark {
  width: 22px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar .brand-name,
.sidebar-auto-hide.sidebar-rail-hovered .sidebar .nav-list {
  width: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar:not(:hover):not(:focus-within) .brand-name,
.sidebar-auto-hide.sidebar-rail-hovered .sidebar:not(:hover):not(:focus-within) .nav-list {
  width: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar .brand-name,
.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar .nav-list {
  width: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar:not(:hover):not(:focus-within) .brand-name,
.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar:not(:hover):not(:focus-within) .nav-list {
  width: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-mark,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-name,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .nav-list {
  width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .brand-mark,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .brand-name,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .nav-list {
  width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .sidebar-mode-toggle {
  margin-left: auto;
}

.sidebar-auto-hide.sidebar-force-collapsed .sidebar .sidebar-mode-toggle {
  margin-left: auto;
}

.sidebar .brand-mark,
.sidebar .brand-name,
.sidebar .nav-list {
  transition: opacity 160ms ease, transform 160ms ease, width 160ms ease;
}

.nav-list {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.nav-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 650;
}

.nav-item.active {
  color: var(--teal);
  background: var(--teal-soft);
}

.nav-item.muted {
  opacity: 0.72;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 24px;
  transition: margin-left 180ms ease;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}

.toolbar > * {
  min-width: 0;
}

.status-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-min), 1fr));
  gap: 12px;
  margin: 8px 0 16px;
}

.metric-card {
  min-height: 128px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.metric-card strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.metric-card > span {
  display: block;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 760;
}

.metric-card > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.metric-card.good {
  border-top: 4px solid var(--teal);
}

.metric-card.watch {
  border-top: 4px solid var(--amber);
}

.metric-card.neutral {
  border-top: 4px solid var(--blue);
}

.metric-grid.compact {
  --card-min: min(100%, 160px);
}

.metric-grid.compact .metric-card {
  min-height: 106px;
}

.metric-grid.compact .metric-card > span {
  font-size: 22px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--panel-min), 1fr));
  gap: 16px;
  align-items: start;
}

.plan-section {
  margin-top: 22px;
  scroll-margin-top: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin: 8px 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.15;
}

.cash-plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.direction-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cash-alert {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(220, 38, 38, 0.24);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: #fff5f5;
  color: var(--text);
}

.cash-alert strong {
  font-size: 15px;
}

.cash-alert span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.cash-control-section {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: none;
}

.cash-control-head {
  display: grid;
  gap: 3px;
}

.cash-control-head span {
  width: max-content;
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--blue);
  background: #f4eff9;
  font-size: 11px;
  font-weight: 760;
}

.cash-control-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.12;
}

.cash-control-head p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.cash-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.quality-control-section {
  border-color: rgba(21, 124, 114, 0.12);
}

.quality-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quality-control-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-left: 2px solid var(--teal);
  border-radius: 8px;
  padding: 9px;
  background: #ffffff;
}

.quality-control-panel.documents {
  border-left-color: var(--amber);
}

.quality-control-panel header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.quality-control-panel header span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quality-control-panel header strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
}

.quality-control-panel header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.quality-control-panel header b {
  min-width: 32px;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  text-align: center;
}

.quality-control-panel.documents header b {
  background: var(--amber-soft);
  color: var(--amber);
}

.quality-control-warning {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(168, 102, 19, 0.18);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  padding: 9px;
  background: #fffaf4;
}

.quality-control-warning strong {
  color: var(--text);
  font-size: 13px;
}

.quality-control-warning span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.quality-control-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.quality-control-metrics em {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-radius: 8px;
  padding: 6px;
  background: #f8fbfb;
  font-style: normal;
}

.quality-control-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.2;
  text-transform: uppercase;
}

.quality-control-metrics b {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.quality-control-list {
  display: grid;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.quality-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 54px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
}

.quality-control-row:last-child {
  border-bottom: 0;
}

.quality-control-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.quality-control-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-control-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-control-amount {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.quality-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.quality-reasons em {
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.2;
}

.quality-control-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.cash-control-card {
  appearance: none;
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-left: 2px solid var(--blue);
  border-radius: 8px;
  padding: 9px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.cash-control-card.good {
  border-left-color: var(--teal);
}

.cash-control-card.watch {
  border-left-color: var(--red);
}

.cash-control-card:hover {
  border-color: rgba(89, 48, 134, 0.28);
  background: #ffffff;
}

.cash-control-card:focus-visible {
  outline: 3px solid rgba(89, 48, 134, 0.24);
  outline-offset: 2px;
}

.cash-control-status {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 7px;
  background: #ffffff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 760;
}

.cash-control-card.good .cash-control-status {
  color: var(--teal);
  background: var(--teal-soft);
}

.cash-control-card.watch .cash-control-status {
  color: var(--red);
  background: var(--red-soft);
}

.cash-control-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.18;
}

.cash-control-card strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
}

.cash-control-card > small,
.cash-control-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.cash-control-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.cash-control-metrics em {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  font-style: normal;
}

.cash-control-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.cash-control-metrics b {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.control-modal-body {
  display: grid;
  gap: 14px;
  padding: 14px 18px 18px;
}

.control-difference {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 12px;
  background: #fff5f5;
}

.control-difference strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 15px;
}

.control-difference span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.control-article-summary {
  display: grid;
  gap: 8px;
}

.control-article-summary h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.control-article-list,
.control-document-list {
  display: grid;
  border: 1px solid rgba(89, 48, 134, 0.11);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.control-document-list.compact {
  border-color: rgba(220, 38, 38, 0.14);
}

.control-article-row,
.control-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
}

.control-article-row:last-child,
.control-document-row:last-child {
  border-bottom: 0;
}

.control-article-row span,
.control-document-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.control-article-row strong,
.control-document-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-article-row small,
.control-document-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-article-row b,
.control-document-row b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.control-document-row.inflow b {
  color: var(--teal);
}

.control-document-row.outflow b {
  color: var(--red);
}

.control-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.control-document-panel {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  background: #ffffff;
}

.control-document-panel header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  background: #fbf8ff;
}

.control-document-panel header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.control-document-panel header strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.direction-section.inflow {
  border-top: 4px solid var(--teal);
}

.direction-section.outflow {
  border-top: 4px solid var(--amber);
}

.direction-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.direction-head h2 {
  margin: 8px 0 0;
  font-size: 25px;
  line-height: 1.05;
}

.direction-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  gap: 10px;
  min-width: min(760px, 66%);
}

.direction-metrics span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-align: right;
}

.direction-metrics strong {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.direction-metrics .overrun strong,
.article-values .overrun strong {
  color: var(--red);
}

.direction-metrics .neutral strong,
.article-values .neutral strong {
  color: var(--blue);
}

.article-list {
  display: grid;
}

.article-group {
  border-bottom: 1px solid var(--line);
}

.article-group:last-child {
  border-bottom: 0;
}

.article-group.attention summary {
  background: #fff5f5;
}

.article-group summary {
  min-height: 88px;
  display: grid;
  grid-template-columns: 18px minmax(150px, 0.75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.article-group summary::-webkit-details-marker {
  display: none;
}

.article-group summary::before {
  content: "›";
  width: 18px;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.article-group[open] summary::before {
  transform: rotate(90deg);
}

.summary-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.article-title {
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-attention {
  display: block;
  margin-top: 4px;
  color: var(--red);
  font-size: 12px;
  font-weight: 760;
}

.article-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.summary-meta {
  min-width: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.article-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 104px), 1fr));
  gap: 8px;
}

.article-values span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.article-values small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.article-values strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.plan-scale {
  display: grid;
  gap: 5px;
}

.scale-track {
  position: relative;
  display: flex;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-soft);
}

.scale-part {
  height: 100%;
  min-width: 0;
}

.scale-part.fact.inflow {
  background: var(--teal);
}

.scale-part.fact.outflow {
  background: var(--amber);
}

.scale-part.remaining {
  background: #ced8dd;
}

.scale-part.overrun {
  background: var(--red);
}

.scale-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 999px;
  background: var(--blue);
}

.scale-legend {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.payment-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: #fcfdfd;
}

.payment-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.payment-column-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfb;
}

.payment-column-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.payment-column-head strong {
  font-size: 14px;
}

.payment-column-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.payment-column-head > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.counterparty-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
}

.counterparty-row {
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(min(42%, 116px), auto);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.counterparty-row:last-child {
  border-bottom: 0;
}

.counterparty-name {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.counterparty-name small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.counterparty-row strong {
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.amount-planned {
  color: var(--blue);
  font-weight: 720;
}

.payment-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head > div {
  min-width: 0;
}

.panel-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-align: right;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(80px, 1fr) minmax(88px, 130px);
  gap: 10px;
  align-items: center;
  min-height: 30px;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--teal);
}

.bar-fill.negative {
  background: var(--red);
}

.bar-value {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.title-block {
  min-width: 0;
  max-width: 760px;
}

.topbar-subtitle {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.segmented-control {
  display: inline-flex;
  min-height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3f4;
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 7px rgba(24, 32, 37, 0.1);
}

.pl-executive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 14px;
  margin: 8px 0 16px;
}

.summary-hero,
.summary-side,
.summary-insight,
.pl-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 20px;
  padding: 20px;
  border-left: 4px solid var(--teal);
}

.summary-hero.watch {
  border-left-color: var(--red);
}

.summary-status {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 760;
}

.summary-hero.watch .summary-status {
  background: var(--red-soft);
  color: var(--red);
}

.summary-copy h2 {
  margin: 14px 0 8px;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: 0;
}

.summary-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}

.summary-number {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.summary-number span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.summary-number strong {
  font-size: 22px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.summary-number small {
  font-size: 12px;
  line-height: 1.35;
}

.inline-impact.good,
.summary-number small.good,
.summary-insight.good strong,
.variance-item.good b,
.driver-item.good strong,
.business-line.good b,
.project-detail.good summary strong,
.expense-row b.good,
.tree-row b.good,
.tree-child b.good {
  color: var(--teal);
}

.inline-impact.watch,
.summary-number small.watch,
.summary-insight.watch strong,
.variance-item.watch b,
.driver-item.watch strong,
.business-line.watch b,
.project-detail.watch summary strong,
.expense-row b.watch,
.tree-row b.watch,
.tree-child b.watch {
  color: var(--red);
}

.inline-impact.neutral,
.summary-number small.neutral,
.expense-row b.neutral,
.tree-row b.neutral,
.tree-child b.neutral {
  color: var(--blue);
}

.summary-insight.good,
.driver-item.good,
.business-line.good,
.project-detail.good {
  border-left: 3px solid var(--teal);
}

.summary-insight.watch,
.driver-item.watch,
.business-line.watch,
.project-detail.watch {
  border-left: 3px solid var(--red);
}

.summary-side {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.summary-insight {
  display: grid;
  gap: 8px;
  padding: 14px;
  box-shadow: none;
}

.summary-insight span,
.summary-insight small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.summary-insight strong {
  font-size: 15px;
  line-height: 1.25;
}

.pl-highlights {
  --card-min: min(100%, 160px);
}

.metric-comparisons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.metric-chip em {
  font-style: normal;
  color: var(--muted);
}

.metric-chip b {
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.metric-chip.good {
  background: var(--teal-soft);
  color: var(--teal);
}

.metric-chip.watch {
  background: var(--red-soft);
  color: var(--red);
}

.metric-chip.neutral {
  background: var(--blue-soft);
  color: var(--blue);
}

.pl-analysis-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-12 {
  grid-column: span 12;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.variance-grid,
.driver-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.variance-column,
.driver-column {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.variance-column h3,
.driver-column h3 {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.variance-item,
.driver-item,
.business-line,
.expense-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.variance-item {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.variance-item div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.variance-item strong,
.driver-item span,
.business-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variance-item span,
.driver-item small,
.business-line span,
.business-line small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.variance-item b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.driver-item,
.business-line {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.driver-item strong,
.business-line b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.expense-list {
  display: grid;
  gap: 9px;
}

.expense-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, 0.7fr) minmax(72px, auto);
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.expense-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.expense-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-meta span {
  color: var(--muted);
  font-size: 12px;
}

.expense-scale {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.expense-scale span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
}

.expense-row b {
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.trend-chart {
  display: grid;
  gap: 14px;
}

.trend-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.trend-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 999px;
  background: currentColor;
}

.trend-legend .revenue {
  color: var(--teal);
}

.trend-legend .cost {
  color: var(--amber);
}

.trend-legend .profit {
  color: var(--blue);
}

.trend-bars {
  min-height: 240px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.trend-month {
  display: grid;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.trend-stack {
  height: 188px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
}

.trend-stack span {
  min-height: 3px;
  border-radius: 6px 6px 0 0;
}

.trend-stack .revenue {
  background: var(--teal);
}

.trend-stack .cost {
  background: var(--amber);
}

.trend-stack .profit {
  background: var(--blue);
}

.trend-month strong,
.trend-month small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-month strong {
  font-size: 12px;
}

.trend-month small {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.waterfall-chart {
  display: grid;
  gap: 9px;
}

.waterfall-row {
  display: grid;
  grid-template-columns: minmax(112px, 155px) minmax(130px, 1fr) minmax(80px, auto);
  align-items: center;
  gap: 10px;
  min-height: 31px;
  font-size: 13px;
}

.waterfall-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waterfall-row strong {
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.waterfall-track {
  height: 13px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.waterfall-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--teal);
}

.waterfall-row.negative .waterfall-track i {
  background: var(--amber);
}

.waterfall-row.total .waterfall-track i {
  background: var(--blue);
}

.business-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}

.business-line {
  min-height: 118px;
  align-content: space-between;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.model-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  border-top: 4px solid var(--teal);
}

.model-card.watch {
  border-top-color: var(--red);
}

.model-card.neutral,
.model-card.reinvestment {
  border-top-color: var(--blue);
}

.model-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.model-card-head div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.model-card-head span,
.model-main-value span,
.model-metrics small,
.model-specials small,
.comparison-pill em,
.comparison-pill small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  text-transform: uppercase;
}

.model-card-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.model-card-head b {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.model-card p {
  margin: 0;
  min-height: 38px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.model-main-value {
  display: grid;
  gap: 4px;
}

.model-main-value strong {
  font-size: 27px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.model-metrics,
.model-specials,
.model-comparison-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr));
  gap: 8px;
}

.model-specials {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
}

.model-metrics span,
.model-specials span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.model-metrics b,
.model-specials b {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.comparison-pill {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.comparison-pill strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.comparison-pill.good strong {
  color: var(--teal);
}

.comparison-pill.watch strong {
  color: var(--red);
}

.comparison-pill.neutral strong {
  color: var(--blue);
}

.model-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.model-details summary {
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.model-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.model-detail-columns h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.model-detail-row,
.admin-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.model-detail-row:last-child,
.admin-row:last-child {
  border-bottom: 0;
}

.model-detail-row span,
.admin-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 650;
}

.model-detail-row strong,
.admin-row strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.model-detail-note {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.allocation-note {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #27537d;
  font-size: 12px;
  line-height: 1.4;
}

.admin-block {
  display: grid;
  gap: 10px;
}

.admin-summary {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.admin-summary > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.admin-summary > strong {
  font-size: 25px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.admin-list {
  display: grid;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.management-table-wrap {
  max-height: 720px;
}

.management-table td,
.management-table th {
  white-space: nowrap;
}

.management-table td:first-child,
.management-table th:first-child {
  min-width: 240px;
  white-space: normal;
}

.table-article {
  display: block;
  font-weight: 720;
}

.management-table small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.management-table .total-row td {
  background: #fbfcfc;
  font-weight: 760;
}

.pl-tree {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.tree-head,
.tree-row summary,
.tree-row.leaf > div,
.tree-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto) minmax(90px, auto) minmax(90px, auto);
  align-items: center;
  gap: 12px;
}

.tree-head {
  min-height: 38px;
  padding: 0 12px;
  background: #f9fbfb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.tree-row {
  border-top: 1px solid var(--line);
}

.tree-row summary,
.tree-row.leaf > div {
  min-height: 48px;
  padding: 10px 12px;
  list-style: none;
  cursor: pointer;
}

.tree-row summary::-webkit-details-marker {
  display: none;
}

.tree-row.leaf > div {
  cursor: default;
}

.tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 720;
}

.tree-row strong,
.tree-row span:not(.tree-name),
.tree-row b,
.tree-child strong,
.tree-child span:not(.tree-name),
.tree-child b {
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.tree-children {
  display: grid;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  border-top: 1px solid var(--line);
  background: #fcfdfd;
}

.tree-child {
  min-height: 42px;
  padding: 8px 12px 8px 28px;
  border-bottom: 1px solid var(--line);
}

.tree-child:last-child {
  border-bottom: 0;
}

.project-summary-line {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.project-summary-line strong {
  font-size: 24px;
  line-height: 1;
}

.project-summary-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.project-list {
  display: grid;
  gap: 8px;
  max-height: 636px;
  overflow: auto;
}

.project-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  overflow: hidden;
}

.project-detail summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.project-detail summary::-webkit-details-marker {
  display: none;
}

.project-detail summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 720;
}

.project-detail summary strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.project-detail-grid span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.project-detail-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.project-detail-grid b {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.empty-state.slim {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.large {
  max-height: 640px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbfb;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td:last-child,
th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.badge.inflow {
  color: var(--teal);
  background: var(--teal-soft);
}

.badge.outflow {
  color: var(--amber);
  background: var(--amber-soft);
}

.amount-positive {
  color: var(--teal);
  font-weight: 720;
}

.amount-negative {
  color: var(--red);
  font-weight: 720;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
}

.cash-plan-body {
  --bg: #fbfafc;
  --surface: #ffffff;
  --surface-soft: #eee8f7;
  --text: #312b38;
  --muted: #746a7f;
  --line: #ded4ea;
  --teal: #2f8a67;
  --teal-soft: #e7f4ee;
  --blue: #593086;
  --blue-soft: #ece4f5;
  --amber: #f4c430;
  --amber-soft: #fff3c9;
  --red: #b94a48;
  --red-soft: #f8e7e5;
  --shadow: 0 8px 22px rgba(49, 43, 56, 0.045);
  background: var(--bg);
}

.cash-plan-body .app-shell {
  background: var(--bg);
}

.cash-plan-body .sidebar {
  border-right: 0;
  background: #312b38;
  color: #ffffff;
}

.cash-plan-body .sidebar-mode-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
}

.cash-plan-body .sidebar-mode-toggle:hover,
.cash-plan-body .sidebar-mode-toggle:focus-visible {
  border-color: rgba(244, 196, 48, 0.48);
  color: #ffffff;
}

.cash-plan-body .brand-mark {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #593086 0%, #7a4ca5 58%, #f4c430 100%);
  box-shadow: 0 0 0 1px rgba(244, 196, 48, 0.2);
}

.cash-plan-body .brand-name {
  color: #ffffff;
}

.cash-plan-body .nav-item {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
}

.cash-plan-body .nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.cash-plan-body .nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.cash-plan-body .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: var(--amber);
}

.cash-plan-body .nav-item.muted {
  color: rgba(255, 255, 255, 0.46);
}

.cash-plan-body .workspace {
  background: transparent;
}

.cash-plan-body .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.cash-plan-body .eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--amber);
}

.cash-plan-body .topbar h1 {
  color: var(--text);
  font-size: 27px;
  letter-spacing: 0;
}

.cash-plan-body .cash-plan-topbar {
  align-items: center;
  margin-bottom: 6px;
}

.cash-plan-body .cash-plan-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.11);
  border-radius: 8px;
  padding: 3px;
  background: #ffffff;
}

.cash-plan-body .compact-month-picker {
  width: 172px;
}

.cash-plan-body .compact-month-picker input {
  width: 100%;
}

.cash-plan-body .topbar-updated {
  min-width: 54px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .topbar-updated:empty::before {
  content: "—";
}

.cash-plan-body .icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.cash-plan-body .icon-button:hover {
  border-color: var(--blue);
  background: #ffffff;
}

.cash-plan-body .icon-button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.cash-plan-body .month-picker {
  color: #65586f;
}

.cash-plan-body .month-picker input {
  min-height: 34px;
  border-color: transparent;
  background: transparent;
}

.cash-plan-body .month-picker input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.cash-plan-body .secondary-button {
  border-color: #d8cbe6;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.cash-plan-body .secondary-button:hover {
  border-color: #c7b5dc;
  background: #ffffff;
}

.cash-plan-body #plannedRefreshButton {
  color: var(--blue);
}

.cash-plan-body #plannedRefreshButton:hover {
  color: #47246c;
}

.cash-plan-body .cash-plan-tabs {
  margin: 0 0 12px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
}

.cash-plan-body .cash-plan-tablist {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  gap: 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cash-plan-body .cash-plan-tab {
  position: relative;
  min-height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  white-space: nowrap;
}

.cash-plan-body .cash-plan-tab:hover {
  color: var(--text);
  background: transparent;
}

.cash-plan-body .cash-plan-tab:focus-visible {
  outline: 3px solid rgba(89, 48, 134, 0.24);
  outline-offset: -2px;
}

.cash-plan-body .cash-plan-tab.active {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.cash-plan-body .cash-plan-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
}

.cash-plan-body .cash-plan-tab-panel {
  display: grid;
  gap: 10px;
}

.cash-plan-body .cash-plan-tab-panel[hidden] {
  display: none;
}

.cash-plan-body .cash-control-sheet {
  margin-top: 8px;
}

.cash-plan-body .cash-control-sheet .cash-control-section {
  min-height: 280px;
}

.cash-plan-body .cash-plan-loading {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(89, 48, 134, 0.14);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(49, 43, 56, 0.05);
}

.cash-plan-body .cash-plan-loading span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.cash-plan-body .cash-plan-loading h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.cash-plan-body .cash-plan-loading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.cash-plan-body .account-balances {
  margin: 0 0 14px;
}

.cash-plan-body .account-balance-panel {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  background: transparent;
  box-shadow: none;
}

.cash-plan-body .account-balance-panel.empty {
  box-shadow: inset 4px 0 0 var(--blue), var(--shadow);
}

.cash-plan-body .account-balance-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(min(100%, 360px), 0.54fr);
  gap: 10px;
  align-items: center;
  padding: 10px 0 13px;
  background: transparent;
}

.cash-plan-body .account-balance-kicker,
.cash-plan-body .account-balance-chip {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border-radius: 999px;
  padding: 0 8px;
  color: #247151;
  background: rgba(42, 133, 101, 0.09);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
}

.cash-plan-body .account-balance-chip {
  justify-self: end;
  color: var(--blue);
  background: rgba(89, 48, 134, 0.07);
}

.cash-plan-body .account-balance-head h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .account-balance-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.cash-plan-body .account-balance-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cash-plan-body .account-balance-stats span,
.cash-plan-body .account-balance-stats button,
.cash-plan-body .account-currency-strip span {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.09);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
}

.cash-plan-body .account-balance-stats button {
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.cash-plan-body .account-balance-stats button:hover {
  border-color: rgba(89, 48, 134, 0.28);
  background: #ffffff;
}

.cash-plan-body .account-balance-stats button:focus-visible {
  outline: 3px solid rgba(89, 48, 134, 0.24);
  outline-offset: 2px;
}

.cash-plan-body .account-balance-stats small,
.cash-plan-body .account-currency-strip small,
.cash-plan-body .account-currency-strip em,
.cash-plan-body .account-row span,
.cash-plan-body .account-list-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.cash-plan-body .account-balance-stats strong,
.cash-plan-body .account-currency-strip strong,
.cash-plan-body .account-row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .account-balance-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(89, 48, 134, 0.12);
  padding: 14px 18px 16px;
  background: #fbf8ff;
}

.cash-plan-body .account-currency-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 8px;
}

.cash-plan-body .account-currency-strip small {
  text-transform: uppercase;
}

.cash-plan-body .account-currency-strip strong {
  font-size: 18px;
  line-height: 1.1;
  word-break: break-word;
}

.cash-plan-body .account-list {
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  background: #ffffff;
}

.cash-plan-body .account-list-primary {
  box-shadow: inset 4px 0 0 var(--teal);
}

.cash-plan-body .account-list-reference {
  background: #fbf8ff;
}

.cash-plan-body .account-list-reference summary {
  color: #71627f;
}

.cash-plan-body .account-list-reference .account-row {
  background: #ffffff;
}

.cash-plan-body .account-list-reference .account-row b {
  color: var(--muted);
}

.cash-plan-body .account-list summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--text);
  font-weight: 760;
}

.cash-plan-body .account-list summary:hover {
  background: #fbf8ff;
}

.cash-plan-body .account-list summary strong {
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .account-list-grid {
  display: grid;
  border-top: 1px solid rgba(89, 48, 134, 0.12);
}

.cash-plan-body .account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(min(100%, 156px), auto);
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.09);
}

.cash-plan-body .account-row:last-child {
  border-bottom: 0;
}

.cash-plan-body .account-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cash-plan-body .account-row strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-plan-body .account-row b {
  color: var(--teal);
  text-align: right;
  word-break: break-word;
}

.cash-plan-body .account-row.negative b {
  color: var(--red);
}

.cash-plan-body .account-list-note {
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(89, 48, 134, 0.1);
  background: #fbf8ff;
}

.cash-plan-body .general-settlements {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.cash-plan-body .general-settlement-panel {
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.cash-plan-body .general-settlement-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  background: #ffffff;
}

.cash-plan-body .general-settlement-head span {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--blue);
  background: #f4eff9;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
}

.cash-plan-body .general-settlement-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
}

.cash-plan-body .general-settlement-result {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-items: end;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.cash-plan-body .general-settlement-result small,
.cash-plan-body .general-settlement-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.cash-plan-body .general-settlement-result strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.08;
}

.cash-plan-body .general-settlement-result.good strong,
.cash-plan-body .general-settlement-row.good strong {
  color: var(--teal);
}

.cash-plan-body .general-settlement-result.caution strong,
.cash-plan-body .general-settlement-row.caution strong {
  color: var(--amber);
}

.cash-plan-body .general-settlement-result.watch strong,
.cash-plan-body .general-settlement-row.watch strong {
  color: var(--red);
}

.cash-plan-body .general-settlement-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(220px, 1.55fr) minmax(0, 1fr);
  gap: 0;
  padding: 9px 12px 10px;
  background: #ffffff;
}

.cash-plan-body .general-settlement-row {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 0;
  border-left: 1px solid rgba(89, 48, 134, 0.09);
  border-radius: 0;
  padding: 0 10px;
  background: transparent;
}

.cash-plan-body .general-settlement-row:first-child {
  border-left: 0;
  padding-left: 0;
}

.cash-plan-body .general-settlement-row strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.12;
}

.cash-plan-body .general-settlement-row-pair {
  gap: 5px;
}

.cash-plan-body .general-settlement-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cash-plan-body .general-settlement-pair b {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.12;
  word-break: break-word;
}

.cash-plan-body .general-settlement-pair small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.05;
}

.cash-plan-body .dividend-founder-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 12px 9px;
  border-top: 1px solid rgba(89, 48, 134, 0.08);
}

.cash-plan-body .dividend-founder-head {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.cash-plan-body .dividend-founder-list {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.cash-plan-body .dividend-founder-row {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--stone-0);
}

.cash-plan-body .dividend-founder-row strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-plan-body .dividend-founder-row b {
  color: var(--text);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.cash-plan-body .dividend-founder-row span {
  display: inline-flex;
  gap: 3px;
  align-items: baseline;
  min-width: 0;
  line-height: 1.1;
  white-space: nowrap;
}

.cash-plan-body .dividend-founder-row small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.cash-plan-body .dividend-founder-row em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.cash-plan-body .dividend-founder-row span.good b {
  color: var(--teal);
}

.cash-plan-body .dividend-founder-row span.watch b {
  color: var(--red);
}

.cash-plan-body .dividend-reference-row {
  border-style: dashed;
  background: transparent;
}

.cash-plan-body .dividend-reference-row strong,
.cash-plan-body .dividend-reference-row b {
  color: var(--muted);
}

.cash-plan-body .dividend-reference-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.cash-plan-body .planned-summary {
  margin: 0 0 12px;
}

.plan-forecast-fact-sheet {
  display: grid;
  gap: 12px;
}

.pff-hero,
.pff-key-section,
.pff-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.pff-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.pff-source-strip span {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 999px;
  padding: 5px 9px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.pff-source-strip small,
.pff-row-values small,
.pff-summary-values small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.05;
}

.pff-source-strip strong {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pff-summary-grid,
.pff-key-grid,
.pff-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  min-width: 0;
}

.pff-key-groups {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.pff-key-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.pff-key-grid-primary {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.pff-key-grid-secondary {
  margin-top: 2px;
}

.pff-summary-card,
.pff-key-card,
.pff-section {
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.pff-summary-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.pff-summary-card.good,
.pff-key-card.good,
.pff-article-row.good {
  border-left: 3px solid var(--teal);
}

.pff-summary-card.watch,
.pff-key-card.watch,
.pff-article-row.watch {
  border-left: 3px solid var(--red);
}

.pff-summary-card.neutral,
.pff-key-card.neutral,
.pff-article-row.neutral {
  border-left: 3px solid var(--brand-300);
}

.pff-summary-card header,
.pff-key-card header,
.pff-section-title,
.pff-article-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.pff-summary-card header span,
.pff-section-head span,
.pff-section-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.pff-summary-card header strong,
.pff-key-card header b,
.pff-section-title strong,
.pff-article-row summary b {
  color: var(--text);
  font-size: 18px;
  line-height: 1.08;
  white-space: nowrap;
}

.pff-summary-values,
.pff-row-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.pff-summary-values span,
.pff-row-values span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-radius: 7px;
  padding: 7px 8px;
  background: var(--stone-50);
}

.pff-summary-values b,
.pff-row-values b,
.pff-detail-row b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pff-summary-card footer,
.pff-key-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
}

.pff-summary-card .good,
.pff-key-card .good {
  color: var(--teal);
}

.pff-summary-card .watch,
.pff-key-card .watch {
  color: var(--red);
}

.pff-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.pff-section-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.pff-key-card {
  display: grid;
  gap: 10px;
  padding: 11px;
}

.pff-key-card header span,
.pff-article-row summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pff-key-card header strong,
.pff-article-row summary strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pff-key-card header small,
.pff-article-row summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pff-bars {
  display: grid;
  gap: 3px;
}

.pff-bars i {
  display: block;
  height: 5px;
  min-width: 3px;
  border-radius: 999px;
}

.pff-bars .plan {
  background: var(--brand-300);
}

.pff-bars .forecast {
  background: var(--gold-400);
}

.pff-bars .fact {
  background: var(--teal);
}

.pff-section {
  overflow: hidden;
}

.pff-section-title {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
}

.pff-section-title b {
  min-width: 28px;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 11px;
  text-align: center;
}

.pff-row-list {
  display: grid;
  gap: 0;
}

.pff-article-row {
  border: 0;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 0;
  background: #ffffff;
}

.pff-article-row:last-child {
  border-bottom: 0;
}

.pff-article-row.good {
  border-left: 3px solid var(--teal);
}

.pff-article-row.watch {
  border-left: 3px solid var(--red);
}

.pff-article-row.neutral {
  border-left: 3px solid var(--brand-300);
}

.pff-article-row summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
}

.pff-article-row summary::-webkit-details-marker {
  display: none;
}

.pff-detail-table {
  display: grid;
  gap: 0;
  padding: 0 12px 10px;
}

.pff-detail-head,
.pff-detail-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) repeat(3, minmax(84px, 0.75fr));
  gap: 8px;
  align-items: center;
  min-width: 0;
  border-top: 1px solid rgba(89, 48, 134, 0.07);
  padding: 7px 0;
}

.pff-detail-head {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.pff-detail-row span {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pff-detail-row b {
  text-align: right;
}

@media (max-width: 760px) {
  .pff-summary-grid,
  .pff-key-grid,
  .pff-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pff-summary-values,
  .pff-row-values {
    grid-template-columns: minmax(0, 1fr);
  }

  .pff-summary-card header,
  .pff-key-card header,
  .pff-section-title,
  .pff-article-row summary {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .pff-detail-head {
    display: none;
  }

  .pff-detail-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .pff-detail-row b {
    text-align: left;
  }
}

.weekly-receipts-section {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  border: 0;
  border-radius: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  background: transparent;
  box-shadow: none;
}

.weekly-receipts-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.weekly-receipts-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.weekly-receipts-head span {
  width: max-content;
  max-width: 100%;
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 11px;
  font-weight: 760;
}

.weekly-receipts-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.12;
}

.weekly-receipts-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.weekly-receipts-total strong {
  color: var(--text);
  font-size: 19px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.weekly-receipts-total small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-align: right;
}

.weekly-receipts-nav {
  display: inline-flex;
  gap: 4px;
  justify-self: end;
}

.weekly-receipts-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.weekly-receipts-nav button {
  appearance: none;
  min-height: 30px;
  border: 1px solid rgba(89, 48, 134, 0.09);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--blue);
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.weekly-receipts-nav button:hover:not(:disabled) {
  border-color: rgba(89, 48, 134, 0.32);
  background: #fbf8ff;
}

.weekly-receipts-nav button:disabled {
  cursor: default;
  opacity: 0.38;
}

.weekly-distribution-button {
  appearance: none;
  min-height: 30px;
  border: 1px solid rgba(42, 133, 101, 0.12);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--teal);
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.weekly-distribution-button:hover {
  border-color: rgba(42, 133, 101, 0.38);
  background: rgba(42, 133, 101, 0.14);
}

.weekly-receipts-grid {
  display: grid;
  grid-template-columns: var(--weekly-receipts-columns);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.weekly-receipt-day {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 124px;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  padding: 9px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(38, 25, 55, 0.03);
  container-type: inline-size;
}

.weekly-receipt-day.today {
  border-color: rgba(42, 133, 101, 0.34);
  background: #ffffff;
  box-shadow: inset 0 3px 0 var(--teal), 0 8px 18px rgba(42, 133, 101, 0.08);
}

.weekly-receipt-day.empty {
  background: rgba(255, 255, 255, 0.82);
}

.weekly-receipt-day.outside-month {
  opacity: 0.56;
}

.weekly-receipt-day.has-shifts {
  background: #ffffff;
}

.weekly-receipt-day header {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: baseline;
}

.weekly-receipt-day header span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weekly-receipt-day.today header span {
  color: var(--teal);
}

.weekly-receipt-day header strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.weekly-receipt-day-total {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.weekly-receipt-day-total b {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-receipt-day-total small,
.weekly-receipt-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
}

.weekly-receipt-day.empty .weekly-receipt-day-total b {
  color: var(--muted);
}

.weekly-cash-balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 8px;
  padding: 5px 7px;
  background: var(--brand-50);
}

.weekly-cash-balance-point {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.weekly-cash-balance small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weekly-cash-balance b {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-cash-balance i {
  color: rgba(89, 48, 134, 0.34);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.weekly-cash-balance-point.negative b {
  color: var(--red);
}

.weekly-receipt-shift {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 7px;
  color: #8a6418;
  background: rgba(246, 196, 55, 0.18);
  font-size: 10px;
  font-weight: 800;
}

.weekly-receipt-shift.overdue {
  color: var(--red);
  background: rgba(221, 74, 74, 0.09);
}

.weekly-flow-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.weekly-flow-details {
  --weekly-flow-color: var(--teal);
  --weekly-flow-soft: rgba(42, 133, 101, 0.1);
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.weekly-flow-details.outflow {
  --weekly-flow-color: var(--amber);
  --weekly-flow-soft: rgba(168, 102, 19, 0.11);
}

.weekly-flow-details.other-outflow {
  --weekly-flow-color: var(--blue);
  --weekly-flow-soft: rgba(89, 48, 134, 0.1);
}

.weekly-flow-details summary {
  min-width: 0;
  min-height: 46px;
  padding: 5px 7px;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "chevron main main"
    ". values ring";
  gap: 2px 7px;
  align-items: center;
  list-style: none;
}

.weekly-flow-details.no-ring summary {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "chevron main"
    ". values";
}

.weekly-flow-details summary::-webkit-details-marker {
  display: none;
}

.weekly-flow-details summary::before {
  content: "";
  grid-area: chevron;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--weekly-flow-color);
  border-bottom: 2px solid var(--weekly-flow-color);
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.weekly-flow-details[open] summary::before {
  transform: rotate(45deg);
}

.weekly-flow-summary-main,
.weekly-flow-subrow-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.weekly-flow-summary-main {
  grid-area: main;
}

.weekly-flow-subrow-main {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title values"
    "meta values";
  gap: 0 7px;
  align-items: center;
}

.weekly-flow-summary-main strong,
.weekly-flow-subrow-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-flow-summary-main small,
.weekly-flow-subrow-main > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 730;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-flow-subrow-main strong {
  grid-area: title;
}

.weekly-flow-subrow-main > small {
  grid-area: meta;
}

.weekly-flow-summary-main strong {
  font-size: 12px;
  line-height: 1.12;
}

.weekly-flow-summary-main small {
  font-size: 10px;
  line-height: 1.08;
}

.weekly-flow-values,
.weekly-flow-sub-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.weekly-flow-values {
  grid-area: values;
  max-width: 184px;
  justify-self: start;
}

.weekly-flow-values.is-single,
.weekly-flow-sub-values.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.weekly-flow-sub-values {
  grid-area: values;
  min-width: 58px;
  max-width: 84px;
}

.weekly-flow-values em,
.weekly-flow-sub-values em {
  display: grid;
  gap: 1px;
  min-width: 0;
  border-radius: 6px;
  background: var(--weekly-flow-soft);
  padding: 2px 5px;
  font-style: normal;
}

.weekly-flow-values small,
.weekly-flow-sub-values small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weekly-flow-sub-values em {
  border-radius: 5px;
  padding: 1px 5px;
}

.weekly-flow-sub-values small {
  font-size: 7px;
}

.weekly-flow-values b,
.weekly-flow-sub-values b {
  overflow: hidden;
  color: var(--text);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-flow-sub-values b {
  font-size: 9px;
  text-align: right;
}

.weekly-flow-ring {
  grid-area: ring;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--text);
  background:
    radial-gradient(circle at center, #ffffff 0 54%, transparent 56%),
    conic-gradient(var(--weekly-flow-color) var(--weekly-flow-progress), rgba(89, 48, 134, 0.12) 0);
  display: inline-grid;
  place-items: center;
  font-size: 0;
  font-weight: 840;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.weekly-flow-ring.over {
  --weekly-flow-color: var(--red);
}

.weekly-flow-list {
  display: grid;
  gap: 0;
  overflow: auto;
  max-height: 184px;
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  padding: 1px 7px 4px;
}

.weekly-flow-subrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  align-items: center;
  min-width: 0;
  min-height: 23px;
  border-top: 1px solid rgba(89, 48, 134, 0.07);
  padding: 2px 0;
}

.weekly-flow-subrow:first-child {
  border-top: 0;
}

.weekly-flow-subrow.outflow {
  --weekly-flow-color: var(--amber);
  --weekly-flow-soft: rgba(168, 102, 19, 0.11);
}

.weekly-flow-subrow.other-outflow {
  --weekly-flow-color: var(--blue);
  --weekly-flow-soft: rgba(89, 48, 134, 0.1);
}

.weekly-receipt-details,
.weekly-receipt-project {
  min-width: 0;
}

.weekly-receipt-details.expanded {
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.weekly-receipt-details-head,
.weekly-receipt-project {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
  min-height: 24px;
  border-radius: 8px;
}

.weekly-receipt-details-head {
  padding: 0 7px;
  background: var(--brand-50);
  color: var(--blue);
  font-size: 11px;
  font-weight: 760;
}

.weekly-receipt-project {
  padding: 5px 0;
}

.weekly-receipt-details-head b,
.weekly-receipt-project > b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.weekly-receipt-list {
  display: grid;
  gap: 0;
  margin-top: 0;
  padding: 0 7px 5px;
}

.weekly-receipt-details:not(.expanded) .weekly-receipt-list {
  display: none;
}

.weekly-receipt-project {
  border-top: 1px solid rgba(89, 48, 134, 0.08);
}

.weekly-receipt-project:first-child {
  border-top: 0;
}

.weekly-receipt-details:not(.expanded) .weekly-receipt-project.is-extra {
  display: none;
}

.weekly-receipt-project > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.weekly-receipt-project > span > strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-receipt-project > span > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-receipt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  min-width: 0;
}

.weekly-receipt-meta em,
.weekly-receipt-meta span {
  overflow: hidden;
  max-width: 100%;
  border-radius: 999px;
  padding: 0 5px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-receipt-meta .weekly-receipt-shift-note {
  color: #8a6418;
  background: rgba(246, 196, 55, 0.18);
  font-weight: 820;
}

.weekly-receipt-kind.actual {
  color: var(--teal);
  background: var(--teal-soft);
}

.weekly-receipt-kind.planned {
  color: var(--blue);
  background: #f4eff9;
}

.weekly-receipt-category.licenses {
  color: #1f6f55;
  background: rgba(42, 133, 101, 0.1);
}

.weekly-receipt-category.implementation {
  color: #5e3a85;
  background: rgba(89, 48, 134, 0.11);
}

.weekly-receipt-category.other {
  color: var(--muted);
  background: #fbf8ff;
}

.weekly-receipt-toggle {
  appearance: none;
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(89, 48, 134, 0.09);
  border-radius: 8px;
  padding: 5px 7px;
  color: var(--blue);
  background: rgba(251, 248, 255, 0.82);
  font: inherit;
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  text-align: left;
}

.weekly-receipt-details.expanded .weekly-receipt-toggle {
  border: 0;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 0;
  background: var(--brand-50);
}

.weekly-receipt-toggle:hover {
  border-color: rgba(89, 48, 134, 0.24);
  background: #ffffff;
}

.weekly-receipt-toggle span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.weekly-receipt-toggle strong,
.weekly-receipt-toggle small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-receipt-toggle strong {
  color: var(--blue);
  font-size: 11px;
}

.weekly-receipt-toggle small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.weekly-receipt-toggle b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--blue);
  background: #f4eff9;
  font-size: 10px;
  font-weight: 840;
}

.weekly-outflow-details {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(221, 74, 74, 0.11);
  border-radius: 8px;
  background: #ffffff;
}

.weekly-outflow-details summary {
  min-width: 0;
  min-height: 31px;
  padding: 5px 7px 5px 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  list-style: none;
}

.weekly-outflow-details summary::-webkit-details-marker {
  display: none;
}

.weekly-outflow-details summary::before {
  content: "›";
  flex: 0 0 auto;
  color: var(--red);
  font-size: 15px;
  font-weight: 840;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.16s ease;
}

.weekly-outflow-details[open] summary::before {
  transform: rotate(90deg);
}

.weekly-outflow-details summary span {
  display: grid;
  gap: 1px;
  min-width: 0;
  margin-right: auto;
}

.weekly-outflow-details summary strong,
.weekly-outflow-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-outflow-details summary small,
.weekly-outflow-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 730;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-outflow-details summary b {
  flex: 0 0 auto;
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--red);
  background: rgba(221, 74, 74, 0.08);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: right;
}

.weekly-outflow-row b {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.weekly-outflow-list {
  display: grid;
  gap: 1px;
  overflow: auto;
  max-height: 220px;
  border-top: 1px solid rgba(221, 74, 74, 0.08);
  padding: 2px 7px 6px;
}

.weekly-outflow-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 28px;
  border-top: 1px solid rgba(89, 48, 134, 0.07);
  padding: 4px 0;
}

.weekly-outflow-row:first-child {
  border-top: 0;
}

.weekly-outflow-row span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.weekly-outflow-row.planned b {
  color: var(--blue);
}

@container (max-width: 140px) {
  .weekly-receipt-day {
    padding: 8px;
  }

  .weekly-receipt-day-total b {
    font-size: 15px;
  }

  .weekly-cash-balance {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .weekly-cash-balance i {
    display: none;
  }

  .weekly-cash-balance-point {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 4px;
  }

  .weekly-receipt-toggle {
    padding-right: 6px;
    padding-left: 6px;
  }

  .weekly-flow-details summary {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "chevron main"
      ". ring"
      ". values";
  }

  .weekly-flow-details.no-ring summary {
    grid-template-areas:
      "chevron main"
      ". values";
  }

  .weekly-flow-ring {
    justify-self: start;
  }

  .weekly-flow-subrow {
    grid-template-columns: minmax(0, 1fr);
  }

  .weekly-flow-subrow-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "meta"
      "values";
  }

  .weekly-flow-sub-values {
    justify-self: stretch;
    max-width: none;
  }
}

.weekly-distribution-body {
  display: grid;
  gap: 14px;
  padding: 14px 18px 18px;
}

.weekly-distribution-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.weekly-distribution-metrics span {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  padding: 10px;
  background: #fbf8ff;
}

.weekly-distribution-metrics small,
.weekly-distribution-metrics em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weekly-distribution-metrics strong {
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-distribution-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.weekly-distribution-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.weekly-distribution-legend i {
  width: 22px;
  height: 8px;
  border-radius: 999px;
}

.weekly-distribution-legend i.fact,
.weekly-distribution-fill.fact {
  background: rgba(42, 133, 101, 0.78);
}

.weekly-distribution-legend i.plan,
.weekly-distribution-fill.plan {
  background: rgba(89, 48, 134, 0.55);
}

.weekly-distribution-legend i.licenses,
.weekly-distribution-segment.licenses,
.weekly-distribution-fill i.licenses {
  background: #2a8565;
}

.weekly-distribution-legend i.implementation,
.weekly-distribution-segment.implementation,
.weekly-distribution-fill i.implementation {
  background: #7b57a1;
}

.weekly-distribution-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekly-distribution-day {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 132px;
  border: 1px solid rgba(89, 48, 134, 0.12);
  border-radius: 8px;
  padding: 9px;
  background:
    linear-gradient(180deg, rgba(42, 133, 101, var(--day-alpha, 0)) 0%, rgba(251, 248, 255, 0) 62%),
    #ffffff;
}

.weekly-distribution-day.today {
  border-color: rgba(42, 133, 101, 0.38);
  box-shadow: inset 0 3px 0 var(--teal);
}

.weekly-distribution-day.empty {
  background: #fbf8ff;
}

.weekly-distribution-day header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.weekly-distribution-day header strong {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.weekly-distribution-day header span,
.weekly-distribution-day small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weekly-distribution-day > b {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-distribution-day.past > b {
  color: var(--teal);
}

.weekly-distribution-day.future > b {
  color: var(--blue);
}

.weekly-distribution-bar {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weekly-distribution-bar > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-distribution-bar.empty {
  opacity: 0.34;
}

.weekly-distribution-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(89, 48, 134, 0.09);
}

.weekly-distribution-fill {
  display: flex;
  overflow: hidden;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.weekly-distribution-fill i {
  display: block;
  height: 100%;
}

.weekly-distribution-fill i.other {
  background: rgba(122, 111, 135, 0.45);
}

.weekly-distribution-weeks {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(89, 48, 134, 0.1);
  padding-top: 12px;
}

.weekly-distribution-weeks h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.weekly-distribution-week {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 90px 130px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.weekly-distribution-week-track {
  display: flex;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(89, 48, 134, 0.09);
}

.weekly-distribution-week-track i {
  display: block;
  height: 100%;
}

.weekly-distribution-week-track i.fact {
  background: var(--teal);
}

.weekly-distribution-week-track i.plan {
  background: #8a6db0;
}

.weekly-distribution-week strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.weekly-distribution-week small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-plan-body .planned-summary-board {
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.09);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.cash-plan-body .planned-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(min(100%, 220px), 0.38fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.13);
  background:
    linear-gradient(90deg, #ffffff 0%, #fbf8ff 72%, #f2ecf8 100%);
}

.cash-plan-body .planned-summary-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  color: #247151;
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
}

.cash-plan-body .planned-summary-head h2 {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.06;
}

.cash-plan-body .planned-summary-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cash-plan-body .planned-summary-result {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.cash-plan-body .planned-summary-result.good {
  box-shadow: inset 4px 0 0 var(--teal);
}

.cash-plan-body .planned-summary-result.watch {
  box-shadow: inset 4px 0 0 var(--red);
}

.cash-plan-body .planned-summary-result span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.cash-plan-body .planned-summary-result small,
.cash-plan-body .planned-summary-result em,
.cash-plan-body .planned-flow-values small,
.cash-plan-body .planned-bullet-caption,
.cash-plan-body .cash-bridge-head small,
.cash-plan-body .cash-bridge-axis,
.cash-plan-body .cash-bridge-meta,
.cash-plan-body .cash-bridge-net small,
.cash-plan-body .cash-bridge-delta small,
.cash-plan-body .planned-summary-footnote {
  color: var(--muted);
}

.cash-plan-body .planned-summary-result small,
.cash-plan-body .planned-flow-head span,
.cash-plan-body .planned-flow-values small,
.cash-plan-body .cash-bridge-head span,
.cash-plan-body .cash-bridge-net small,
.cash-plan-body .cash-bridge-delta small {
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.cash-plan-body .planned-summary-result strong {
  color: var(--text);
  font-size: 29px;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .planned-summary-result em {
  max-width: 150px;
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
  text-align: right;
}

.cash-plan-body .planned-summary-result em.good,
.cash-plan-body .cash-bridge-delta.good strong,
.cash-plan-body .planned-summary-footnote .good strong {
  color: var(--teal);
}

.cash-plan-body .planned-summary-result em.watch,
.cash-plan-body .cash-bridge-delta.watch strong,
.cash-plan-body .planned-summary-footnote .watch strong {
  color: var(--red);
}

.cash-plan-body .planned-summary-visual {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(min(100%, 280px), 0.82fr);
  gap: 10px;
  padding: 10px;
  background: #ffffff;
}

.cash-plan-body .cash-bridge-panel,
.cash-plan-body .planned-flow-lanes {
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.cash-plan-body .cash-bridge-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.cash-plan-body .cash-bridge-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.cash-plan-body .cash-bridge-head span {
  color: var(--text);
}

.cash-plan-body .cash-bridge-head small,
.cash-plan-body .cash-bridge-axis,
.cash-plan-body .cash-bridge-meta,
.cash-plan-body .cash-bridge-delta small {
  font-size: 12px;
  font-weight: 680;
}

.cash-plan-body .cash-bridge-axis {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  align-items: center;
  text-align: center;
}

.cash-plan-body .cash-bridge-axis span:first-child {
  text-align: left;
}

.cash-plan-body .cash-bridge-axis span:last-child {
  text-align: right;
}

.cash-plan-body .cash-bridge-row {
  display: grid;
  grid-template-columns: minmax(44px, 58px) minmax(0, 1fr) minmax(min(100%, 112px), 0.28fr);
  gap: 10px;
  align-items: center;
}

.cash-plan-body .cash-bridge-label {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 8px;
  color: var(--muted);
  background: #fbf8ff;
  font-weight: 760;
}

.cash-plan-body .cash-bridge-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cash-plan-body .cash-bridge-track {
  position: relative;
  display: block;
  height: 26px;
  border-radius: 999px;
  background: #e9e1f3;
}

.cash-plan-body .cash-bridge-zero {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(89, 48, 134, 0.18);
  transform: translateX(-50%);
}

.cash-plan-body .cash-bridge-segment {
  position: absolute;
  top: 6px;
  height: 14px;
  border-radius: 999px;
}

.cash-plan-body .cash-bridge-segment.inflow {
  left: 50%;
  background: var(--teal);
}

.cash-plan-body .cash-bridge-segment.outflow {
  right: 50%;
  background: var(--amber);
}

.cash-plan-body .cash-bridge-net-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 3px;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%);
}

.cash-plan-body .cash-bridge-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cash-plan-body .cash-bridge-net {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: #fbf8ff;
}

.cash-plan-body .cash-bridge-net strong,
.cash-plan-body .cash-bridge-delta strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.cash-plan-body .cash-bridge-row.good .cash-bridge-net strong {
  color: var(--teal);
}

.cash-plan-body .cash-bridge-row.watch .cash-bridge-net strong {
  color: var(--red);
}

.cash-plan-body .cash-bridge-delta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbf8ff;
}

.cash-plan-body .planned-flow-lanes {
  display: grid;
  gap: 0;
  overflow: hidden;
  align-content: start;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
}

.cash-plan-body .planned-flow-lane {
  --flow: var(--teal);
  --flow-soft: var(--teal-soft);
  display: grid;
  gap: 11px;
  padding: 14px 16px;
  background: #ffffff;
}

.cash-plan-body .summary-hotspot {
  border: 0;
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.cash-plan-body .summary-hotspot:hover {
  background-color: #f7f1ff;
}

.cash-plan-body .summary-hotspot:focus-visible {
  outline: 3px solid rgba(89, 48, 134, 0.24);
  outline-offset: 2px;
}

.cash-plan-body .planned-flow-lane.outflow {
  --flow: var(--amber);
  --flow-soft: var(--amber-soft);
}

.cash-plan-body .planned-flow-lane.inflow {
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  box-shadow: inset 2px 0 0 var(--teal);
}

.cash-plan-body .planned-flow-lane.outflow {
  box-shadow: inset 2px 0 0 var(--amber);
}

.cash-plan-body .planned-flow-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  width: 100%;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.cash-plan-body .planned-flow-head div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cash-plan-body .planned-flow-head span {
  color: var(--text);
}

.cash-plan-body .planned-flow-head strong {
  color: var(--text);
  font-size: 25px;
  line-height: 1.04;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.cash-plan-body .planned-flow-head b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--flow);
  background: var(--flow-soft);
  font-size: 13px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .planned-bullet {
  display: grid;
  gap: 6px;
  width: 100%;
  border-radius: 8px;
  padding: 2px 0;
  background: transparent;
}

.cash-plan-body .planned-bullet-track {
  position: relative;
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)),
    #e9e1f3;
}

.cash-plan-body .planned-bullet-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--flow);
}

.cash-plan-body .planned-bullet-target {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 0 0 2px #ffffff;
  transform: translateX(-50%);
}

.cash-plan-body .planned-bullet-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 650;
}

.cash-plan-body .planned-flow-status {
  min-height: 30px;
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 760;
  background: #ffffff;
}

.cash-plan-body .planned-flow-status.neutral {
  color: var(--blue);
}

.cash-plan-body .planned-flow-status.good {
  color: var(--teal);
}

.cash-plan-body .planned-flow-status.watch {
  color: var(--red);
}

.cash-plan-body .planned-flow-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 104px), 1fr));
  gap: 7px;
}

.cash-plan-body .planned-flow-values button {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 0;
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 8px;
  padding: 8px 0 0;
  background: transparent;
}

.cash-plan-body .planned-flow-values strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .planned-flow-values .neutral strong {
  color: var(--blue);
}

.cash-plan-body .planned-flow-values .good strong {
  color: var(--teal);
}

.cash-plan-body .planned-flow-values .watch strong {
  color: var(--red);
}

.cash-plan-body .planned-flow-segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 7px;
}

.cash-plan-body .planned-flow-segment {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.cash-plan-body .planned-flow-segment.other {
  background: #ffffff;
}

.cash-plan-body .planned-flow-segment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  width: 100%;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.cash-plan-body .planned-flow-segment-head span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.cash-plan-body .planned-flow-segment-head small,
.cash-plan-body .planned-flow-segment-values small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.cash-plan-body .planned-flow-segment-head strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .planned-flow-segment-head b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .planned-flow-segment-scale {
  width: 100%;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.cash-plan-body .planned-flow-segment-track {
  position: relative;
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e1f3;
}

.cash-plan-body .planned-flow-segment-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.cash-plan-body .planned-flow-segment-target {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 0 0 2px #ffffff;
  transform: translateX(-50%);
}

.cash-plan-body .planned-flow-segment-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 116px), 1fr));
  gap: 6px;
}

.cash-plan-body .planned-flow-segment-values button {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.cash-plan-body .planned-flow-segment-values strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .planned-flow-segment-values .neutral strong {
  color: var(--blue);
}

.cash-plan-body .planned-flow-segment-values .good strong {
  color: var(--teal);
}

.cash-plan-body .planned-summary-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border-top: 1px solid rgba(89, 48, 134, 0.06);
  padding: 8px;
  font-size: 12px;
  font-weight: 680;
}

.cash-plan-body .planned-summary-footnote span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 8px;
  padding: 0 7px;
  background: #ffffff;
}

.cash-plan-body .planned-summary-footnote strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .closed-period-head {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(min(100%, 520px), 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(89, 48, 134, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(49, 43, 56, 0.05);
}

.cash-plan-body .closed-period-head > div:first-child {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.cash-plan-body .closed-period-head > div:first-child > span {
  width: max-content;
  max-width: 100%;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 760;
}

.cash-plan-body .closed-period-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.08;
}

.cash-plan-body .closed-period-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cash-plan-body .closed-period-metrics span {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: #fbf8ff;
}

.cash-plan-body .closed-period-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.cash-plan-body .closed-period-metrics strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .closed-period-head.good .closed-period-metrics span:last-child strong {
  color: var(--teal);
}

.cash-plan-body .closed-period-head.watch .closed-period-metrics span:last-child strong {
  color: var(--red);
}

.modal-open {
  overflow: hidden;
}

.summary-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.summary-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(49, 43, 56, 0.46);
}

.summary-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 32px));
  max-height: min(920px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid rgba(89, 48, 134, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(49, 43, 56, 0.28);
}

.summary-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(89, 48, 134, 0.13);
  padding: 18px;
  background: #ffffff;
}

.summary-modal-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.summary-modal-head h2 {
  margin: 5px 0 4px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.08;
}

.summary-modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.summary-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(89, 48, 134, 0.14);
  border-radius: 8px;
  background: #fbf8ff;
  cursor: pointer;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.summary-modal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 0;
}

.summary-modal-metrics span {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  padding: 10px;
  background: #fbf8ff;
}

.summary-modal-metrics small,
.summary-modal-row-main span,
.summary-modal-payments small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.summary-modal-metrics strong,
.summary-modal-row-values b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.summary-modal-list {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.summary-modal-row {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.summary-modal-row-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.summary-modal-row-main strong {
  color: var(--text);
}

.summary-modal-row-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.summary-modal-row-values span {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 9px;
  background: #fbf8ff;
}

.summary-modal-row-values small {
  color: var(--muted);
  font-size: 12px;
}

.summary-modal-payments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-modal-payments > div {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  padding: 9px;
  background: #f4eff9;
}

.summary-modal-payments span {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.outflow-breakdown {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.outflow-breakdown-item {
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  background: #ffffff;
}

.outflow-breakdown-item summary {
  display: grid;
  grid-template-columns: 18px minmax(0, 1.2fr) minmax(130px, 0.5fr) minmax(150px, 0.58fr);
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.outflow-breakdown-item summary::-webkit-details-marker {
  display: none;
}

.outflow-breakdown-item summary::before {
  content: "›";
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.outflow-breakdown-item[open] summary::before {
  transform: rotate(90deg);
}

.outflow-breakdown-title,
.outflow-breakdown-numbers {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.outflow-breakdown-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outflow-breakdown-title small,
.outflow-breakdown-numbers small,
.outflow-nested-list header small,
.outflow-nested-list p small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.2;
}

.outflow-breakdown-numbers {
  text-align: right;
}

.outflow-breakdown-numbers b {
  color: var(--text);
  font-size: 16px;
}

.outflow-breakdown-status {
  justify-self: end;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 760;
}

.outflow-breakdown-item.near .outflow-breakdown-status {
  color: #8a6810;
  background: rgba(245, 194, 42, 0.22);
}

.outflow-breakdown-item.watch .outflow-breakdown-status {
  color: var(--red);
  background: rgba(188, 75, 81, 0.12);
}

.outflow-breakdown-scale {
  position: relative;
  grid-column: 2 / -1;
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e1f3;
}

.outflow-breakdown-scale i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
}

.outflow-breakdown-item.good .outflow-breakdown-scale i {
  background: var(--teal);
}

.outflow-breakdown-item.watch .outflow-breakdown-scale i {
  background: var(--red);
}

.outflow-breakdown-scale em {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%);
}

.outflow-breakdown-body {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(89, 48, 134, 0.11);
  padding: 10px 14px 14px 42px;
  background: #fbf8ff;
}

.outflow-budget-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.outflow-budget-head,
.outflow-budget-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.outflow-budget-head {
  padding: 9px 12px;
  background: rgba(247, 241, 255, 0.76);
}

.outflow-budget-head span,
.outflow-budget-main,
.outflow-budget-amount {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.outflow-budget-head strong {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.outflow-budget-head small,
.outflow-budget-main small,
.outflow-budget-amount small,
.outflow-budget-more small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 690;
  line-height: 1.2;
}

.outflow-budget-head b,
.outflow-budget-more b {
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.outflow-budget-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(124px, 0.42fr) minmax(132px, 0.42fr);
  gap: 6px 12px;
  align-items: center;
  min-width: 0;
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  padding: 8px 12px;
}

.outflow-budget-main strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.outflow-budget-amount {
  justify-items: end;
  text-align: right;
}

.outflow-budget-amount b {
  color: var(--text);
  font-size: 13px;
}

.outflow-budget-status {
  justify-self: end;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--teal);
  background: rgba(56, 163, 165, 0.12);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.15;
  text-align: right;
}

.outflow-budget-row.near .outflow-budget-status {
  color: #8a6810;
  background: rgba(245, 194, 42, 0.18);
}

.outflow-budget-row.watch .outflow-budget-status {
  color: var(--red);
  background: rgba(188, 75, 81, 0.11);
}

.outflow-budget-slider {
  position: relative;
  grid-column: 1 / -1;
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(89, 48, 134, 0.11);
}

.outflow-budget-slider i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.outflow-budget-row.near .outflow-budget-slider i {
  background: var(--amber);
}

.outflow-budget-row.watch .outflow-budget-slider i {
  background: var(--red);
}

.outflow-budget-slider em {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 999px;
  background: rgba(44, 35, 57, 0.8);
  transform: translateX(-50%);
}

.outflow-budget-more {
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.outflow-nested-list {
  overflow: hidden;
  border: 1px solid rgba(89, 48, 134, 0.11);
  border-radius: 8px;
  background: #ffffff;
}

.outflow-nested-list header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(89, 48, 134, 0.09);
  padding: 10px 12px;
  background: #f7f1ff;
}

.outflow-nested-list header span,
.outflow-nested-list p span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.outflow-nested-list header strong {
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
}

.outflow-nested-list header b {
  color: var(--text);
  font-size: 14px;
}

.outflow-nested-list p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  min-height: 34px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.07);
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.outflow-nested-list p:last-child {
  border-bottom: 0;
}

.outflow-nested-list p b {
  text-align: right;
}

.outflow-nested-more {
  background: #fbf8ff;
}

.project-breakdown {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.project-breakdown-planline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbf8ff;
}

.project-breakdown-planline span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  min-width: 0;
}

.project-breakdown-planline small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.project-breakdown-planline strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.project-breakdown-planline b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.project-breakdown-group {
  overflow: visible;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  background: #ffffff;
}

.project-breakdown-group summary {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.project-breakdown-group summary::-webkit-details-marker {
  display: none;
}

.project-breakdown-group summary::before {
  content: "›";
  color: var(--blue);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.project-breakdown-group[open] summary::before {
  transform: rotate(90deg);
}

.project-breakdown-group summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-breakdown-group summary strong {
  color: var(--text);
  font-size: 15px;
}

.project-breakdown-group summary small {
  color: var(--muted);
  font-size: 12px;
}

.project-breakdown-group summary b {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.project-breakdown-group.actual {
  box-shadow: inset 3px 0 0 var(--teal);
}

.project-breakdown-group.remaining {
  box-shadow: inset 3px 0 0 var(--blue);
}

.project-breakdown-group.overpaid {
  box-shadow: inset 3px 0 0 var(--amber);
}

.project-breakdown-list {
  display: grid;
  position: relative;
  border-top: 1px solid rgba(89, 48, 134, 0.1);
}

.project-breakdown-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px 8px 28px;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
}

.project-breakdown-row:last-child {
  border-bottom: 0;
}

.project-breakdown-row:focus {
  outline: 2px solid rgba(89, 48, 134, 0.28);
  outline-offset: -2px;
  background: #fbf8ff;
}

.project-breakdown-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-breakdown-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-breakdown-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.project-breakdown-date {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 2px 7px;
  background: #fbf8ff;
}

.project-breakdown-date.actual {
  color: var(--teal);
  background: var(--teal-soft);
}

.project-breakdown-date.planned {
  color: var(--blue);
  background: #f4eff9;
}

.project-breakdown-date.overdue {
  color: var(--red);
  background: rgba(188, 75, 81, 0.11);
}

.project-breakdown-row b {
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.project-breakdown-row.residual {
  background: #fbf8ff;
}

.project-payment-tooltip {
  position: absolute;
  right: 10px;
  top: calc(100% - 3px);
  z-index: 20;
  display: none;
  width: min(470px, calc(100vw - 72px));
  border: 1px solid rgba(89, 48, 134, 0.2);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(49, 43, 56, 0.24);
}

.project-breakdown-row:hover .project-payment-tooltip,
.project-breakdown-row:focus .project-payment-tooltip,
.project-breakdown-row:focus-within .project-payment-tooltip {
  display: grid;
  gap: 8px;
}

.project-payment-tooltip > strong {
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-payment-tooltip section {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  padding-top: 8px;
}

.project-payment-tooltip header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.project-payment-tooltip header span,
.project-payment-tooltip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.25;
}

.project-payment-tooltip header b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
}

.project-payment-tooltip p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.project-payment-tooltip-more {
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  padding-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.account-modal-list {
  display: grid;
  padding: 14px 18px 18px;
}

.account-modal-list .account-row {
  background: #ffffff;
}

.loan-control-section {
  margin-top: 12px;
}

.loan-control-card {
  width: 100%;
}

.loan-counterparty-list {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.loan-counterparty-row {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(89, 48, 134, 0.13);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.loan-counterparty-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.loan-counterparty-main span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.loan-counterparty-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loan-counterparty-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.loan-counterparty-main b {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.summary-modal-metrics strong.good,
.loan-counterparty-main b.good,
.loan-counterparty-metrics strong.good {
  color: var(--teal);
}

.summary-modal-metrics strong.watch,
.loan-counterparty-main b.watch,
.loan-counterparty-metrics strong.watch {
  color: var(--red);
}

.summary-modal-metrics strong.neutral,
.loan-counterparty-main b.neutral,
.loan-counterparty-metrics strong.neutral {
  color: var(--blue);
}

.loan-counterparty-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.loan-counterparty-metrics span {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: 8px;
  padding: 9px;
  background: #fbf8ff;
}

.loan-counterparty-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.loan-counterparty-metrics strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cash-plan-body .metric-card,
.cash-plan-body .direction-section,
.cash-plan-body .payment-column {
  border-color: rgba(89, 48, 134, 0.15);
}

.cash-plan-body .metric-card {
  position: relative;
  overflow: hidden;
  border-top: 0;
}

.cash-plan-body .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--blue);
}

.cash-plan-body .metric-card.good::before {
  background: var(--teal);
}

.cash-plan-body .metric-card.watch::before {
  background: var(--amber);
}

.cash-plan-body .metric-card.neutral::before {
  background: var(--blue);
}

.cash-plan-body .metric-card strong,
.cash-plan-body .direction-metrics span,
.cash-plan-body .article-subtitle,
.cash-plan-body .summary-meta,
.cash-plan-body .scale-legend,
.cash-plan-body .payment-column-head span,
.cash-plan-body .counterparty-name small,
.cash-plan-body .payment-empty {
  color: var(--muted);
}

.cash-plan-body .metric-card > span,
.cash-plan-body .direction-head h2,
.cash-plan-body .direction-metrics strong,
.cash-plan-body .article-values strong,
.cash-plan-body .payment-column-head > span {
  color: var(--text);
}

.cash-plan-body .direction-section {
  border-top: 0;
}

.cash-plan-body .direction-section.inflow {
  box-shadow: inset 4px 0 0 var(--teal), var(--shadow);
}

.cash-plan-body .direction-section.outflow {
  box-shadow: inset 4px 0 0 var(--amber), var(--shadow);
}

.cash-plan-body .direction-head {
  background: linear-gradient(90deg, #ffffff 0%, #f3eef8 100%);
}

.cash-plan-body .badge.inflow {
  color: #247151;
  background: var(--teal-soft);
}

.cash-plan-body .badge.outflow {
  color: #6f4e00;
  background: var(--amber-soft);
}

.cash-plan-body .article-group summary:hover {
  background: #fbf8ff;
}

.cash-plan-body .article-group[open] summary {
  background: #fbf8ff;
}

.cash-plan-body .article-group summary::before {
  color: var(--blue);
}

.cash-plan-body .article-title {
  color: var(--text);
}

.cash-plan-body .article-values span,
.cash-plan-body .project-detail-grid span {
  border-color: rgba(89, 48, 134, 0.13);
  background: #fbf8ff;
}

.cash-plan-body .article-values small,
.cash-plan-body .project-detail-grid small {
  color: #71627f;
}

.cash-plan-body .scale-track,
.cash-plan-body .expense-scale,
.cash-plan-body .waterfall-track {
  background: #e9e1f3;
}

.cash-plan-body .scale-part.remaining {
  background: #d8cbe6;
}

.cash-plan-body .scale-marker {
  background: var(--blue);
  box-shadow: 0 0 0 2px #ffffff;
}

.cash-plan-body .payment-breakdown,
.cash-plan-body .tree-children {
  background: #f4eff9;
}

.cash-plan-body .payment-column-head {
  background: #fbf8ff;
}

.cash-plan-body .amount-planned,
.cash-plan-body .direction-metrics .neutral strong,
.cash-plan-body .article-values .neutral strong {
  color: var(--blue);
}

.cash-plan-body .project-summary-line,
.cash-plan-body .project-detail,
.cash-plan-body .empty-state.slim {
  border-color: rgba(89, 48, 134, 0.13);
  background: #fbf8ff;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .cash-plan-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .pl-highlights {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .pl-executive,
  .summary-hero {
    grid-template-columns: 1fr;
  }

  .pl-analysis-grid {
    grid-template-columns: 1fr;
  }

  .span-5,
  .span-6,
  .span-7,
  .span-12 {
    grid-column: auto;
  }

  .model-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid.compact {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .planned-summary-head,
  .planned-summary-visual,
  .closed-period-head,
  .general-settlement-head,
  .account-balance-head {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .planned-summary-head,
  .cash-plan-body .planned-summary-visual,
  .cash-plan-body .closed-period-head,
  .cash-plan-body .general-settlement-head,
  .cash-plan-body .account-balance-head {
    grid-template-columns: 1fr;
  }

  .cash-control-grid,
  .quality-control-grid,
  .general-settlement-grid,
  .closed-period-metrics,
  .control-document-grid {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .cash-control-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }

  .outflow-breakdown-body {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .account-balance-chip {
    justify-self: start;
  }

  .cash-plan-body .general-settlement-result {
    justify-items: start;
  }

  .direction-head {
    align-items: stretch;
    display: grid;
  }

  .direction-metrics {
    min-width: 0;
    width: 100%;
  }

  .direction-metrics span {
    text-align: left;
  }

  .article-group summary {
    grid-template-columns: 18px minmax(140px, 0.85fr) minmax(0, 1.15fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    inset: auto;
    top: 0;
    z-index: 30;
    width: 100%;
    height: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-mode-toggle {
    display: none;
  }

  .sidebar-hover-zone,
  .sidebar-auto-hide .sidebar-hover-zone {
    display: none;
  }

  .sidebar-auto-hide .workspace,
  .workspace {
    margin-left: 0;
  }

  .sidebar-auto-hide .sidebar,
  .sidebar-auto-hide .sidebar:hover,
  .sidebar-auto-hide .sidebar:focus-within,
  .sidebar-auto-hide.sidebar-rail-hovered .sidebar,
  .sidebar-auto-hide.sidebar-force-collapsed .sidebar,
  .sidebar-auto-hide.sidebar-force-collapsed .sidebar:hover,
  .sidebar-auto-hide.sidebar-force-collapsed .sidebar:focus-within {
    width: 100%;
    padding-inline: 18px;
    transform: none;
    box-shadow: none;
  }

  .sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-row {
    justify-content: flex-start;
    gap: 10px;
  }

  .sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-mark,
  .sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-name,
  .sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .nav-list {
    width: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace {
    padding: 18px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .cash-plan-topbar {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .cash-plan-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .section-head {
    display: grid;
  }

  .toolbar {
    justify-content: stretch;
  }

  .toolbar > * {
    flex: 1 1 150px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .pl-highlights,
  .summary-strip,
  .variance-grid,
  .driver-grid,
  .model-metrics,
  .model-specials,
  .model-comparison-row,
  .model-detail-columns,
  .business-lines,
  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
    overflow: auto;
  }

  .segmented-control button {
    flex: 1 0 auto;
  }

  .metric-grid.compact {
    grid-template-columns: 1fr;
  }

  .account-balance-head {
    padding: 15px;
  }

  .account-balance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planned-summary-head {
    padding: 15px;
  }

  .account-balance-head h2,
  .planned-summary-head h2,
  .planned-summary-result strong {
    font-size: 24px;
  }

  .planned-summary-result,
  .cash-bridge-row,
  .planned-flow-values,
  .planned-flow-segments,
  .general-settlement-grid,
  .closed-period-metrics {
    grid-template-columns: 1fr;
  }

  .planned-summary-result {
    display: grid;
  }

  .planned-summary-result em {
    max-width: none;
    text-align: left;
  }

  .cash-bridge-label {
    min-height: 34px;
    place-items: center start;
    padding-left: 12px;
  }

  .cash-bridge-delta,
  .planned-summary-footnote {
    display: grid;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-value {
    text-align: left;
  }

  .direction-head,
  .article-group summary,
  .summary-meta {
    display: grid;
    justify-content: stretch;
  }

  .direction-metrics,
  .article-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-breakdown {
    grid-template-columns: 1fr;
  }

  .cash-control-metrics,
  .summary-modal-metrics {
    grid-template-columns: 1fr;
  }

  .quality-control-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outflow-breakdown-item summary {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .outflow-breakdown-numbers,
  .outflow-breakdown-status {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .outflow-breakdown-scale {
    grid-column: 2;
  }

  .outflow-breakdown-body {
    padding-left: 34px;
  }

  .outflow-budget-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .outflow-budget-amount,
  .outflow-budget-status {
    justify-self: start;
    text-align: left;
  }

  .outflow-budget-slider {
    grid-column: 1;
  }

  .loan-counterparty-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-group summary {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .summary-meta {
    grid-column: 1 / -1;
  }

  .article-title {
    white-space: normal;
  }

  .expense-row,
  .waterfall-row,
  .tree-head,
  .tree-row summary,
  .tree-row.leaf > div,
  .tree-child {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .tree-row strong,
  .tree-row span:not(.tree-name),
  .tree-row b,
  .tree-child strong,
  .tree-child span:not(.tree-name),
  .tree-child b,
  .expense-row b,
  .waterfall-row strong {
    text-align: left;
  }

  .trend-bars {
    min-height: 220px;
    gap: 8px;
  }

  .trend-stack {
    height: 150px;
    padding: 0 2px;
  }
}

@media (max-width: 520px) {
  .auth-body,
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar > * {
    flex-basis: 100%;
  }

  .cash-plan-body .cash-plan-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .quality-control-metrics,
  .quality-control-row {
    grid-template-columns: 1fr;
  }

  .quality-control-amount {
    justify-self: start;
    text-align: left;
  }

  .cash-plan-body .compact-month-picker {
    width: auto;
  }

  .cash-plan-body .topbar-updated {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    text-align: left;
  }

  .cash-plan-body .refresh-button {
    grid-column: 2;
    grid-row: 1;
  }

  .secondary-button,
  .month-picker input,
  .segmented-control {
    width: 100%;
  }

  .direction-metrics,
  .article-values,
  .planned-flow-values,
  .planned-flow-segment-values,
  .account-balance-stats,
  .general-settlement-grid,
  .account-row,
  .loan-counterparty-main,
  .loan-counterparty-metrics,
  .model-metrics,
  .model-specials,
  .model-comparison-row,
  .model-detail-columns,
  .project-detail-grid,
  .variance-grid,
  .driver-grid,
  .business-lines,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .planned-flow-values,
  .cash-plan-body .planned-flow-segment-values,
  .cash-plan-body .account-balance-stats,
  .cash-plan-body .general-settlement-grid {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .dividend-founder-list {
    flex-basis: 100%;
  }

  .cash-plan-body .weekly-receipt-toggle strong {
    font-size: 10px;
  }

  .counterparty-row,
  .project-breakdown-row,
  .project-breakdown-group summary,
  .outflow-nested-list header,
  .outflow-nested-list p,
  .project-detail summary,
  .variance-item,
  .panel-head,
  .model-detail-row,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .counterparty-row strong,
  .project-breakdown-row b,
  .project-breakdown-group summary b,
  .outflow-nested-list header b,
  .outflow-nested-list p b,
  .account-row b,
  .loan-counterparty-main b,
  .project-detail summary strong,
  .variance-item b,
  .panel-head span,
  .model-detail-row strong,
  .admin-row strong {
    text-align: left;
  }

  .planned-summary-visual,
  .planned-summary-head,
  .closed-period-head,
  .cash-bridge-row {
    grid-template-columns: 1fr;
  }

  .planned-summary-result strong,
  .metric-card > span,
  .model-main-value strong {
    font-size: 22px;
  }

  .summary-copy h2 {
    font-size: 30px;
  }

  .tree-head {
    display: none;
  }

  .panel-head {
    display: grid;
    justify-content: stretch;
  }
}

/*
 * SteadyControl HoReCa Finance design code.
 * This layer intentionally changes only presentation: colors, surfaces,
 * component states, brand shell, and overlays. Data structure and rendering
 * contracts stay owned by the existing services and browser JavaScript.
 */
:root {
  color-scheme: light;

  --brand-50: #f7f3fa;
  --brand-100: #eee7f5;
  --brand-200: #ded1eb;
  --brand-300: #c5add9;
  --brand-400: #a37dc0;
  --brand-500: #7a4b9f;
  --brand-600: #593086;
  --brand-700: #49266f;
  --brand-800: #381b58;
  --brand-900: #28123f;
  --brand-950: #1a0a2c;

  --gold-50: #fff9ea;
  --gold-100: #f9edc8;
  --gold-200: #f0d78b;
  --gold-300: #e3bc57;
  --gold-400: #d1a13a;
  --gold-500: #bb8628;
  --gold-600: #9a681b;
  --gold-700: #754a14;
  --gold-800: #52330f;
  --gold-900: #35210b;

  --stone-0: #ffffff;
  --stone-25: #fffcf8;
  --stone-50: #f7f4ef;
  --stone-100: #efeae4;
  --stone-200: #dfd8d0;
  --stone-300: #c9bfb6;
  --stone-400: #a89d95;
  --stone-500: #867a75;
  --stone-600: #695e64;
  --stone-700: #504650;
  --stone-800: #352d39;
  --stone-900: #211b26;
  --stone-950: #17121b;

  --positive: #287a64;
  --positive-strong: #1f5c4b;
  --positive-soft: #e7f2ee;
  --warning: #b57817;
  --warning-strong: #7d4d0f;
  --warning-soft: #fbf1dc;
  --negative: #b84d4a;
  --negative-strong: #8e3735;
  --negative-soft: #f8e8e7;
  --info: #3e6e8d;
  --info-strong: #2e5269;
  --info-soft: #e8f0f5;

  --bg: var(--stone-50);
  --surface: var(--stone-0);
  --surface-soft: var(--stone-100);
  --surface-warm: var(--stone-25);
  --text: var(--stone-900);
  --muted: var(--stone-600);
  --line: var(--stone-200);
  --line-strong: var(--stone-300);
  --teal: var(--positive);
  --teal-soft: var(--positive-soft);
  --blue: var(--brand-600);
  --blue-soft: var(--brand-100);
  --amber: var(--gold-400);
  --amber-soft: var(--gold-50);
  --red: var(--negative);
  --red-soft: var(--negative-soft);
  --focus: var(--brand-300);
  --shadow: 0 18px 42px rgba(33, 27, 38, 0.08);
  --shadow-soft: 0 8px 22px rgba(33, 27, 38, 0.06);
  --sidebar-width: 252px;
  --sidebar-rail-width: 64px;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    linear-gradient(180deg, rgba(247, 243, 250, 0.86) 0%, rgba(247, 244, 239, 0) 360px),
    var(--bg);
}

button,
a,
input,
select,
textarea,
summary {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.summary-hotspot:focus-visible,
.weekly-receipt-toggle:focus-visible,
.weekly-receipts-nav button:focus-visible,
.weekly-distribution-button:focus-visible,
.account-balance-stats button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--focus);
}

.auth-body {
  background:
    linear-gradient(145deg, rgba(247, 243, 250, 0.92), rgba(255, 249, 234, 0.62)),
    var(--stone-50);
}

.auth-shell {
  width: min(450px, 100%);
}

.auth-panel {
  overflow: hidden;
  border-color: rgba(89, 48, 134, 0.12);
  border-radius: 18px;
  padding: 30px;
  background: var(--stone-25);
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  color: var(--brand-950);
  font-size: 32px;
  letter-spacing: 0;
}

.brand-row {
  gap: 10px;
}

.brand-logo {
  display: block;
  width: 154px;
  max-width: min(154px, 100%);
  height: auto;
  flex: 0 0 auto;
}

.auth-panel .brand-logo {
  width: 184px;
}

.brand-name {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-left: 1px solid rgba(89, 48, 134, 0.18);
  padding-left: 10px;
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.login-form input,
.month-picker input,
.field input,
.field select {
  min-height: 44px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: var(--stone-0);
  color: var(--text);
}

.login-form input:focus,
.month-picker input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-200);
}

.login-form button {
  min-height: 46px;
  border-radius: 11px;
  background: var(--brand-600);
  color: #ffffff;
}

.login-form button:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
}

.form-error {
  border: 1px solid rgba(184, 77, 74, 0.22);
  background: var(--negative-soft);
  color: var(--negative-strong);
}

.sidebar,
.cash-plan-body .sidebar {
  border-right: 0;
  background: var(--stone-950);
  color: #ffffff;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar .brand-row,
.cash-plan-body .sidebar .brand-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.sidebar .brand-logo,
.cash-plan-body .sidebar .brand-logo {
  width: 168px;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 252, 248, 0.97);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.sidebar .brand-name,
.cash-plan-body .sidebar .brand-name {
  grid-column: 1;
  width: max-content;
  min-height: 22px;
  border-left: 0;
  padding: 2px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(209, 161, 58, 0.12);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.sidebar-mode-toggle,
.cash-plan-body .sidebar-mode-toggle {
  grid-column: 2;
  grid-row: 1 / span 2;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.sidebar-mode-toggle:hover,
.sidebar-mode-toggle:focus-visible,
.cash-plan-body .sidebar-mode-toggle:hover,
.cash-plan-body .sidebar-mode-toggle:focus-visible {
  border-color: rgba(209, 161, 58, 0.48);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-list {
  gap: 6px;
  margin-top: 28px;
}

.nav-item,
.cash-plan-body .nav-item {
  position: relative;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.nav-item:hover,
.cash-plan-body .nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active,
.cash-plan-body .nav-item.active {
  color: #ffffff;
  border-color: rgba(209, 161, 58, 0.18);
  background: rgba(209, 161, 58, 0.16);
  box-shadow: inset 3px 0 0 var(--gold-400);
}

.cash-plan-body .nav-item.active::before {
  display: none;
}

.nav-item.muted,
.cash-plan-body .nav-item.muted {
  display: none;
}

.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-logo,
.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-name,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-logo,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-name,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .brand-logo,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .brand-name {
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar .brand-logo,
.sidebar-auto-hide.sidebar-rail-hovered .sidebar:not(:hover):not(:focus-within) .brand-logo,
.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar .brand-logo,
.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar:not(:hover):not(:focus-within) .brand-logo {
  width: 168px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar .brand-name,
.sidebar-auto-hide.sidebar-rail-hovered .sidebar:not(:hover):not(:focus-within) .brand-name,
.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar .brand-name,
.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar:not(:hover):not(:focus-within) .brand-name {
  width: max-content;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.workspace {
  background: transparent;
}

.topbar {
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow,
.cash-plan-body .eyebrow,
.panel-kicker {
  color: var(--brand-600);
  letter-spacing: 0.08em;
}

.eyebrow::before,
.cash-plan-body .eyebrow::before {
  background: var(--gold-400);
}

.topbar h1,
.cash-plan-body .topbar h1 {
  color: var(--brand-950);
  letter-spacing: 0;
}

.topbar-subtitle,
.status-row,
.cash-plan-body .topbar-updated {
  color: var(--muted);
}

.toolbar,
.cash-plan-body .cash-plan-controls {
  border: 1px solid rgba(89, 48, 134, 0.10);
  border-radius: 14px;
  padding: 6px;
  background: rgba(255, 252, 248, 0.78);
  box-shadow: var(--shadow-soft);
}

.secondary-button,
.cash-plan-body .secondary-button,
.segmented-control,
.cash-plan-body .icon-button,
.weekly-receipts-nav button,
.weekly-distribution-button,
.cash-plan-body .cash-plan-tab,
.summary-hotspot,
.account-balance-stats button,
.weekly-receipt-toggle {
  border-radius: 10px;
}

.secondary-button,
.cash-plan-body .secondary-button {
  border-color: var(--line);
  background: var(--stone-0);
  color: var(--text);
}

.secondary-button:hover,
.cash-plan-body .secondary-button:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
  color: var(--brand-700);
}

#refreshButton,
.login-form button {
  background: var(--brand-600);
  color: #ffffff;
}

#refreshButton:hover {
  background: var(--brand-700);
}

.segmented-control {
  border-color: var(--line);
  background: var(--stone-100);
}

.segmented-control button {
  border-radius: 8px;
  color: var(--muted);
}

.segmented-control button.active {
  background: var(--stone-0);
  color: var(--brand-700);
  box-shadow: 0 8px 18px rgba(33, 27, 38, 0.08);
}

.panel,
.pl-panel,
.metric-card,
.model-card,
.admin-summary,
.project-detail,
.empty-state.slim,
.table-wrap,
.cash-plan-body .account-balance-panel,
.cash-plan-body .general-settlement-panel,
.cash-plan-body .planned-summary-board,
.cash-plan-body .cash-plan-loading,
.cash-control-section,
.cash-control-card,
.quality-control-panel,
.control-document-panel,
.weekly-receipt-day,
.weekly-distribution-day {
  border-color: rgba(89, 48, 134, 0.12);
  border-radius: 14px;
  background: var(--stone-25);
  box-shadow: var(--shadow-soft);
}

.panel,
.pl-panel {
  overflow: hidden;
}

.panel-head,
.direction-head,
.cash-plan-body .planned-summary-head,
.cash-plan-body .account-balance-head,
.cash-plan-body .general-settlement-head,
.tree-head,
th {
  background:
    linear-gradient(90deg, rgba(255, 252, 248, 0.96), rgba(247, 243, 250, 0.96));
}

.panel-head h2,
.section-head h2,
.cash-control-head h2,
.quality-control-head h2,
.weekly-receipts-head h2,
.summary-modal-head h2 {
  color: var(--brand-950);
}

.metric-card {
  border-top: 0;
  position: relative;
  background: var(--stone-0);
}

.metric-card::before,
.model-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--brand-600);
}

.metric-card.good::before,
.model-card.good::before,
.model-card:not(.watch):not(.neutral):not(.reinvestment)::before {
  background: var(--positive);
}

.metric-card.watch::before,
.model-card.watch::before {
  background: var(--negative);
}

.metric-card.neutral::before,
.model-card.neutral::before,
.model-card.reinvestment::before {
  background: var(--brand-600);
}

.metric-card.good,
.metric-card.watch,
.metric-card.neutral,
.model-card,
.model-card.watch,
.model-card.neutral,
.model-card.reinvestment {
  border-top: 1px solid rgba(89, 48, 134, 0.12);
}

.model-card {
  position: relative;
  overflow: hidden;
}

.metric-card > span,
.summary-number strong,
.model-main-value strong,
.admin-summary > strong,
.project-summary-line strong,
.cash-plan-body .account-balance-head h2,
.cash-plan-body .planned-summary-result strong,
.cash-plan-body .planned-flow-head strong {
  color: var(--brand-950);
}

.metric-chip,
.comparison-pill,
.model-metrics span,
.model-specials span,
.summary-number,
.summary-modal-metrics span,
.summary-modal-row-values span,
.loan-counterparty-metrics span,
.weekly-distribution-metrics span,
.cash-plan-body .account-balance-stats span,
.cash-plan-body .account-balance-stats button,
.cash-plan-body .account-currency-strip span,
.cash-plan-body .closed-period-metrics span,
.cash-plan-body .planned-flow-segment,
.cash-plan-body .cash-bridge-net {
  border-color: rgba(89, 48, 134, 0.11);
  background: rgba(255, 255, 255, 0.74);
}

.cash-plan-body .account-balance-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cash-plan-body .account-balance-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  justify-content: stretch;
  min-height: 82px;
  border: 1px solid rgba(89, 48, 134, 0.11);
  border-radius: 18px;
  padding: 14px 18px;
  background: var(--stone-25);
  box-shadow: var(--shadow-soft);
}

.cash-plan-body .account-balance-head > div:first-child {
  container-type: inline-size;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.cash-plan-body .account-balance-kicker {
  justify-self: start;
}

.cash-plan-body .account-balance-head h2 {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(34px, 10cqi, 46px);
}

.cash-plan-body .account-balance-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.cash-plan-body .account-balance-stats button {
  min-width: 118px;
  min-height: 48px;
  align-content: center;
  gap: 2px;
  border-radius: 12px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: none;
}

@media (max-width: 760px) {
  .cash-plan-body .account-balance-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .cash-plan-body .account-balance-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .cash-plan-body .account-balance-stats button {
    min-width: 0;
    min-height: 48px;
  }
}

.summary-hero {
  border-color: rgba(89, 48, 134, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 252, 248, 0.98), rgba(247, 243, 250, 0.96));
  box-shadow: var(--shadow);
}

.summary-hero.good {
  box-shadow: inset 4px 0 0 var(--positive), var(--shadow);
}

.summary-hero.watch {
  box-shadow: inset 4px 0 0 var(--negative), var(--shadow);
}

.summary-status,
.cash-control-status,
.quality-control-status,
.badge,
.status-row span:first-child,
.cash-plan-body .planned-summary-kicker,
.cash-plan-body .account-balance-kicker,
.cash-plan-body .general-settlement-head span,
.cash-plan-body .closed-period-head > div:first-child > span {
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-700);
}

.summary-insight.good,
.comparison-pill.good strong,
.metric-chip.good b,
.inline-impact.good,
.amount-positive,
.cash-plan-body .planned-flow-values .good strong,
.cash-plan-body .planned-flow-segment-values .good strong,
.cash-plan-body .general-settlement-result.good strong,
.cash-plan-body .general-settlement-row.good strong,
.summary-modal-metrics strong.good,
.loan-counterparty-main b.good,
.loan-counterparty-metrics strong.good {
  color: var(--positive);
}

.summary-insight.watch,
.comparison-pill.watch strong,
.metric-chip.watch b,
.inline-impact.watch,
.amount-negative,
.cash-plan-body .planned-flow-status.watch,
.cash-plan-body .planned-flow-values .watch strong,
.cash-plan-body .planned-summary-result em.watch,
.cash-plan-body .general-settlement-result.watch strong,
.cash-plan-body .general-settlement-row.watch strong,
.summary-modal-metrics strong.watch,
.loan-counterparty-main b.watch,
.loan-counterparty-metrics strong.watch {
  color: var(--negative);
}

.comparison-pill.neutral strong,
.metric-chip.neutral b,
.inline-impact.neutral,
.cash-plan-body .planned-flow-status.neutral,
.cash-plan-body .planned-flow-values .neutral strong,
.cash-plan-body .planned-flow-segment-values .neutral strong,
.summary-modal-metrics strong.neutral {
  color: var(--brand-600);
}

.trend-legend .revenue,
.trend-stack .revenue,
.badge.inflow,
.cash-plan-body .badge.inflow,
.weekly-receipt-kind.actual,
.weekly-distribution-week-track i.fact,
.weekly-distribution-fill.fact {
  color: var(--positive);
}

.trend-stack .revenue,
.waterfall-track i,
.weekly-distribution-week-track i.fact,
.weekly-distribution-fill.fact,
.cash-plan-body .cash-bridge-segment.inflow,
.cash-plan-body .planned-flow-lane.inflow .planned-bullet-bar,
.cash-plan-body .planned-flow-segment-bar {
  background: var(--positive);
}

.trend-legend .cost,
.badge.outflow,
.cash-plan-body .badge.outflow,
.weekly-receipt-kind.planned {
  color: var(--gold-700);
}

.trend-stack .cost,
.waterfall-row.negative .waterfall-track i,
.cash-plan-body .cash-bridge-segment.outflow,
.cash-plan-body .planned-flow-lane.outflow .planned-bullet-bar,
.weekly-distribution-week-track i.plan,
.weekly-distribution-fill.plan {
  background: var(--gold-400);
}

.trend-legend .profit,
.trend-stack .profit,
.waterfall-row.total .waterfall-track i {
  color: var(--brand-600);
  background: var(--brand-600);
}

.cash-plan-body {
  --bg: var(--stone-50);
  --surface: var(--stone-25);
  --surface-soft: var(--stone-100);
  --text: var(--stone-900);
  --muted: var(--stone-600);
  --line: var(--stone-200);
  --teal: var(--positive);
  --teal-soft: var(--positive-soft);
  --blue: var(--brand-600);
  --blue-soft: var(--brand-100);
  --amber: var(--gold-400);
  --amber-soft: var(--gold-50);
  --red: var(--negative);
  --red-soft: var(--negative-soft);
  --shadow: var(--shadow-soft);
}

.cash-plan-body .cash-plan-tabs {
  border-bottom-color: rgba(89, 48, 134, 0.12);
}

.cash-plan-body .cash-plan-tab {
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
}

.cash-plan-body .cash-plan-tab:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.cash-plan-body .cash-plan-tab.active {
  color: var(--brand-800);
}

.cash-plan-body .cash-plan-tab.active::after {
  background: var(--gold-400);
}

.cash-plan-body .icon-button {
  border-color: transparent;
  color: var(--brand-600);
}

.cash-plan-body .icon-button:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
}

.cash-plan-body .account-balance-panel,
.cash-plan-body .weekly-receipts-section {
  border-bottom-color: rgba(89, 48, 134, 0.12);
}

.cash-plan-body .account-balance-body,
.cash-plan-body .payment-breakdown,
.cash-plan-body .tree-children,
.cash-plan-body .summary-hotspot:hover,
.cash-plan-body .article-group summary:hover,
.cash-plan-body .article-group[open] summary,
.cash-plan-body .project-summary-line,
.cash-plan-body .project-detail,
.cash-plan-body .empty-state.slim,
.project-breakdown-row.residual,
.outflow-breakdown-body,
.outflow-budget-head,
.outflow-nested-list header,
.project-breakdown-planline,
.weekly-distribution-day.empty {
  background: var(--brand-50);
}

.cash-plan-body .account-list,
.cash-plan-body .general-settlement-grid,
.cash-plan-body .planned-summary-visual,
.cash-plan-body .cash-bridge-panel,
.cash-plan-body .planned-flow-lanes,
.cash-plan-body .planned-flow-lane,
.summary-modal-row,
.project-breakdown-group,
.loan-counterparty-row,
.outflow-breakdown-item,
.outflow-nested-list,
.outflow-budget-list {
  background: var(--stone-0);
}

.cash-plan-body .planned-flow-lane.inflow,
.project-breakdown-group.actual,
.cash-plan-body .direction-section.inflow,
.cash-plan-body .account-list-primary {
  box-shadow: inset 3px 0 0 var(--positive), var(--shadow-soft);
}

.cash-plan-body .planned-flow-lane.outflow,
.project-breakdown-group.overpaid,
.cash-plan-body .direction-section.outflow {
  box-shadow: inset 3px 0 0 var(--gold-400), var(--shadow-soft);
}

.project-breakdown-group.remaining,
.cash-plan-body .account-balance-panel.empty {
  box-shadow: inset 3px 0 0 var(--brand-600), var(--shadow-soft);
}

.cash-alert,
.quality-control-warning {
  border-color: rgba(184, 77, 74, 0.22);
  border-left-color: var(--negative);
  background: var(--negative-soft);
}

.summary-modal-backdrop {
  background: rgba(23, 18, 27, 0.58);
  backdrop-filter: blur(8px);
}

.summary-modal-panel {
  border-color: rgba(89, 48, 134, 0.18);
  border-radius: 18px;
  background: var(--stone-25);
  box-shadow: 0 28px 80px rgba(23, 18, 27, 0.34);
}

.summary-modal-head {
  border-bottom-color: rgba(89, 48, 134, 0.12);
  background: rgba(255, 252, 248, 0.94);
  backdrop-filter: blur(14px);
}

.summary-modal-head span,
.project-payment-tooltip > strong {
  color: var(--brand-600);
}

.summary-modal-close {
  border-color: rgba(89, 48, 134, 0.14);
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-800);
}

.summary-modal-close:hover {
  border-color: var(--brand-300);
  background: var(--brand-100);
}

.project-payment-tooltip {
  border-color: rgba(89, 48, 134, 0.20);
  border-radius: 12px;
  background: var(--stone-0);
  box-shadow: 0 22px 48px rgba(33, 27, 38, 0.22);
}

.table-wrap {
  border-radius: 14px;
  background: var(--stone-0);
}

th {
  color: var(--muted);
}

tbody tr:hover,
.management-table .total-row td {
  background: var(--brand-50);
}

.payment-empty,
.empty-state {
  color: var(--muted);
}

@media (max-width: 760px) {
  .sidebar,
  .cash-plan-body .sidebar {
    background: var(--stone-950);
  }

  .sidebar .brand-row,
  .cash-plan-body .sidebar .brand-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar .brand-logo,
  .cash-plan-body .sidebar .brand-logo {
    width: 168px;
  }

  .sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-logo,
  .sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-logo,
  .sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .brand-logo,
  .sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-name,
  .sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-name,
  .sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .brand-name {
    width: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .brand-name {
    width: max-content;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .cash-plan-body .cash-plan-controls {
    box-shadow: none;
  }
}

/*
 * Layout stability contract.
 * Keep this layer after visual theme overrides so future design-code edits
 * cannot reintroduce overflowing grids, misaligned controls, or uneven cards.
 */
:where(
  .workspace,
  .topbar,
  .toolbar,
  .status-row,
  .panel,
  .pl-panel,
  .panel-head,
  .section-head,
  .metric-grid,
  .metric-card,
  .content-grid,
  .pl-analysis-grid,
  .model-grid,
  .model-card,
  .summary-hero,
  .summary-strip,
  .variance-grid,
  .driver-grid,
  .admin-summary,
  .table-wrap,
  .cash-plan-tab-panel,
  .cash-plan-tabs,
  .cash-plan-tablist,
  .account-balance-panel,
  .account-balance-head,
  .account-balance-stats,
  .general-settlement-panel,
  .general-settlement-head,
  .general-settlement-grid,
  .pff-hero,
  .pff-source-strip,
  .pff-summary-grid,
  .pff-summary-card,
  .pff-key-section,
  .pff-section-head,
  .pff-key-groups,
  .pff-key-grid,
  .pff-key-card,
  .pff-detail-grid,
  .pff-section,
  .pff-section-title,
  .pff-article-row,
  .pff-detail-table,
  .pff-detail-row,
  .weekly-receipts-section,
  .weekly-receipts-head,
  .weekly-receipts-grid,
  .weekly-receipt-day,
  .planned-summary-board,
  .planned-flow-lanes,
  .planned-flow-lane,
  .planned-flow-head,
  .planned-flow-values,
  .planned-flow-segments,
  .planned-flow-segment,
  .planned-flow-segment-values,
  .cash-control-section,
  .cash-control-grid,
  .cash-control-card,
  .cash-control-metrics,
  .quality-control-panel,
  .quality-control-grid,
  .quality-control-row,
  .summary-modal-panel,
  .summary-modal-head,
  .summary-modal-metrics,
  .summary-modal-list,
  .outflow-breakdown-item,
  .outflow-budget-row,
  .loan-counterparty-row
) {
  min-width: 0;
  max-width: 100%;
}

:where(
  .topbar,
  .panel-head,
  .section-head,
  .status-row,
  .weekly-receipts-head,
  .pff-summary-card header,
  .pff-key-card header,
  .pff-section-title,
  .planned-flow-head,
  .cash-bridge-head,
  .summary-modal-head,
  .loan-counterparty-main
) {
  align-items: center;
}

:where(
  .toolbar,
  .cash-plan-body .cash-plan-controls,
  .weekly-receipts-actions,
  .weekly-receipts-nav,
  .planned-summary-footnote,
  .summary-meta,
  .planned-bullet-caption,
  .cash-bridge-meta
) {
  align-items: center;
  min-width: 0;
}

:where(
  .toolbar,
  .cash-plan-body .cash-plan-controls,
  .weekly-receipts-actions,
  .planned-summary-footnote,
  .summary-meta
) > * {
  min-width: 0;
}

:where(
  .metric-grid,
  .pl-highlights,
  .content-grid,
  .pl-analysis-grid,
  .model-grid,
  .variance-grid,
  .driver-grid,
  .cash-control-grid,
  .quality-control-grid,
  .general-settlement-grid,
  .pff-summary-grid,
  .pff-key-grid,
  .pff-detail-grid,
  .pff-summary-values,
  .pff-row-values,
  .pff-detail-row,
  .account-balance-stats,
  .planned-flow-values,
  .planned-flow-segments,
  .planned-flow-segment-values,
  .summary-modal-metrics,
  .loan-counterparty-metrics
) {
  align-items: stretch;
}

:where(
  .metric-card,
  .model-card,
  .cash-control-card,
  .quality-control-panel,
  .weekly-receipt-day,
  .pff-summary-card,
  .pff-key-card,
  .pff-section,
  .planned-flow-segment,
  .summary-modal-metrics span,
  .loan-counterparty-metrics span
) {
  align-content: start;
}

:where(
  .topbar h1,
  .panel-head h2,
  .section-head h2,
  .weekly-receipts-head h2,
  .cash-control-head h2,
  .quality-control-head h2,
  .summary-modal-head h2
) {
  overflow-wrap: anywhere;
}

:where(
  .metric-card > span,
  .summary-number strong,
  .model-main-value strong,
  .admin-summary > strong,
  .project-summary-line strong,
  .account-balance-head h2,
  .general-settlement-result strong,
  .general-settlement-row strong,
  .pff-summary-card header strong,
  .pff-key-card header b,
  .pff-summary-values b,
  .pff-row-values b,
  .pff-section-title strong,
  .pff-article-row summary b,
  .pff-detail-row b,
  .planned-flow-head strong,
  .planned-flow-values strong,
  .planned-flow-segment-head strong,
  .planned-flow-segment-values strong,
  .cash-control-card strong,
  .cash-control-metrics b,
  .quality-control-metrics b,
  .quality-control-amount,
  .summary-modal-metrics strong,
  .summary-modal-row-values b
) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-card,
.model-metrics span,
.model-specials span {
  container-type: inline-size;
}

.metric-card > span {
  font-size: 22px;
  font-size: clamp(19px, 12cqi, 30px);
}

.model-metrics b,
.model-specials b {
  font-size: 12px;
  font-size: clamp(11px, 14cqi, 13px);
}

.weekly-receipts-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  contain: inline-size;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.weekly-receipts-grid > * {
  min-width: 0;
}

/* Sidebar brand header polish. */
.sidebar,
.cash-plan-body .sidebar {
  --sidebar-light-zone: clamp(88px, 13vh, 108px);
  padding: 0 12px 18px;
  background:
    linear-gradient(
      180deg,
      var(--stone-25) 0,
      var(--stone-25) var(--sidebar-light-zone),
      #d1a13a var(--sidebar-light-zone),
      #d1a13a calc(var(--sidebar-light-zone) + 2px),
      #65408b calc(var(--sidebar-light-zone) + 3px),
      #3d2b52 calc(var(--sidebar-light-zone) + 24px),
      var(--stone-950) calc(var(--sidebar-light-zone) + 46px),
      var(--stone-950) 100%
    );
}

.sidebar .brand-row,
.cash-plan-body .sidebar .brand-row {
  position: relative;
  min-height: var(--sidebar-light-zone);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  grid-template-rows: auto;
  gap: 8px;
  align-items: center;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 6px;
  background: transparent;
  box-shadow: none;
}

.sidebar .brand-logo,
.cash-plan-body .sidebar .brand-logo {
  grid-column: 1;
  grid-row: 1;
  width: min(174px, 100%);
  max-width: min(174px, 100%);
  min-width: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar .brand-name,
.cash-plan-body .sidebar .brand-name {
  position: absolute;
  top: calc(var(--sidebar-light-zone) + 10px);
  left: 8px;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  min-height: 20px;
  border-left: 0;
  border-radius: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-mode-toggle,
.cash-plan-body .sidebar-mode-toggle {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  width: 30px;
  height: 30px;
  margin-left: 0;
  border-color: rgba(89, 48, 134, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(89, 48, 134, 0.72);
  box-shadow:
    0 8px 22px rgba(33, 27, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.sidebar-mode-icon,
.cash-plan-body .sidebar-mode-icon {
  width: 14px;
  height: 13px;
  border-width: 1.5px;
  border-radius: 4px;
}

.sidebar-mode-icon::before,
.cash-plan-body .sidebar-mode-icon::before {
  top: 1px;
  bottom: 1px;
  left: 4px;
  width: 1.3px;
  border-radius: 99px;
  opacity: 0.66;
}

.sidebar-mode-icon::after,
.cash-plan-body .sidebar-mode-icon::after {
  top: 3px;
  right: 2.5px;
  width: 3.5px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: currentColor;
  opacity: 0.58;
  transform: none;
}

.sidebar-pinned .sidebar-mode-icon::after,
.cash-plan-body.sidebar-pinned .sidebar-mode-icon::after {
  right: 2px;
  transform: none;
}

.sidebar-mode-toggle:hover,
.sidebar-mode-toggle:focus-visible,
.cash-plan-body .sidebar-mode-toggle:hover,
.cash-plan-body .sidebar-mode-toggle:focus-visible {
  border-color: rgba(89, 48, 134, 0.34);
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-800);
  transform: translateY(-1px);
}

.sidebar .nav-list,
.cash-plan-body .sidebar .nav-list {
  margin-top: clamp(118px, calc(var(--sidebar-light-zone) + 28px), 146px);
}

.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .brand-row,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .brand-row {
  padding-inline: 6px;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 760px) {
  .sidebar,
  .cash-plan-body .sidebar {
    padding: 14px 16px;
    background:
      linear-gradient(
        180deg,
        var(--stone-25) 0,
        var(--stone-25) 98px,
        rgba(209, 161, 58, 0.92) 98px,
        rgba(209, 161, 58, 0.92) 100px,
        var(--stone-950) 124px,
        var(--stone-950) 100%
      );
  }

  .sidebar .brand-row,
  .cash-plan-body .sidebar .brand-row {
    grid-template-columns: minmax(0, 1fr);
    min-height: 74px;
    margin-bottom: 28px;
    padding: 0;
  }

  .sidebar .brand-logo,
  .cash-plan-body .sidebar .brand-logo {
    width: min(184px, 100%);
    max-width: min(184px, 100%);
  }

  .sidebar .nav-list,
  .cash-plan-body .sidebar .nav-list {
    margin-top: 36px;
  }

  .weekly-receipts-grid {
    scroll-snap-type: x proximity;
  }

  .weekly-receipts-grid > * {
    scroll-snap-align: start;
  }

  .tree-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .cash-plan-body .account-balance-head {
    grid-template-columns: 1fr;
  }

  .cash-plan-body .account-balance-stats button {
    min-height: 48px;
  }
}

.sidebar,
.cash-plan-body .sidebar,
.users-body .sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-account {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.18);
  transition: opacity 160ms ease, transform 160ms ease, width 160ms ease;
}

.sidebar-account-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  background: transparent;
}

.sidebar-account-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13.5px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-role {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11.5px;
  font-weight: 620;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12.5px;
  font-weight: 720;
  letter-spacing: 0;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  color: #ffffff;
  border-color: rgba(209, 161, 58, 0.36);
  background: rgba(209, 161, 58, 0.11);
  outline: 0;
}

.sidebar-auto-hide .sidebar:not(:hover):not(:focus-within) .sidebar-account,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar .sidebar-account,
.sidebar-auto-hide.sidebar-force-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-account {
  width: 0;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.sidebar-auto-hide.sidebar-rail-hovered .sidebar .sidebar-account,
.sidebar-auto-hide:has(.sidebar-hover-zone:hover) .sidebar .sidebar-account,
.sidebar-auto-hide .sidebar:hover .sidebar-account,
.sidebar-auto-hide .sidebar:focus-within .sidebar-account {
  width: 100%;
  padding-inline: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.18);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-auto-hide.sidebar-rail-hovered:not(.sidebar-force-collapsed) .sidebar:not(:hover):not(:focus-within) .sidebar-account,
.sidebar-auto-hide:not(.sidebar-force-collapsed):has(.sidebar-hover-zone:hover) .sidebar:not(:hover):not(:focus-within) .sidebar-account {
  width: 100%;
  padding-inline: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.18);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.users-workspace {
  display: grid;
  gap: 18px;
  align-content: start;
}

.users-access-note {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.users-access-note strong {
  color: var(--text);
  white-space: nowrap;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}

.user-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.user-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.user-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.22;
}

.user-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.access-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.user-access {
  display: grid;
  gap: 6px;
}

.user-access span,
.credential-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.credential-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.credential-box div {
  display: grid;
  gap: 4px;
}

.credential-box strong {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-credentials-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.copy-credentials-button:hover,
.copy-credentials-button:focus-visible,
.copy-credentials-button.copied {
  background: #126a62;
  outline: 0;
}

@media (max-width: 760px) {
  .users-access-note,
  .user-card-head,
  .credential-box {
    grid-template-columns: 1fr;
  }

  .users-access-note {
    display: grid;
  }
}

.receivables-workspace {
  display: grid;
  gap: 14px;
  align-content: start;
}

.receivables-topbar .topbar-subtitle {
  max-width: 760px;
}

.receivables-dashboard {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.receivables-tabs,
.receivables-tab-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.receivables-tab-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  border-bottom: 1px solid rgba(89, 48, 134, 0.08);
  padding-bottom: 8px;
}

.receivables-tab-button {
  appearance: none;
  min-height: 34px;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--blue);
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

.receivables-tab-button:hover,
.receivables-tab-button:focus-visible {
  border-color: rgba(89, 48, 134, 0.28);
  background: #fbf8ff;
  outline: 0;
}

.receivables-tab-button.active {
  border-color: rgba(42, 133, 101, 0.32);
  color: var(--teal);
  background: var(--teal-soft);
}

.receivables-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
  gap: 10px;
  min-width: 0;
}

.receivables-kpi-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.receivables-kpi-card span,
.receivables-kpi-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.receivables-kpi-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-kpi-card.good strong {
  color: var(--teal);
}

.receivables-kpi-card.caution strong {
  color: var(--amber);
}

.receivables-kpi-card.watch strong {
  color: var(--red);
}

.receivables-section-head {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-bottom: 10px;
}

.receivables-section-head span {
  width: max-content;
  max-width: 100%;
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 11px;
  font-weight: 760;
}

.receivables-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.16;
}

.receivables-section-head p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.receivables-flow-panel,
.receivables-analytics-section,
.receivables-tools-section,
.receivables-overview-section,
.receivables-category-section {
  min-width: 0;
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  padding-top: 14px;
}

.receivables-flow-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.receivables-flow-lanes .planned-flow-lane {
  min-width: 0;
}

.receivables-scope-grid,
.receivables-benchmark-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin-bottom: 12px;
}

.receivables-scope-grid .receivables-benchmark-card {
  background: #fbf8ff;
}

.receivables-category-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin-bottom: 12px;
}

.receivables-benchmark-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.receivables-benchmark-card span,
.receivables-benchmark-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.receivables-benchmark-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 19px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-benchmark-card.good strong {
  color: var(--teal);
}

.receivables-benchmark-card.caution strong {
  color: var(--amber);
}

.receivables-benchmark-card.watch strong {
  color: var(--red);
}

.receivables-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
}

.receivables-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
}

.receivables-aging-panel,
.receivables-risk-panel,
.receivables-matrix-panel,
.receivables-owner-overview-panel,
.receivables-shift-panel,
.receivables-schedule-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.receivables-aging-panel > header,
.receivables-risk-panel > header,
.receivables-matrix-panel > header,
.receivables-owner-overview-panel > header,
.receivables-shift-panel > header,
.receivables-schedule-panel > header {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
}

.receivables-aging-panel > header span,
.receivables-risk-panel > header span,
.receivables-matrix-panel > header span,
.receivables-owner-overview-panel > header span,
.receivables-shift-panel > header span,
.receivables-schedule-panel > header span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivables-aging-panel > header strong,
.receivables-risk-panel > header strong,
.receivables-matrix-panel > header strong,
.receivables-owner-overview-panel > header strong,
.receivables-shift-panel > header strong,
.receivables-schedule-panel > header strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.receivables-aging-panel > header small,
.receivables-risk-panel > header small,
.receivables-matrix-panel > header small,
.receivables-owner-overview-panel > header small,
.receivables-shift-panel > header small,
.receivables-schedule-panel > header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.receivables-aging-panel > header b,
.receivables-risk-panel > header b,
.receivables-matrix-panel > header b,
.receivables-owner-overview-panel > header b,
.receivables-shift-panel > header b,
.receivables-schedule-panel > header b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivables-aging-bars,
.receivables-risk-list,
.receivables-matrix-list,
.receivable-owner-project-list,
.receivables-owner-overview-list,
.receivables-shift-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.receivables-aging-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 8px;
  padding: 9px;
  background: #fbf8ff;
}

.receivables-aging-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivables-aging-row strong,
.receivables-aging-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-aging-row strong {
  color: var(--text);
  font-size: 13px;
}

.receivables-aging-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.receivables-aging-row b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivables-aging-row i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(89, 48, 134, 0.09);
}

.receivables-aging-row i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.receivables-aging-row.caution i em {
  background: var(--amber);
}

.receivables-aging-row.watch i em {
  background: var(--red);
}

.receivables-aging-row > small {
  justify-self: end;
}

.receivables-aging-row.caution b {
  color: var(--amber);
}

.receivables-aging-row.watch b {
  color: var(--red);
}

.receivable-risk-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbf8ff;
}

.receivable-risk-project.caution {
  border-left-color: var(--amber);
}

.receivable-risk-project.watch {
  border-left-color: var(--red);
}

.receivable-risk-project div,
.receivable-risk-project span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivable-risk-project strong,
.receivable-risk-project small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivable-risk-project strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.22;
}

.receivable-risk-project small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.receivable-risk-project b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivable-risk-project.caution b {
  color: var(--amber);
}

.receivable-risk-project.watch b {
  color: var(--red);
}

.receivables-owner-overview-row {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 0.34fr) auto;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbf8ff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.receivables-owner-overview-row:hover,
.receivables-owner-overview-row:focus-visible {
  border-color: rgba(89, 48, 134, 0.28);
  background: #ffffff;
  outline: 0;
}

.receivables-owner-overview-row > span,
.receivables-owner-overview-row > em {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-style: normal;
}

.receivables-owner-overview-row strong,
.receivables-owner-overview-row small,
.receivables-owner-overview-row em b,
.receivables-shift-project strong,
.receivables-shift-project small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-owner-overview-row strong,
.receivables-shift-project strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.22;
}

.receivables-owner-overview-row small,
.receivables-shift-project small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
}

.receivables-owner-overview-row em b {
  color: var(--blue);
  font-size: 12px;
  line-height: 1.18;
}

.receivables-owner-overview-row.good em b,
.receivables-owner-overview-row.good > b {
  color: var(--teal);
}

.receivables-owner-overview-row.caution em b,
.receivables-owner-overview-row.caution > b {
  color: var(--amber);
}

.receivables-owner-overview-row.watch em b,
.receivables-owner-overview-row.watch > b {
  color: var(--red);
}

.receivables-owner-overview-row > i {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(89, 48, 134, 0.09);
}

.receivables-owner-overview-row > i em,
.receivables-owner-overview-row > i strong {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: inherit;
}

.receivables-owner-overview-row > i em {
  background: rgba(89, 48, 134, 0.16);
}

.receivables-owner-overview-row > i strong {
  background: var(--teal);
}

.receivables-owner-overview-row.caution > i strong {
  background: var(--amber);
}

.receivables-owner-overview-row.watch > i strong {
  background: var(--red);
}

.receivables-owner-overview-row > b,
.receivables-shift-project b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivables-shift-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(246, 196, 55, 0.12);
}

.receivables-shift-project span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivables-shift-project b {
  color: var(--amber);
}

.receivables-matrix-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.receivables-matrix-summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbf8ff;
}

.receivables-matrix-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.receivables-matrix-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-matrix-summary strong.good {
  color: var(--teal);
}

.receivables-matrix-summary strong.watch {
  color: var(--red);
}

.receivable-owner-project-group {
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  background: #fbf8ff;
}

.receivable-owner-project-group[open] {
  background: #ffffff;
}

.receivable-owner-project-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.receivable-owner-project-group summary::-webkit-details-marker {
  display: none;
}

.receivable-owner-project-group summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivable-owner-project-group summary strong,
.receivable-owner-project-group summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivable-owner-project-group summary strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.receivable-owner-project-group summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.receivable-owner-project-group summary b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivable-owner-project-group.watch summary b {
  color: var(--red);
}

.receivable-owner-project-group.caution summary b {
  color: var(--amber);
}

.receivable-owner-project-list {
  border-top: 1px solid rgba(89, 48, 134, 0.08);
  padding: 0 10px 10px;
}

.receivable-owner-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.34fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbf8ff;
}

.receivable-owner-project-row.overdue {
  border-left-color: var(--red);
}

.receivable-owner-project-row.soon {
  border-left-color: var(--amber);
}

.receivable-owner-project-row div,
.receivable-owner-project-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.receivable-owner-project-row strong,
.receivable-owner-project-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivable-owner-project-row strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.22;
}

.receivable-owner-project-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.receivable-owner-project-row span i {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(89, 48, 134, 0.09);
}

.receivable-owner-project-row span i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.receivable-owner-project-row.soon span i em {
  background: var(--amber);
}

.receivable-owner-project-row.overdue span i em {
  background: var(--red);
}

.receivable-owner-project-row b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivable-owner-project-row.soon b {
  color: var(--amber);
}

.receivable-owner-project-row.overdue b {
  color: var(--red);
}

.receivable-owner-project-more {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-schedule-scroll {
  overflow: auto;
  min-width: 0;
  max-height: min(72vh, 760px);
  padding-bottom: 2px;
  scrollbar-gutter: stable;
}

.receivables-schedule-table {
  display: grid;
  gap: 6px;
  min-width: 1100px;
}

.receivables-schedule-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) repeat(5, minmax(142px, 1fr));
  gap: 4px;
  min-width: 0;
}

.receivables-schedule-header {
  position: sticky;
  top: 0;
  z-index: 4;
  border-radius: 8px;
  padding-bottom: 4px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(41, 32, 52, 0.08);
}

.receivables-schedule-header > div {
  display: grid;
  gap: 2px;
  min-height: 42px;
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--muted);
  background: #fbf8ff;
  font-size: 10px;
  font-weight: 780;
  line-height: 1.2;
  text-transform: uppercase;
}

.receivables-schedule-header strong,
.receivables-schedule-header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-schedule-header strong {
  color: var(--text);
  font-size: 11px;
}

.receivables-schedule-header small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: none;
}

.receivables-schedule-owner {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.12);
  border-left: 4px solid rgba(89, 48, 134, 0.46);
  border-radius: 8px;
  padding: 6px;
  background: linear-gradient(90deg, #fbf8ff 0%, #ffffff 58%);
}

.receivables-schedule-owner:nth-of-type(even) {
  border-left-color: rgba(36, 127, 97, 0.42);
  background: linear-gradient(90deg, #f6fbf8 0%, #ffffff 58%);
}

.receivables-schedule-owner + .receivables-schedule-owner {
  margin-top: 4px;
}

.receivables-schedule-owner[open] {
  box-shadow: 0 7px 18px rgba(41, 32, 52, 0.06);
}

.receivables-schedule-owner summary {
  cursor: pointer;
  list-style: none;
}

.receivables-schedule-owner summary::-webkit-details-marker {
  display: none;
}

.receivables-schedule-owner-row {
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.receivables-schedule-owner.has-shifts .receivables-schedule-owner-row {
  box-shadow: inset 0 0 0 1px rgba(246, 196, 55, 0.28);
}

.receivables-schedule-projects {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-left: 8px;
  border-left: 1px dashed rgba(89, 48, 134, 0.22);
  padding: 2px 0 0 12px;
}

.receivables-schedule-project-row {
  border-left: 0;
  padding-left: 0;
}

.receivables-schedule-project-row.has-shifts {
  box-shadow: inset 3px 0 0 rgba(246, 196, 55, 0.42);
}

.receivables-schedule-name,
.receivables-schedule-cell {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 46px;
  border-radius: 8px;
  padding: 8px 9px;
}

.receivables-schedule-name {
  background: #fbf8ff;
}

.receivables-schedule-owner-row .receivables-schedule-name {
  border: 1px solid rgba(89, 48, 134, 0.1);
  background: #f0eaf6;
  box-shadow: inset 3px 0 0 rgba(89, 48, 134, 0.42);
}

.receivables-schedule-owner:nth-of-type(even) .receivables-schedule-owner-row .receivables-schedule-name {
  background: #eef8f2;
  box-shadow: inset 3px 0 0 rgba(36, 127, 97, 0.38);
}

.receivables-schedule-project-row .receivables-schedule-name {
  border: 1px solid rgba(89, 48, 134, 0.08);
  background: #ffffff;
}

.receivables-schedule-name strong,
.receivables-schedule-name small,
.receivables-schedule-cell strong,
.receivables-schedule-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-schedule-name strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.receivables-schedule-name small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
}

.receivables-schedule-cell {
  border: 1px solid rgba(89, 48, 134, 0.08);
  background: #ffffff;
}

.receivables-schedule-cell.owner {
  border-color: rgba(89, 48, 134, 0.12);
  background: rgba(251, 248, 255, 0.92);
}

.receivables-schedule-owner:nth-of-type(even) .receivables-schedule-cell.owner {
  border-color: rgba(36, 127, 97, 0.12);
  background: rgba(246, 251, 248, 0.92);
}

.receivables-schedule-owner-row .receivables-schedule-cell strong {
  font-size: 13.5px;
}

.receivables-schedule-cell.empty {
  justify-content: center;
  color: rgba(105, 99, 112, 0.58);
  font-size: 13px;
  font-weight: 760;
}

.receivables-schedule-cell strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.18;
}

.receivables-schedule-cell small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.25;
}

.receivables-schedule-cell.watch {
  border-color: rgba(221, 74, 74, 0.2);
  background: rgba(221, 74, 74, 0.07);
}

.receivables-schedule-cell.watch strong {
  color: var(--red);
}

.receivables-schedule-cell.caution {
  border-color: rgba(246, 196, 55, 0.22);
  background: rgba(246, 196, 55, 0.1);
}

.receivables-schedule-cell.caution strong {
  color: #8a6418;
}

.receivables-schedule-cell.shift {
  border-color: rgba(246, 196, 55, 0.42);
  background: rgba(246, 196, 55, 0.18);
  box-shadow: inset 3px 0 0 var(--amber);
}

.receivables-schedule-cell.shift strong {
  color: var(--amber);
}

.receivables-category-support {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 12px;
}

.receivables-category-support .receivables-matrix-panel,
.receivables-category-support .receivables-queue-panel {
  margin: 0;
}

.receivables-schedule-empty {
  min-width: 0;
}

.receivables-source-warning {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  border: 1px solid rgba(221, 74, 74, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--red);
  background: rgba(221, 74, 74, 0.08);
}

.receivables-source-warning strong,
.receivables-source-warning span {
  min-width: 0;
}

.receivables-tools-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
  min-width: 0;
}

.receivables-owner-panel,
.receivables-queue-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.receivables-owner-panel > header,
.receivables-queue-panel > header {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
}

.receivables-owner-panel > header span,
.receivables-queue-panel > header span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivables-owner-panel > header strong,
.receivables-queue-panel > header strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.receivables-owner-panel > header small,
.receivables-queue-panel > header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.receivables-owner-panel > header b,
.receivables-queue-panel > header b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivables-owner-list,
.receivables-queue-list,
.receivables-owner-modal-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.receivable-owner-card {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(89, 48, 134, 0.08);
  border-radius: 8px;
  padding: 9px;
  background: #fbf8ff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.receivable-owner-card:hover,
.receivable-owner-card:focus-visible {
  border-color: rgba(89, 48, 134, 0.28);
  background: #ffffff;
  outline: 0;
}

.receivable-owner-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivable-owner-card strong,
.receivable-owner-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivable-owner-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.receivable-owner-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.receivable-owner-card b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivable-owner-card.watch b,
.receivable-queue-row.overdue b,
.receivables-owner-modal-row.overdue b {
  color: var(--red);
}

.receivable-owner-card.caution b,
.receivable-queue-row.soon b,
.receivables-owner-modal-row.soon b {
  color: var(--amber);
}

.receivable-owner-card.good b {
  color: var(--teal);
}

.receivable-owner-card i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(89, 48, 134, 0.09);
}

.receivable-owner-card i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.receivable-owner-card.caution i em {
  background: var(--amber);
}

.receivable-owner-card.watch i em {
  background: var(--red);
}

.receivable-queue-row,
.receivables-owner-modal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-left: 3px solid rgba(89, 48, 134, 0.24);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbf8ff;
}

.receivable-queue-row.overdue,
.receivables-owner-modal-row.overdue {
  border-left-color: var(--red);
}

.receivable-queue-row.soon,
.receivables-owner-modal-row.soon {
  border-left-color: var(--amber);
}

.receivable-queue-row.planned,
.receivables-owner-modal-row.planned {
  border-left-color: var(--teal);
}

.receivable-queue-row div,
.receivables-owner-modal-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.receivable-queue-row strong,
.receivable-queue-row small,
.receivable-queue-row span,
.receivables-owner-modal-row strong,
.receivables-owner-modal-row small,
.receivables-owner-modal-row p {
  min-width: 0;
}

.receivable-queue-row strong,
.receivables-owner-modal-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivable-queue-row small,
.receivables-owner-modal-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivable-queue-row span {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--blue);
  background: #f4eff9;
  font-size: 10px;
  font-weight: 820;
}

.receivable-queue-row.overdue span {
  color: var(--red);
  background: rgba(221, 74, 74, 0.09);
}

.receivable-queue-row.soon span {
  color: #8a6418;
  background: rgba(246, 196, 55, 0.18);
}

.receivable-queue-row b,
.receivables-owner-modal-row b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receivables-owner-modal-row p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfo-dashboard {
  display: grid;
  gap: 18px;
}

.cfo-kpi-grid,
.cfo-centers-grid,
.cfo-detail-grid,
.cfo-flow-pair,
.cfo-article-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 14px;
}

.cfo-detail-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
}

.cfo-kpi-card,
.cfo-center-card,
.cfo-panel,
.cfo-article-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.cfo-kpi-card {
  min-height: 126px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.cfo-kpi-card span,
.cfo-kpi-card small,
.cfo-center-card small,
.cfo-center-card footer,
.cfo-flow-mini span,
.cfo-flow-mini small,
.cfo-panel header small,
.cfo-table small,
.cfo-article-group summary small,
.cfo-article-row small {
  color: var(--muted);
}

.cfo-kpi-card strong,
.cfo-center-card header b,
.cfo-center-card footer strong,
.cfo-flow-mini strong,
.cfo-panel header b,
.cfo-article-group summary b,
.cfo-article-row b,
.cfo-table b {
  font-variant-numeric: tabular-nums;
}

.cfo-kpi-card strong {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.05;
}

.cfo-kpi-card.good strong,
.cfo-center-card .good,
.cfo-table .good,
.cfo-article-row.good b {
  color: var(--teal);
}

.cfo-kpi-card.watch strong,
.cfo-center-card .watch,
.cfo-table .watch,
.cfo-article-row.watch b {
  color: var(--red);
}

.cfo-center-card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.cfo-center-card header,
.cfo-center-card footer,
.cfo-panel header,
.cfo-article-group summary,
.cfo-article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.cfo-center-card header span,
.cfo-panel header span,
.cfo-article-group summary span,
.cfo-article-row span,
.cfo-table td span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.cfo-center-card header strong,
.cfo-panel header strong,
.cfo-article-group summary strong,
.cfo-article-row strong,
.cfo-table td strong,
.cfo-table td span,
.cfo-table small {
  overflow-wrap: anywhere;
}

.cfo-center-card header b,
.cfo-article-group summary b {
  font-size: 1.1rem;
}

.cfo-flow-mini {
  min-height: 112px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.cfo-flow-mini.inflow {
  background: var(--teal-soft);
}

.cfo-flow-mini.outflow {
  background: var(--amber-soft);
}

.cfo-flow-mini i {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.cfo-flow-mini i em {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--teal);
}

.cfo-flow-mini i em.watch {
  background: var(--red);
}

.cfo-flow-mini i em.neutral {
  background: var(--blue);
}

.cfo-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.cfo-panel header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cfo-panel header b {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--teal);
}

.cfo-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.cfo-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.cfo-table th,
.cfo-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

.cfo-table th:first-child,
.cfo-table th:nth-child(2),
.cfo-table td:first-child,
.cfo-table td:nth-child(2) {
  text-align: left;
}

.cfo-table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cfo-table td {
  font-size: 0.9rem;
}

.cfo-article-groups {
  display: grid;
  gap: 10px;
}

.cfo-article-group {
  box-shadow: none;
}

.cfo-article-group summary {
  cursor: pointer;
  list-style: none;
  padding: 14px;
}

.cfo-article-group summary::-webkit-details-marker {
  display: none;
}

.cfo-article-columns {
  padding: 0 14px 14px;
}

.cfo-article-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.cfo-article-list h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.cfo-article-row {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

@media (max-width: 980px) {
  .cfo-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .receivables-scope-grid,
  .receivables-benchmark-grid,
  .receivables-category-kpis,
  .receivables-analytics-grid,
  .receivables-overview-grid {
    grid-template-columns: 1fr;
  }

  .receivables-tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .receivables-source-warning,
  .receivables-aging-panel > header,
  .receivables-risk-panel > header,
  .receivables-matrix-panel > header,
  .receivables-owner-overview-panel > header,
  .receivables-shift-panel > header,
  .receivables-schedule-panel > header,
  .receivables-matrix-summary,
  .receivables-aging-row,
  .receivable-risk-project,
  .receivables-owner-overview-row,
  .receivables-shift-project,
  .receivable-owner-project-group summary,
  .receivable-owner-project-row,
  .receivables-owner-panel > header,
  .receivables-queue-panel > header,
  .receivable-queue-row,
  .receivables-owner-modal-row,
  .cfo-center-card header,
  .cfo-center-card footer,
  .cfo-panel header,
  .cfo-article-group summary,
  .cfo-article-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .receivables-aging-panel > header b,
  .receivables-risk-panel > header b,
  .receivables-matrix-panel > header b,
  .receivables-owner-overview-panel > header b,
  .receivables-shift-panel > header b,
  .receivables-schedule-panel > header b,
  .receivables-aging-row b,
  .receivable-risk-project b,
  .receivables-owner-overview-row > b,
  .receivables-shift-project b,
  .receivable-owner-project-group summary b,
  .receivable-owner-project-row b,
  .receivables-owner-panel > header b,
  .receivables-queue-panel > header b,
  .receivable-queue-row b,
  .receivables-owner-modal-row b,
  .cfo-center-card header b,
  .cfo-center-card footer strong,
  .cfo-panel header b,
  .cfo-article-group summary b,
  .cfo-article-row b {
    text-align: left;
  }
}
