:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --ink: #1e293b;
  --muted: #657389;
  --line: #d9e1ea;
  --sidebar: #182231;
  --sidebar-soft: #243246;
  --green: #0f8f62;
  --green-soft: #e3f6ee;
  --red: #c43f46;
  --red-soft: #fdebed;
  --blue: #246fd3;
  --blue-soft: #e8f1ff;
  --amber: #b87812;
  --amber-soft: #fff4db;
  --shadow: 0 14px 36px rgba(31, 41, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 284px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: var(--bg);
  padding: 20px;
}

.auth-panel {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form h1 {
  margin: 0;
  font-size: 24px;
}

.auth-form p {
  margin: -4px 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  text-transform: none;
}

.auth-message {
  margin-top: 12px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 18px;
  overflow-x: visible;
  overflow-y: auto;
  background: var(--sidebar);
  color: #d7e2f1;
  padding: 18px 14px;
}

.sidebar-collapse {
  margin-top: 2px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1722;
  --surface: #182231;
  --surface-soft: #202c3d;
  --ink: #e7eef8;
  --muted: #aab8ca;
  --line: #344258;
  --sidebar: #0b121d;
  --sidebar-soft: #243246;
  --green-soft: #143c31;
  --red-soft: #49252a;
  --blue-soft: #193453;
  --amber-soft: #47371c;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .trial-banner {
  border-color: #685329;
  background: #372d1c;
  color: #f5d995;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] dialog,
:root[data-theme="dark"] table,
:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
  border-color: var(--line);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] dialog {
  background-color: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .workspace,
:root[data-theme="dark"] .module-card,
:root[data-theme="dark"] .modal-card,
:root[data-theme="dark"] .toolbar,
:root[data-theme="dark"] .date-toolbar,
:root[data-theme="dark"] .filter-panel,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .table-wrap {
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 6px 8px 14px;
  text-align: left;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #28b676;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: #9fb1c7;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item,
.nav-group summary,
.nav-group button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c7d5e6;
  padding: 0 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.nav-item svg,
.nav-group svg,
button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-item:hover,
.nav-item.active,
.nav-group summary:hover,
.nav-group button:hover,
.nav-group button.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.nav-group {
  border-radius: 8px;
}

.nav-group summary {
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group button {
  min-height: 34px;
  margin-left: 24px;
  color: #aabbd0;
  font-size: 12px;
}

.nav-subgroup {
  margin-left: 24px;
}

.nav-subgroup summary {
  min-height: 34px;
  color: #aabbd0;
  font-size: 12px;
}

.nav-subgroup button {
  margin-left: 22px;
}

.sidebar-collapsed .sidebar {
  align-items: center;
  overflow-x: visible;
  gap: 14px;
  padding-right: 13px;
  padding-left: 13px;
}

.sidebar-collapsed .brand {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.sidebar-collapsed .nav-item,
.sidebar-collapsed .nav-group summary,
.sidebar-collapsed .theme-toggle {
  width: 42px;
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
  gap: 0;
}

.sidebar-collapsed .brand > span:not(.brand-mark),
.sidebar-collapsed .nav-item,
.sidebar-collapsed .nav-group summary,
.sidebar-collapsed .theme-toggle {
  font-size: 0;
  line-height: 0;
}

.sidebar-collapsed .nav-group button,
.sidebar-collapsed .nav-group[open] button {
  display: none;
}

.sidebar-collapsed .nav-subgroup {
  display: none;
}

.sidebar-collapsed .brand small,
.sidebar-collapsed .brand strong {
  display: none;
}

.sidebar-collapsed .nav-item svg,
.sidebar-collapsed .nav-group summary svg,
.sidebar-collapsed .theme-toggle svg {
  width: 20px;
  height: 20px;
  margin: 0;
  color: #c7d5e6;
}

.sidebar-collapsed .nav-group summary {
  margin: 0;
}

.sidebar-collapsed .nav-group button {
  margin-left: 0;
}

.theme-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7e2f1;
  font-weight: 700;
}

.workspace {
  min-width: 0;
  padding: 16px 20px 28px;
}

.trial-banner {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #f0dfb7;
  border-radius: 8px;
  background: #fff8e7;
  color: #6d4a12;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.trial-banner div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trial-banner span.warning {
  color: var(--amber);
}

.topbar,
.topbar-actions,
.date-toolbar,
.period-control,
.specific-period-filter,
.filter-row,
.status-tabs {
  display: flex;
  align-items: center;
}

.topbar {
  gap: 18px;
  margin-bottom: 14px;
}

.menu-button {
  display: none;
}

.page-title {
  min-width: 210px;
}

.page-title span,
.module-heading span,
.dre-metrics span,
.balance-head,
.receivable-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-title h1,
.module-heading h2 {
  margin: 3px 0 0;
}

.page-title h1 {
  font-size: 26px;
}

.topbar-actions {
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
  gap: 8px;
}

.primary-button,
.ghost-button,
.icon-button,
.search-trigger,
.account-button,
.period-button,
.segmented-control button,
.filter-row button,
.status-tabs button,
.link-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 12px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.primary-button:hover {
  background: #0a7550;
}

.slim {
  min-height: 34px;
}

.ghost-button,
.icon-button,
.search-trigger,
.account-button,
.period-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.ghost-button:hover,
.icon-button:hover,
.search-trigger:hover,
.account-button:hover,
.period-button:hover {
  background: var(--surface-soft);
}

.link-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6d4a12;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.file-link {
  position: relative;
  overflow: hidden;
}

.file-link input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.icon-button {
  width: 40px;
  padding: 0;
}

.search-trigger {
  width: min(260px, 100%);
  justify-content: flex-start;
  color: var(--muted);
}

.search-trigger input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.account-button span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}

.date-toolbar {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.period-control {
  gap: 6px;
}

.specific-period-filter {
  flex: 1;
  gap: 8px;
  min-width: 360px;
}

.specific-period-filter label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.specific-period-filter input {
  min-height: 40px;
  width: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

body.cash-flow-view .date-toolbar {
  display: none;
}

body.cash-drawer-view .date-toolbar {
  display: none;
}

.project-registry-view .topbar-actions,
.project-registry-view .date-toolbar {
  display: none;
}

.contact-registry-view .date-toolbar {
  display: none;
}

.contact-registry-view [data-view="contacts"] .page-grid {
  grid-template-columns: minmax(0, 1fr);
}

.management-statement-view .date-toolbar {
  display: none;
}

.project-registry-view .topbar {
  margin-bottom: 16px;
}

.project-list-actions { align-items: end; }

.project-company-filter {
  position: relative;
  z-index: 3;
}

.project-company-filter summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.project-company-filter summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.project-company-filter-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 6px;
  width: 245px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-company-filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.project-company-filter-options input {
  width: auto;
  min-height: auto;
}

.project-search-trigger {
  width: min(320px, 100%);
}

.project-list-table-wrap { overflow-x: auto; }
.project-list-table { min-width: 1480px; }
.project-table-actions { justify-content: flex-end; flex-wrap: nowrap; }

.project-category-chart {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.project-category-chart-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.project-category-chart-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.project-category-chart-heading h3 { margin: 2px 0 0; font-size: 17px; }
.project-category-chart-actions { display: flex; align-items: center; gap: 14px; }
.project-category-chart-actions > strong { font-size: 14px; white-space: nowrap; }
.project-category-bars { display: grid; gap: 9px; }

.project-category-bar-row {
  display: grid;
  grid-template-columns: minmax(135px, 240px) minmax(100px, 1fr) 30px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.project-category-bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-category-bar-row > strong { text-align: right; }
.project-category-bar-track { height: 12px; overflow: hidden; border-radius: 99px; background: #dce6f3; }
.project-category-bar-fill { height: 100%; min-width: 4px; border-radius: inherit; background: #168f69; }

@media (max-width: 680px) {
  .project-category-chart-heading { align-items: flex-start; flex-direction: column; }
  .project-category-chart-actions { width: 100%; align-items: flex-start; flex-direction: column-reverse; gap: 8px; }
  .project-category-bar-row { grid-template-columns: minmax(105px, 1fr) minmax(80px, 1fr) 24px; gap: 7px; }
}

.compact-filter-button {
  min-height: 40px;
  padding: 0 10px;
}

.segmented-control {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 3px;
}

.segmented-control button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
}

.segmented-control .selected,
.status-tabs .selected,
.filter-row .selected {
  background: #1f2a3b;
  color: #fff;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.dashboard-card {
  cursor: grab;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.dashboard-card:active {
  cursor: grabbing;
}

.dashboard-card.dragging {
  opacity: 0.62;
  transform: scale(0.995);
}

.dashboard-card.drag-over {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), var(--shadow);
}

.form-panel {
  position: sticky;
  top: 16px;
}

[data-view="categories"] .page-grid {
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1.58fr);
}

[data-view="users"] .users-page-grid {
  grid-template-columns: minmax(0, 1fr);
}

.users-list-panel {
  min-height: 220px;
}

.module-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.module-heading h2 {
  font-size: 17px;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.banking-position-card,
.bank-accounts-card,
.financial-overview-card {
  grid-column: 1 / -1;
}

.projects-overview-card {
  grid-column: 1 / -1;
}

.inventory-page-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.inventory-summary-card {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.inventory-summary-card span,
.inventory-step-list small {
  color: var(--muted);
}

.inventory-summary-card span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.inventory-summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
}

.inventory-summary-card small {
  display: block;
  margin-top: 8px;
  line-height: 1.45;
}

.inventory-step-list {
  display: grid;
}

.inventory-step-list > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.inventory-step-list > div:last-child {
  border-bottom: 0;
}

.inventory-step-list span,
.inventory-step-list small {
  display: grid;
  gap: 4px;
}

.inventory-list-actions {
  align-items: center;
}

.inventory-list-actions select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-weight: 800;
}

.inventory-table td strong,
.inventory-table td small {
  display: block;
}

.inventory-table td small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.inventory-row-warning td {
  background: #fff7ed;
}

.inventory-row-warning td:first-child {
  box-shadow: inset 3px 0 0 var(--amber);
}

.projects-overview-heading { margin-bottom: 10px; }
.projects-overview { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, .85fr); gap: 12px; }
.projects-period-panel,
.projects-status-panel { border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-width: 0; }
.projects-category-panel { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-width: 0; }
.projects-category-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.projects-category-panel-heading span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.projects-category-panel-heading h3 { margin: 2px 0 0; font-size: 15px; }
.projects-category-panel-heading > strong { font-size: 12px; white-space: nowrap; }
.projects-panel-title { color: var(--ink); font-size: 13px; font-weight: 850; margin-bottom: 10px; }
.projects-period-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.projects-period-heading .projects-panel-title { margin-bottom: 0; }
.projects-period-filter { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.projects-period-filter > svg { width: 13px; height: 13px; }
.projects-period-filter input { width: 112px; min-height: 27px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); padding: 0 6px; font-size: 9px; }
.projects-period-filter button { min-height: 27px; border: 0; background: transparent; color: var(--blue); padding: 0 4px; font-size: 9px; font-weight: 800; }
.projects-chart-legend { display: flex; gap: 18px; color: var(--muted); font-size: 11px; font-weight: 750; margin-bottom: 4px; }
.projects-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.projects-chart-legend i { width: 10px; height: 10px; border-radius: 50%; }
.projects-chart-notice { display: flex; align-items: center; gap: 5px; min-height: 18px; color: var(--muted); font-size: 10px; }
.projects-chart-notice svg { width: 12px; height: 12px; flex: 0 0 auto; }
.new-project-dot { background: #9c7abd; }
.total-project-dot { background: #6ca9df; }
.projects-timeline-chart { width: 100%; overflow: hidden; }
.projects-timeline-chart svg { display: block; width: 100%; height: auto; min-height: 210px; }
.project-chart-grid line { stroke: #dce2ea; stroke-dasharray: 4 5; stroke-width: 1; }
.project-chart-area { fill: #d9ebf8; opacity: .86; }
.project-chart-bars rect { fill: #9c82bc; opacity: .9; }
.project-chart-bars text,
.project-total-label { fill: #42516e; font-size: 11px; font-weight: 850; }
.project-chart-line { fill: none; stroke: #72afe4; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.project-chart-point { fill: #fff; stroke: #72afe4; stroke-width: 2.5; }
.project-axis-label { fill: #687386; font-size: 10px; font-weight: 700; }
.projects-status-content { display: grid; grid-template-columns: minmax(0, 1fr) 145px; gap: 12px; align-items: center; min-height: 185px; }
.projects-status-content ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.projects-status-content li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }
.projects-status-content li i { width: 10px; height: 10px; border-radius: 50%; background: var(--status-color); }
.projects-status-content li strong { color: #4c5a75; }
.projects-donut { position: relative; width: 145px; height: 145px; }
.projects-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.projects-donut > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.projects-donut strong { color: #44516c; font-size: 23px; line-height: 1; }
.projects-donut span { color: var(--muted); font-size: 10px; font-weight: 800; margin-top: 5px; }
.project-forecast-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px -14px -14px; }
.project-forecast-card { border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 11px; text-align: center; min-width: 0; }
.project-forecast-card span,
.project-forecast-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-forecast-card span { color: var(--muted); font-size: 10px; font-weight: 800; }
.project-forecast-card strong { display: block; color: #465572; font-size: 15px; margin: 7px 0 4px; }
.project-forecast-card small { color: var(--muted); font-size: 10px; }
.projects-overview-empty { min-height: 230px; grid-column: 1 / -1; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); }
.projects-overview-empty svg { width: 30px; height: 30px; }
.projects-overview-empty p { margin: 0 0 4px; }
.projects-period-empty { min-height: 235px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); text-align: center; }
.projects-period-empty svg { width: 25px; height: 25px; }
.projects-period-empty span { font-size: 11px; }

.financial-overview-card .module-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.banking-position-card .module-heading small,
.bank-accounts-card .module-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.banking-period-filter { display: flex; gap: 7px; }
.banking-period-filter button { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.banking-period-filter button.selected { border-color: #1f2937; background: #1f2937; color: #fff; }
.banking-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.banking-kpis > div { min-width: 0; padding: 15px; border-radius: 16px; background: var(--surface-soft); }
.banking-kpis span, .banking-kpis small { display: block; }
.banking-kpis span { color: var(--ink); font-size: 12px; }
.banking-kpis strong { display: block; margin: 6px 0 3px; color: var(--ink); font-size: 23px; }
.banking-kpis small { color: var(--muted); font-size: 11px; }
.banking-kpis small.positive { color: var(--blue); }
.banking-kpis small.negative { color: #ea580c; }
.banking-quality-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; }
.banking-quality-row span { display: inline-flex; align-items: center; gap: 8px; }
.banking-quality-row svg { width: 17px; height: 17px; }
.bank-accounts-actions { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.bank-accounts-table-wrap { overflow-x: auto; }
.bank-accounts-table { width: 100%; min-width: 1050px; border-collapse: collapse; color: var(--ink); font-size: 12px; }
.bank-accounts-table th, .bank-accounts-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.bank-accounts-table th:first-child, .bank-accounts-table td:first-child, .bank-accounts-table th:last-child, .bank-accounts-table td:last-child { text-align: left; }
.bank-accounts-table thead th { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.bank-accounts-table tbody .positive, .bank-accounts-table tfoot th:nth-child(3), .bank-accounts-table tfoot th:nth-child(5) { color: var(--blue); }
.bank-accounts-table tbody .negative, .bank-accounts-table tfoot th:nth-child(6) { color: #ea580c; }
.bank-accounts-table tfoot th { border-bottom: 0; color: var(--ink); font-size: 12px; }
.bank-account-name { display: inline-flex; align-items: center; gap: 7px; }
.bank-account-name svg { width: 16px; height: 16px; color: var(--blue); }
.bank-reconciliation { display: inline-flex; align-items: center; gap: 7px; }
.bank-reconciliation i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; }
.bank-reconciliation.updated i { background: var(--blue); }
.cash-evolution-chart { min-height: 300px; border-bottom: 1px solid var(--line); padding: 2px 0 12px; }
.cash-evolution-chart svg { display: block; width: 100%; height: 245px; }
.evolution-grid { stroke-dasharray: none; opacity: .8; }
.evolution-area { fill: rgba(53, 150, 246, .12); }
.evolution-realized-line { stroke: #3295f6; stroke-width: 3; }
.evolution-projected-line { stroke: #f47b32; stroke-width: 3; stroke-dasharray: 8 7; }
.evolution-budget-line { stroke: #8b9098; stroke-width: 2.5; stroke-dasharray: 3 7; }
.evolution-budget-dot { background: #8b9098; }
.budget-unavailable { opacity: .68; }
.evolution-today-line { stroke: #aab3bf; stroke-width: 1; stroke-dasharray: 4 5; }
.evolution-today-label { fill: #7b8491; font-size: 10px; font-weight: 700; }
.evolution-realized-dot { background: #3295f6; }
.evolution-projected-dot { background: #f47b32; }
.evolution-realized-marker { fill: #3295f6; }
.evolution-projected-marker { fill: var(--surface); stroke: #f47b32; }
.financial-overview-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr); gap: 42px; padding-top: 22px; }
.result-summary header, .financial-agenda header { margin-bottom: 12px; }
.result-summary h3, .financial-agenda h3 { margin: 0; font-size: 16px; }
.result-summary header span, .financial-agenda header span { color: var(--muted); font-size: 11px; }
.result-summary-rows { display: grid; }
.result-summary-rows > div { display: grid; grid-template-columns: 140px minmax(100px, 1fr) auto; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid var(--line); font-size: 12px; }
.result-summary-rows i { height: 7px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.result-summary-rows b { display: block; height: 100%; border-radius: inherit; background: #3295f6; }
.result-summary-rows > div:nth-child(2) b { background: #55bb79; }
.result-summary-rows > div:nth-child(3) b { background: #f47b32; }
.result-summary-rows strong { font-size: 12px; white-space: nowrap; }
.summary-detail-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.summary-detail-link svg { width: 14px; height: 14px; }
.financial-agenda-list { display: grid; }
.financial-agenda-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid var(--line); font-size: 12px; }
.financial-agenda-row time { color: var(--muted); }
.financial-agenda-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.financial-agenda-row strong { white-space: nowrap; }
.financial-agenda-row strong.positive { color: var(--ink); }
.financial-agenda-row strong.negative { color: #ea580c; }
.financial-agenda-empty { min-height: 84px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.agenda-link { width: 100%; margin-top: 12px; }

.dre-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dre-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.dre-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.dre-metrics small {
  display: block;
  margin-top: 5px;
  font-weight: 800;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.details-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.health-state,
.empty-state {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 188px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 18px;
  text-align: center;
}

.table-empty {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 190px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 18px;
  text-align: center;
}

.table-empty[hidden] {
  display: none;
}

.table-empty > svg {
  width: 42px;
  height: 42px;
  color: var(--blue);
}

.table-empty p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.table-empty div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.compact-empty {
  min-height: 132px;
}

.health-state > svg,
.empty-state > svg {
  width: 42px;
  height: 42px;
  color: var(--green);
}

.health-state p,
.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.filter-row,
.status-tabs {
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.filter-row button,
.status-tabs button {
  min-height: 32px;
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.advanced-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.advanced-filters select {
  min-height: 36px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
}

.import-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.import-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.import-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.import-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.file-button {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.file-button:hover {
  background: #edf4fb;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.import-feedback {
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
}

.import-feedback.error {
  background: var(--red-soft);
  color: var(--red);
}

.import-feedback[hidden] {
  display: none;
}

.import-workspace { display: grid; gap: 18px; }
.import-wizard-card, .import-results-card, .import-history-card { padding: 20px; }
.import-steps { display: grid; grid-template-columns: repeat(9, minmax(110px, 1fr)); gap: 8px; margin: 18px 0; padding: 0; list-style: none; overflow-x: auto; }
.import-steps li { min-width: 110px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: var(--surface-muted); font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; }
.import-steps li.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.import-context-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.import-context-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.import-context-grid input, .import-context-grid select { width: 100%; }
.import-consolidated-toggle { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.import-consolidated-toggle input { margin-top: 3px; }
.import-consolidated-toggle span { display: grid; gap: 3px; }
.import-consolidated-toggle small { color: var(--muted); font-weight: 500; }
.import-consolidated-list { display: grid; gap: 10px; margin: 16px 0; }
.import-consolidated-item { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(110px, max-content)) auto; gap: 14px; align-items: center; width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; }
.import-consolidated-item span { display: grid; gap: 3px; }
.import-consolidated-item small { color: var(--muted); }
.import-consolidated-item .negative { color: var(--danger); }
.import-consolidated-item .positive { color: var(--success); }
.import-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.import-file-card { position: relative; display: grid; gap: 8px; min-height: 126px; padding: 18px; border: 1px dashed #94a3b8; border-radius: 12px; background: var(--surface-muted); cursor: pointer; }
.import-file-card:hover { border-color: var(--primary); background: rgba(16, 185, 129, .06); }
.import-file-card span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.import-file-card strong { font-size: 15px; overflow-wrap: anywhere; }
.import-file-card small { color: var(--muted); }
.import-file-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.import-action-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.import-action-bar p { margin: 0; color: var(--muted); }
.import-summary-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); margin: 16px 0; }
.import-summary-grid > div, .import-summary-card { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.import-summary-card { color: inherit; text-align: left; cursor: pointer; font: inherit; }
.import-summary-card:hover, .import-summary-card:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(16, 185, 129, .12); }
.import-summary-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.import-summary-grid strong { display: block; margin-top: 5px; font-size: 18px; }
.import-validation-banner { margin-bottom: 14px; padding: 14px; border-radius: 10px; background: #ecfdf5; color: #047857; font-weight: 700; }
.import-validation-banner.error { background: #fff1f2; color: #be123c; }
.import-audit-table-wrap { max-height: 440px; }
.import-history-card .stack-list > div, .import-history-card .stack-list > button { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.import-results-card button:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(.35); }
.import-apply-overlay { position: fixed; inset: 0; z-index: 1900; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .76); }
.import-apply-overlay[hidden] { display: none; }
.import-apply-dialog { display: grid; justify-items: center; width: min(560px, 100%); padding: 30px; border-radius: 18px; background: var(--surface); box-shadow: 0 28px 90px rgba(0,0,0,.36); text-align: center; }
.import-apply-dialog.success { border-top: 6px solid #059669; }
.import-apply-dialog.error { border-top: 6px solid #dc2626; }
.import-apply-spinner { width: 48px; height: 48px; margin-bottom: 14px; border: 5px solid #dbeafe; border-top-color: #0b66c3; border-radius: 50%; animation: import-apply-spin .8s linear infinite; }
.import-apply-dialog.success .import-apply-spinner, .import-apply-dialog.error .import-apply-spinner { border: 0; animation: none; }
.import-apply-dialog.success .import-apply-spinner { background: #059669; }
.import-apply-dialog.error .import-apply-spinner { background: #dc2626; }
.import-apply-dialog.success .import-apply-spinner::after, .import-apply-dialog.error .import-apply-spinner::after { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; font-size: 30px; font-weight: 900; }
.import-apply-dialog.success .import-apply-spinner::after { content: "✓"; }
.import-apply-dialog.error .import-apply-spinner::after { content: "!"; }
.import-apply-kicker { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.import-apply-dialog h2 { margin: 5px 0 8px; }
.import-apply-dialog p { max-width: 460px; margin: 0; color: var(--muted); }
.import-apply-progress { width: 100%; height: 9px; margin: 20px 0 10px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.import-apply-progress span { display: block; width: 35%; height: 100%; border-radius: inherit; background: #0b66c3; animation: import-apply-progress 1.35s ease-in-out infinite; }
.import-apply-dialog.success .import-apply-progress span { width: 100%; background: #059669; animation: none; }
.import-apply-dialog.error .import-apply-progress span { width: 100%; background: #dc2626; animation: none; }
.import-apply-elapsed { margin-bottom: 14px; font-size: 13px; }
.import-apply-summary { display: grid; grid-template-columns: 1fr auto; width: 100%; margin: 4px 0 18px; padding: 14px; border-radius: 10px; background: var(--surface-muted); text-align: left; }
.import-apply-summary dt, .import-apply-summary dd { margin: 4px 0; overflow-wrap: anywhere; }
.import-apply-summary dt { color: var(--muted); }
.import-apply-summary dd { padding-left: 14px; font-weight: 900; text-align: right; }
@keyframes import-apply-spin { to { transform: rotate(360deg); } }
@keyframes import-apply-progress { 0% { transform: translateX(-120%); } 100% { transform: translateX(330%); } }
.import-history-card .stack-list span { display: grid; gap: 4px; }
.import-history-card .stack-list span:last-child { text-align: right; }
.import-history-card .stack-list small { color: var(--muted); }
.import-steps li.completed { color: #047857; border-color: #6ee7b7; background: #ecfdf5; }
.import-review-status { display: flex; align-items: flex-start; gap: 18px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.import-review-status ul { margin: 0; color: var(--red); }
.import-review-overlay { position: fixed; inset: 0; z-index: 1600; padding: 24px; background: rgba(15, 23, 42, .72); }
.import-review-overlay[hidden] { display: none; }
.import-review-dialog { display: flex; flex-direction: column; width: min(1500px, 100%); height: calc(100vh - 48px); margin: auto; padding: 20px; overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.import-review-filters { display: grid; grid-template-columns: 1.7fr 1.1fr 1.1fr repeat(4, minmax(110px, .65fr)); gap: 10px; margin: 14px 0; }
.import-review-filters input, .import-review-filters select { width: 100%; }
.import-review-list { flex: 1; display: grid; gap: 12px; overflow: auto; padding-right: 5px; }
.import-review-record { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); }
.import-review-record > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.import-review-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.import-review-columns dl { margin: 0; padding: 12px; border-radius: 9px; background: var(--surface); }
.import-review-columns dt { margin-bottom: 7px; font-weight: 800; color: var(--muted); text-transform: uppercase; font-size: 11px; }
.import-review-columns dd { margin: 3px 0; overflow-wrap: anywhere; }
.import-candidate-list { display: grid; gap: 7px; margin: 10px 0; }
.import-candidate { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.import-candidate.tied { border-color: #d97706; background: #fff7e6; }
.import-candidate small { color: var(--muted); }
.import-inline-filter { display: flex; align-items: center; gap: 7px; min-height: 38px; font-size: 12px; font-weight: 700; }
.import-inline-filter input { width: auto; }
.import-review-actions { display: grid; grid-template-columns: minmax(250px, 1.3fr) minmax(250px, 1fr) repeat(3, auto); gap: 8px; align-items: center; }
.import-review-actions button { min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 700; }
.import-review-actions button:hover { border-color: var(--primary); color: var(--primary); }
.import-review-choice { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 2px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; font-weight: 800; }
.import-review-choice:hover { border-color: #94a3b8; }
.import-review-choice.selected { border-color: var(--primary); background: #ecfdf5; color: #047857; }
.import-review-choice input { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.import-review-save-status { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 13px; font-weight: 800; }
.import-review-save-status.success { background: #ecfdf5; color: #047857; }
.import-bulk-reclassify { display: flex; gap: 10px; padding: 10px 0; align-items: center; }
.import-bulk-reclassify input { flex: 1; min-width: 280px; }
.import-reclass-select { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; }
.import-review-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.import-review-footer > div { display: flex; align-items: center; gap: 10px; }

@media (max-width: 1100px) {
  .import-context-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .import-upload-grid { grid-template-columns: 1fr; }
  .import-summary-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .import-review-filters, .import-review-columns, .import-review-actions { grid-template-columns: 1fr; }
}

.table-wrap {
  overflow-x: auto;
}

.cash-flow-layout {
  display: grid;
  grid-template-columns: minmax(218px, 232px) minmax(0, 1fr) minmax(290px, 320px);
  gap: 8px;
  align-items: start;
}

.cash-flow-filters {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.cash-flow-filters .stack-form {
  gap: 8px;
}

.cash-flow-filters .stack-form label,
.cash-flow-filters .multi-filter > span,
.cash-flow-filters .cash-flow-preset-header span {
  font-size: 10px;
}

.cash-flow-filters .stack-form input,
.cash-flow-filters .stack-form select,
.cash-flow-filters .stack-form textarea {
  min-height: 36px;
  padding: 0 8px;
  font-size: 11px;
}

.cash-flow-layout .module-card {
  padding: 10px;
}

.cash-flow-layout .module-heading {
  gap: 8px;
  margin-bottom: 12px;
}

.cash-flow-layout .module-heading h2 {
  font-size: 16px;
}

.cash-flow-table-card {
  min-width: 0;
}

.cash-flow-table-wrap {
  max-height: 620px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cash-flow-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.cash-flow-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e5e7eb;
}

.cash-flow-table tbody tr:nth-child(odd) {
  background: #f4f7fa;
}

.cash-flow-table tbody tr:nth-child(even) {
  background: #fff;
}

.cash-flow-table tbody tr.cash-flow-opening-row {
  background: #eef2f7;
}

.cash-flow-table tbody tr.cash-flow-opening-row td {
  font-weight: 700;
}

.cash-flow-table tbody tr.cash-flow-opening-row td:nth-child(4) small {
  font-weight: 500;
}

.cash-flow-table td,
.cash-flow-table th {
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

.cash-flow-table th {
  font-weight: 700;
}

.cash-flow-table td,
.cash-flow-table th {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-table td:nth-child(4) {
  white-space: normal;
}

.cash-flow-table td:nth-child(4) strong,
.cash-flow-table td:nth-child(4) small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-table td:nth-child(4) strong {
  font-weight: 500;
}

.cash-flow-table td:nth-child(4) small {
  font-size: 10px;
}

.cash-col-date {
  width: 7%;
}

.cash-col-allocation {
  width: 15%;
}

.cash-col-id {
  width: 6%;
}

.cash-col-description {
  width: 26%;
}

.cash-col-account {
  width: 12%;
}

.cash-col-type {
  width: 7%;
}

.cash-col-amount {
  width: 8%;
}

.cash-col-balance {
  width: 11%;
}

.cash-col-actions {
  width: 8%;
}

.cash-flow-table td.actions {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: flex-start;
}

.cash-flow-table .small-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: 6px;
}

.cash-flow-table .small-icon svg {
  width: 14px;
  height: 14px;
}

.cash-flow-summary-card {
  position: sticky;
  top: 16px;
  min-width: 290px;
}

.summary-lines {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.summary-lines div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 8px;
  min-height: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 3px 4px;
  font-size: 8.5px;
  line-height: 1.15;
}

.summary-lines span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-lines strong {
  min-width: max-content;
  text-align: right;
  white-space: nowrap;
  font-size: 8.5px;
  letter-spacing: 0;
}

.summary-lines div:last-child {
  border-bottom: 0;
}

.summary-lines .summary-section {
  display: flex;
  justify-content: center;
  min-height: 24px;
  background: #eef0f2;
  color: var(--ink);
  font-weight: 800;
}

.summary-lines .summary-account-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-lines .summary-total {
  color: #fff;
  font-weight: 800;
}

.summary-lines .summary-total.positive {
  background: #3c9d42;
}

.summary-lines .summary-total.negative {
  background: #ef4f4f;
}

.summary-lines .summary-total strong {
  color: #fff;
  font-size: 8.5px;
}

.cash-flow-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cash-flow-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cash-flow-page-label {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e5e7eb;
  color: var(--ink);
  font-weight: 900;
}

.cash-flow-page-size {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.check-group {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 10px 12px 12px;
}

.check-group legend {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.check-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
}

.check-group input {
  width: 16px;
  height: 16px;
}

.multi-filter {
  position: relative;
  display: grid;
  gap: 8px;
}

.multi-filter > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.multi-filter-summary {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 7px 12px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.multi-filter-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.multi-filter.open .multi-filter-options {
  display: grid;
}

.multi-filter-placeholder {
  color: var(--ink);
}

.multi-filter-chip {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  padding: 5px 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.multi-filter-chip span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-filter-chip-remove {
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.multi-filter-chip-remove:hover {
  color: var(--danger);
}

.multi-filter-option {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.multi-filter-option:last-child {
  border-bottom: 0;
}

.multi-filter-option:hover,
.multi-filter-option.selected {
  background: #e7f0ff;
  color: var(--accent-strong);
}

.cash-flow-presets {
  display: grid;
  gap: 8px;
  margin: 2px 0 12px;
}

.cash-flow-preset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cash-flow-preset-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-flow-preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cash-flow-preset-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.cash-flow-preset-button:hover,
.cash-flow-preset-button.selected {
  border-color: var(--accent);
  background: #e7f0ff;
  color: var(--accent-strong);
}

.cash-flow-preset-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.cash-flow-preset-config {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px;
}

.cash-flow-preset-config[hidden] {
  display: none;
}

.cash-flow-preset-config p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.cash-flow-preset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  gap: 6px;
  align-items: center;
}

.cash-flow-preset-row input {
  min-width: 0;
  min-height: 32px;
  padding: 7px 8px;
  font-size: 12px;
}

.cash-flow-preset-account-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 6px;
}

.cash-flow-preset-account-list[hidden] {
  display: none;
}

.cash-flow-preset-account-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 30px;
  border-radius: 6px;
  padding: 5px 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: none;
}

.cash-flow-preset-account-option:hover {
  background: var(--surface);
}

.cash-flow-preset-account-option input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.cash-flow-preset-account-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-preset-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 8px;
}

.compact-button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

td {
  color: #263244;
  font-size: 13px;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.amount {
  text-align: right;
  font-weight: 900;
}

.actions {
  position: sticky;
  right: 0;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.transactions-table-wrap {
  overflow-x: hidden;
}

.transactions-table {
  min-width: 0;
  table-layout: fixed;
}

.transactions-table th,
.transactions-table td {
  padding: 8px 5px;
  vertical-align: middle;
}

.transactions-table th {
  font-size: 10px;
  line-height: 1.15;
}

.transactions-table td {
  font-size: 11.5px;
  line-height: 1.2;
}

.transactions-table td strong {
  font-size: 11.5px;
  line-height: 1.15;
}

.transactions-table td small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.15;
}

.transactions-table td:not(.actions):not(.amount),
.transactions-table td strong,
.transactions-table td small,
.transactions-table .tag,
.transactions-table .pill {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transactions-table td:not(:nth-child(2)):not(:nth-child(3)):not(.actions):not(.amount),
.transactions-table .tag,
.transactions-table .pill {
  white-space: nowrap;
}

.transactions-table .tag,
.transactions-table .pill {
  max-width: 100%;
  min-height: 20px;
  padding: 0 6px;
  font-size: 9.5px;
}

.transactions-table .amount {
  padding-left: 4px;
  padding-right: 6px;
  font-size: 11.5px;
  white-space: nowrap;
}

.transactions-table .actions {
  position: static;
  padding-left: 3px;
  padding-right: 3px;
}

.transactions-table .small-icon {
  min-height: 28px;
  width: 28px;
}

.transactions-col-select { width: 3%; }
.transaction-select-cell { text-align: center; }
.transaction-select-cell input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.transactions-table tr.is-selected td { background: #eff6ff; }

.transactions-col-date {
  width: 5.3%;
}

.transactions-col-description {
  width: 20.2%;
}

.transactions-col-allocation {
  width: 12%;
}

.transactions-col-due {
  width: 5.8%;
}

.transactions-col-settlement {
  width: 5.8%;
}

.transactions-col-category {
  width: 14.2%;
}

.transactions-col-account {
  width: 8.2%;
}

.transactions-col-term {
  width: 5%;
}

.transactions-col-status {
  width: 5.8%;
}

.transactions-col-amount {
  width: 9%;
}

.transactions-col-actions {
  width: 5.7%;
}

.tag,
.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
}

.tag.revenue,
.pill.confirmed {
  background: var(--green-soft);
  color: var(--green);
}

.tag.expense {
  background: var(--red-soft);
  color: var(--red);
}

.pill.scheduled {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.small-icon {
  min-height: 32px;
  width: 32px;
}

.danger-icon {
  color: var(--red);
}

.danger-inline {
  border-color: var(--red-soft);
  color: var(--red);
}

.danger-inline:hover {
  background: var(--red-soft);
}

.balance-table {
  display: grid;
  gap: 8px;
}

.balance-head,
.balance-line,
.balance-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.balance-line,
.balance-total {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 10px;
}

.balance-line {
  border: 1px solid var(--line);
}

.balance-line span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.balance-line svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.balance-line strong,
.balance-total strong {
  font-size: 12px;
}

.balance-total {
  background: var(--surface-soft);
  font-weight: 900;
}

.line-chart {
  min-height: 318px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f5f8fb);
  padding: 12px;
}

.line-chart svg {
  width: 100%;
  height: 270px;
}

.cash-drawer-list-layout {
  width: 100%;
}

.cash-drawer-heading-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cash-drawer-modal-card .cash-drawer-form {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  gap: 24px;
  width: 100%;
  max-height: calc(100dvh - 150px);
  padding: 22px;
  overflow: hidden;
}

.cash-drawer-name-field {
  display: grid;
  gap: 8px;
  max-width: 720px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-drawer-name-field input {
  min-height: 48px;
  text-transform: none;
}

.cash-drawer-account-fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.cash-drawer-account-fieldset legend {
  padding: 0 6px;
  font-weight: 800;
  color: var(--ink);
}

.cash-drawer-account-fieldset > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cash-drawer-account-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
  max-height: calc(100dvh - 390px);
  overflow: auto;
}

.cash-drawer-account-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.cash-drawer-account-option:hover {
  background: var(--surface-soft);
}

.cash-drawer-account-option input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.cash-drawer-list {
  display: grid;
  gap: 10px;
}

.cash-drawer-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cash-drawer-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--blue);
  background: var(--blue-soft);
}

.cash-drawer-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cash-drawer-details span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-drawer-details small,
.registry-count {
  color: var(--muted);
}

.cash-drawer-form-actions {
  justify-content: flex-end;
  margin-top: auto;
}

.cash-drawer-modal {
  width: min(1320px, calc(100vw - 72px));
  max-height: calc(100dvh - 78px);
  overflow: hidden;
}

.cash-drawer-modal-card {
  max-height: calc(100dvh - 78px);
}

@media (max-width: 980px) {
  .cash-drawer-heading-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
  }

  .cash-drawer-account-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .financial-overview-bottom { grid-template-columns: 1fr; gap: 24px; }
  .result-summary-rows > div { grid-template-columns: 120px minmax(70px, 1fr) auto; }
  .banking-kpis { grid-template-columns: 1fr; }
  .banking-quality-row { align-items: flex-start; flex-direction: column; }
  .banking-position-card .module-heading { align-items: flex-start; flex-direction: column; }
}

.grid-line {
  fill: none;
  stroke: #dce5ee;
  stroke-width: 1;
  stroke-dasharray: 3 7;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend strong {
  color: var(--ink);
}

.legend-bar {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.realized-dot {
  background: var(--green);
}

.legend-line {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.projected-dot {
  background: var(--blue);
}

.flow-chart-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.flow-chart-totals strong {
  margin-left: 4px;
  color: var(--ink);
  font-size: 13px;
}

.flow-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.projected-line {
  stroke: var(--blue);
  stroke-width: 3;
}

.flow-zero-line {
  stroke: #94a3b8;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.flow-change-bar {
  vector-effect: non-scaling-stroke;
}

.flow-change-bar.positive {
  fill: var(--green);
  opacity: 0.82;
}

.flow-change-bar.negative {
  fill: var(--red);
  opacity: 0.78;
}

.flow-period-labels text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.flow-end-marker {
  stroke: var(--surface);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.projected-marker {
  fill: var(--surface);
  stroke: var(--blue);
}

.chart-legend small { margin-left: auto; color: var(--muted); font-weight: 700; }

.chart-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.receivable-list {
  display: grid;
  gap: 10px;
}

.receivable-list div {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.receivable-list strong {
  color: var(--green);
}

.stack-form {
  display: grid;
  gap: 12px;
}

.stack-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  min-height: 42px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  text-transform: none;
}

.stack-form textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-row > label {
  min-width: 0;
}

.cash-flow-filters input[type="date"] {
  padding-right: 6px;
  padding-left: 7px;
  font-size: 11px;
}

.cash-flow-filters .form-row {
  gap: 7px;
}

.cash-flow-filters .multi-filter {
  gap: 6px;
}

.cash-flow-filters .multi-filter-summary {
  min-height: 40px;
  padding: 6px 8px;
  gap: 5px;
  font-size: 12px;
}

.cash-flow-filters .multi-filter-chip {
  gap: 5px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
}

.cash-flow-filters .multi-filter-option {
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 700;
}

.cash-flow-filters .check-group {
  gap: 6px;
  padding: 8px 9px 9px;
}

.cash-flow-filters .check-group label {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  min-height: 22px;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  line-height: 1.2;
}

.cash-flow-filters .check-group input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
}

.form-row.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-actions {
  display: flex;
  gap: 10px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  min-height: 62px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 12px;
}

.registry-item {
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
}

.account-balance-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(138px, auto));
  gap: 8px;
  text-align: right;
}

.account-balance-summary > span {
  padding: 5px 10px;
  border-left: 1px solid var(--line);
}

.account-balance-summary small,
.account-balance-summary b {
  display: block;
}

.account-balance-summary small {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.account-balance-summary b {
  margin: 2px 0;
  font-size: 14px;
}

.user-item {
  grid-template-columns: 42px minmax(0, 1fr) minmax(96px, auto) 36px;
}

.audit-item {
  grid-template-columns: 42px minmax(0, 1fr) minmax(126px, auto);
}

.backup-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.audit-meta {
  text-align: right;
}

.audit-meta small {
  white-space: nowrap;
}

.settings-wide {
  grid-column: 1 / -1;
}

.list-item strong,
.list-item small {
  display: block;
}

.list-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.list-item b {
  font-size: 13px;
}

.list-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.registry-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
}

.registry-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.permission-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.permission-note strong {
  color: var(--ink);
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-kpis {
  display: grid;
  gap: 10px;
}

.report-kpis div {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 0 12px;
}

.report-kpis span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.financial-report-card {
  min-width: 0;
}

.financial-report-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.financial-report-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.financial-report-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.financial-report-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financial-report-table-wrap {
  max-height: 660px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.financial-report-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
}

.financial-report-table th,
.financial-report-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.financial-report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e5e7eb;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.financial-report-table tbody tr:nth-child(odd) {
  background: #f4f7fa;
}

.financial-report-table tbody tr:nth-child(even) {
  background: var(--surface);
}

.financial-report-table td:nth-child(7) {
  min-width: 260px;
  white-space: normal;
}

.financial-report-table td:nth-child(7) strong {
  font-weight: 700;
}

.management-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.management-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.management-table th,
.management-table td {
  border-bottom: 1px solid #d9e2ea;
  padding: 8px 10px;
  vertical-align: middle;
}

.management-table th {
  background: #eeeeee;
  color: #27384d;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.management-table th:nth-child(2),
.management-table th:nth-child(3),
.management-table td:nth-child(2),
.management-table td:nth-child(3) {
  width: 120px;
  text-align: center;
}

.management-row:nth-child(odd) {
  background: #f7f7f7;
}

.management-row.level-1,
.management-row.level-2 {
  background: #e5e5e5;
  font-weight: 900;
}

.management-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: calc(var(--level) * 18px);
}

.management-name small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.tree-toggle,
.tree-spacer {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex: 0 0 20px;
}

.tree-toggle {
  border: 0;
  background: transparent;
  color: #335f8c;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.order-actions {
  display: inline-flex;
  gap: 4px;
}

.icon-button.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.dre-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.dfc-layout {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.dfc-report-card {
  min-width: 0;
  max-width: 100%;
}

.dfc-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dfc-table-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.dre-report-card {
  grid-column: 1 / -1;
}

.dre-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dre-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 14px;
}

.dre-table th,
.dre-table td {
  border-bottom: 1px solid #d7e5ee;
  padding: 14px 16px;
  text-align: right;
  white-space: nowrap;
}

.dre-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dre-table th:first-child,
.dre-table th:nth-child(2),
.dre-table td:first-child,
.dre-table td:nth-child(2) {
  text-align: left;
}

.dre-table th:first-child,
.dre-table td:first-child {
  width: 120px;
}

.dre-table th:nth-child(2),
.dre-table td:nth-child(2) {
  min-width: 330px;
}

.dre-row {
  font-weight: 900;
}

.dre-row-section,
.dre-row-group {
  background: #bcd7e8;
  color: #061826;
}

.dre-row-total {
  background: #e8f1f8;
  color: #07192b;
  box-shadow: inset 0 1px 0 #b8cfe0, inset 0 -1px 0 #b8cfe0;
}

.dre-row-total td {
  border-bottom-color: #b8cfe0;
  color: #07192b;
}

.dre-row-total .positive,
.dre-row-total .negative {
  color: #07192b;
}

.dre-row-group.level-2 {
  background: #d5e8f2;
}

.dre-indent {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 24px;
}

.dre-toggle {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #c7d8e5;
  border-radius: 4px;
  background: #ffffff;
  color: #0f1b2b;
  font-weight: 900;
}

.report-drilldown-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.report-drilldown-button:hover {
  color: #0b66c3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dfc-row-total .report-drilldown-button {
  color: #ffffff;
}

.report-detail-modal {
  width: min(1780px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

.report-detail-card {
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.report-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.report-detail-summary div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  min-width: 0;
}

.report-detail-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-detail-summary strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  white-space: normal;
}

.report-detail-table-wrap {
  margin: 10px 14px;
  max-height: calc(100dvh - 250px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-detail-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
}

.report-detail-table th,
.report-detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.25;
  vertical-align: top;
}

.report-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e5e7eb;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.report-detail-table tbody tr:nth-child(odd) {
  background: #f8fafc;
}

.report-detail-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.report-detail-table tbody .report-transaction-row {
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.report-detail-table tbody .report-transaction-row:hover,
.report-detail-table tbody .report-transaction-row:focus-visible {
  background: #e8f3ff;
  box-shadow: inset 4px 0 0 #0b66c3;
  outline: none;
}

.report-detail-table .description-cell {
  min-width: 340px;
}

.report-detail-table .amount-cell {
  white-space: nowrap;
  text-align: right;
  font-weight: 900;
}

.dre-editor-modal {
  width: min(1500px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

.dre-editor-card {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.dre-editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 4px;
}

.dre-editor-toolbar .dre-config-summary,
.dre-editor-toolbar .dfc-config-summary {
  margin-bottom: 0;
}

.dre-editor-card .dre-config-list,
.dfc-editor-card .dfc-config-list {
  min-height: 0;
  overflow: auto;
  padding: 14px 18px;
}

.dre-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 18px;
}

.dre-editor-footer > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dre-editor-footer > div {
  display: flex;
  gap: 10px;
}

.dfc-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.dfc-account-filter {
  display: grid;
  grid-template-columns: minmax(210px, 320px) minmax(260px, 520px) 1fr;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.dfc-account-filter label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dfc-account-filter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dfc-account-picker {
  position: relative;
  z-index: 5;
}

.dfc-account-picker summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.dfc-account-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dfc-account-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

.dfc-account-options input {
  width: auto;
  min-height: auto;
}

.dfc-result-chart-card {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dfc-result-chart-card > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}

.dfc-result-chart-card header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dfc-result-chart-card h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.dfc-result-chart-card header strong {
  color: var(--ink);
  font-size: 17px;
}

.dfc-result-chart {
  width: 100%;
  min-height: 150px;
  overflow-x: auto;
}

.dfc-result-chart-svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dfc-chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.dfc-chart-zero {
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.dfc-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dfc-chart-line.positive,
.dfc-chart-point.positive {
  stroke: #0a8f68;
}

.dfc-chart-line.negative,
.dfc-chart-point.negative {
  stroke: #d64545;
}

.dfc-chart-point {
  fill: var(--surface);
  stroke-width: 2.5;
}

.dfc-chart-axis-label,
.dfc-chart-month {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .dfc-account-filter,
  .dfc-board {
    grid-template-columns: 1fr;
  }
}

.dfc-kpi,
.dfc-column {
  display: grid;
  gap: 8px;
  min-height: 120px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.dfc-kpi {
  min-height: 86px;
}

.dfc-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dfc-kpi strong,
.dfc-column strong {
  color: var(--ink);
  font-size: 20px;
}

.dfc-column span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.dfc-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dfc-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dfc-table th,
.dfc-table td {
  border-bottom: 1px solid #d7e5ee;
  padding: 12px 14px;
  text-align: right;
  white-space: nowrap;
}

.dfc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dfc-table th:first-child,
.dfc-table th:nth-child(2),
.dfc-table td:first-child,
.dfc-table td:nth-child(2) {
  text-align: left;
}

.dfc-table th:first-child,
.dfc-table td:first-child {
  width: 92px;
  min-width: 92px;
}

.dfc-scroll-top {
  width: 100%;
  max-width: 100%;
  height: 22px;
  min-height: 22px;
  margin-bottom: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 8px 8px 3px 3px;
  background: #f8fafc;
  overscroll-behavior-inline: contain;
}

.dfc-scroll-top > div {
  height: 2px;
}

.dfc-table th:nth-child(2),
.dfc-table td:nth-child(2) {
  width: 330px;
  min-width: 330px;
}

.dfc-table tbody td:first-child,
.dfc-table .dfc-month-header th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
}

.dfc-table tbody td:nth-child(2),
.dfc-table .dfc-month-header th:nth-child(2) {
  position: sticky;
  left: 92px;
  z-index: 3;
  box-shadow: 2px 0 0 rgba(100, 116, 139, 0.16);
}

.dfc-table tbody td:first-child,
.dfc-table tbody td:nth-child(2) {
  background: inherit;
}

.dfc-row {
  font-weight: 800;
}

.dfc-row-section {
  background: #d5e8f2;
  color: #061826;
}

.dfc-row-total {
  background: #082d68;
  color: #ffffff;
}

.dfc-row-total td {
  border-bottom-color: #16427e;
  color: #ffffff;
}

.dfc-row-total .positive,
.dfc-row-total .negative,
.dfc-row-total .muted {
  color: #ffffff;
}

.dfc-row-account {
  background: #ffffff;
}

.dfc-row-account.level-2 {
  background: #edf5fa;
}

/* Cores dos blocos conforme o modelo financeiro de referencia. */
.dfc-row.dfc-theme-operating {
  background: #e7edf7;
  color: #10233f;
}

.dfc-row-section.dfc-theme-operating,
.dfc-row-total.dfc-theme-operating {
  background: #bdd7e7;
  color: #10233f;
}

.dfc-row.dfc-theme-investment {
  background: #fff2cc;
  color: #3b2a00;
}

.dfc-row-section.dfc-theme-investment,
.dfc-row-total.dfc-theme-investment {
  background: #ffd966;
  color: #3b2a00;
}

.dfc-row.dfc-theme-financing {
  background: #e2f0d9;
  color: #173b12;
}

.dfc-row-section.dfc-theme-financing,
.dfc-row-total.dfc-theme-financing {
  background: #a9d18e;
  color: #173b12;
}

.dfc-row.dfc-theme-adjustment {
  background: #f3e8ff;
  color: #432064;
}

.dfc-row.dfc-theme-pending {
  background: #ffedd5;
  color: #7c2d12;
}

.dfc-row-section.dfc-theme-pending,
.dfc-row-total.dfc-theme-pending {
  background: #fdba74;
  color: #431407;
}

.dfc-row.dfc-theme-balance {
  background: #002060;
  color: #ffffff;
}

.dfc-row.dfc-theme-operating td,
.dfc-row.dfc-theme-investment td,
.dfc-row.dfc-theme-financing td,
.dfc-row.dfc-theme-adjustment td,
.dfc-row.dfc-theme-pending td {
  color: inherit;
  border-bottom-color: rgba(15, 35, 60, 0.16);
}

.dfc-row.dfc-theme-balance td,
.dfc-row.dfc-theme-balance .positive,
.dfc-row.dfc-theme-balance .negative,
.dfc-row.dfc-theme-balance .muted {
  color: #ffffff;
  border-bottom-color: #173f7a;
}

.report-value-drilldown {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: right;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.report-value-drilldown:hover,
.report-value-drilldown:focus-visible {
  text-decoration-color: currentColor;
}

.dfc-description-indent {
  padding-left: calc(var(--dfc-depth, 0) * 22px);
}

.dfc-description-indent.dfc-tree-leaf::before {
  content: "";
  display: inline-block;
  width: 24px;
  min-width: 24px;
  height: 24px;
}

.dfc-config-panel {
  grid-column: 1 / -1;
}

.dre-config-summary,
.dfc-config-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.dre-config-summary div,
.dfc-config-summary div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.dre-config-summary strong,
.dfc-config-summary strong {
  font-size: 22px;
}

.dre-config-summary span,
.dfc-config-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dfc-config-list {
  gap: 10px;
}

.dfc-config-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.dfc-config-grid {
  display: grid;
  grid-template-columns: 100px minmax(220px, 1fr) 150px 130px;
  gap: 10px;
  align-items: end;
}

.dfc-config-grid label {
  display: grid;
  gap: 6px;
}

.dfc-config-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dfc-config-grid input,
.dfc-config-grid select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.dfc-config-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dfc-account-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.dfc-account-picker summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
}

.dfc-account-picker div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
}

.dfc-category-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 8px;
  font-size: 12px;
  font-weight: 800;
}

.dfc-category-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.switch-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.compact-empty {
  padding: 18px;
}

.document-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.document-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bulk-transaction-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 9px 12px;
  background: #eff6ff;
  color: #1e3a5f;
}

.bulk-transaction-toolbar[hidden] { display: none; }
.bulk-transaction-toolbar > div { display: flex; gap: 8px; }

.modal.bulk-transaction-modal {
  width: calc(100vw - 40px);
  max-width: none;
  height: calc(100dvh - 40px);
  max-height: none;
  margin: auto;
  overflow: hidden;
}
.bulk-transaction-modal-card {
  width: 100%;
  height: 100%;
  max-height: none;
  padding: 0;
  gap: 0;
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.bulk-edit-help { margin: 0; padding: 16px 22px 6px; color: var(--muted); }
.bulk-edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  min-height: 0;
  padding: 16px 22px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.bulk-edit-field > span { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.bulk-edit-field > span input { width: 16px; min-height: 16px; height: 16px; accent-color: var(--brand); }
.bulk-edit-field select:disabled,
.bulk-edit-field input:disabled { opacity: .55; background: #f3f4f6; }
.bulk-edit-summary,
.bulk-edit-form .form-actions { grid-column: 1 / -1; }
.bulk-edit-summary { border-radius: 8px; padding: 10px 12px; background: var(--surface-muted); color: var(--muted); font-size: 12px; font-weight: 800; }
.bulk-edit-form .form-actions {
  position: sticky;
  bottom: -22px;
  z-index: 2;
  margin: 0 -22px -22px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

@media (max-width: 980px) {
  .bulk-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .modal.bulk-transaction-modal { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .bulk-edit-form { grid-template-columns: minmax(0, 1fr); }
  .bulk-transaction-toolbar { align-items: stretch; flex-direction: column; }
}

.document-filter-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.modal {
  width: min(460px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(15, 27, 43, 0.24);
}

.modal::backdrop {
  background: rgba(15, 27, 43, 0.45);
}

.user-modal {
  width: min(620px, calc(100vw - 28px));
}

.modal-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.modal-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.modal-card input,
.modal-card select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
}

.inventory-product-modal {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  margin: auto;
  overflow: hidden;
}

.inventory-product-modal-card {
  width: 100%;
  height: 100%;
  max-height: none;
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.inventory-product-modal-card form {
  display: grid;
  grid-template-rows: 1fr auto;
  max-height: calc(100dvh - 84px);
  padding: 14px 18px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.inventory-product-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px 12px;
  align-content: start;
}

.inventory-product-grid .field-span-3 { grid-column: span 3; }
.inventory-product-grid .field-span-6 { grid-column: span 6; }
.inventory-product-grid .field-span-12 { grid-column: span 12; }

.inventory-product-modal-card textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.purchase-items-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.purchase-item-entry {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto 120px 150px auto;
  gap: 10px;
  align-items: center;
}

.purchase-supplier-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.purchase-supplier-field label {
  min-width: 0;
}

.purchase-supplier-shortcut {
  min-height: 42px;
  white-space: nowrap;
}

.purchase-product-shortcut {
  min-height: 42px;
  white-space: nowrap;
}

.purchase-supplier-quick-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.purchase-supplier-quick-form[hidden] {
  display: none;
}

.purchase-supplier-quick-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.purchase-product-quick-form {
  display: grid;
  grid-template-columns: 140px minmax(220px, 1fr) 110px minmax(180px, 1fr) 130px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.purchase-product-quick-form[hidden] {
  display: none;
}

.purchase-product-quick-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.purchase-financial-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.purchase-financial-panel[hidden] {
  display: none;
}

.compact-table {
  min-height: 0;
}

.purchase-total-line {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
  font-weight: 900;
}

.purchase-total-line span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.project-modal {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  margin: auto;
  overflow: hidden;
}

.contact-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.contact-modal-card {
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.contact-modal-card .stack-form {
  padding-top: 4px;
}

.module-actions .contact-new-button {
  color: #fff;
}

.module-actions .contact-new-button svg,
.module-actions .contact-new-button span {
  color: #fff;
}

.project-modal-card {
  height: 100%;
  max-height: none;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.project-modal-card > .stack-form {
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}

.project-modal-card > .stack-form > .form-actions {
  justify-content: flex-end;
}

.project-modal .modal-card textarea {
  min-height: 104px;
  resize: vertical;
}

.project-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr);
  gap: 24px;
  min-height: 0;
  align-items: stretch;
}

.project-details-panel {
  display: grid;
  gap: 14px;
}

.project-phases-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--blue) 12%);
}

.project-phases-heading h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

.project-phases-heading span,
.project-phases-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-phases-help { margin: -4px 0 0; line-height: 1.4; }

.project-phase-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 40px;
  gap: 8px;
}

.project-phase-add input,
.project-phase-row input,
.project-subaccount-row input {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
}

.project-phase-list { display: grid; gap: 8px; min-height: 0; overflow-y: auto; }

.project-phase-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 112px 34px 34px;
  gap: 8px;
  align-items: center;
}

.project-phase-row .icon-button { width: 34px; height: 34px; }

.project-phase-group { display: grid; gap: 8px; }

.project-phase-row input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.project-subaccounts {
  display: grid;
  gap: 7px;
  margin-left: 18px;
  padding: 8px 0 2px 16px;
  border-left: 2px solid var(--line);
}

.project-subaccount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 34px;
  gap: 8px;
  align-items: center;
}

.project-subaccount-row .icon-button { width: 34px; height: 34px; }

.project-subaccount-caption {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-phase-empty {
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.project-phase-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.project-phase-total span { color: var(--muted); font-size: 13px; font-weight: 800; }
.project-phase-total strong { font-size: 16px; }

.project-appropriation-project { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.project-appropriation-project select, .project-appropriation-table-wrap select, .project-appropriation-table-wrap input { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; }
.project-appropriation-help { margin: -4px 0 16px; color: var(--muted); font-size: 13px; }
.project-appropriation-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.project-appropriation-summary > div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.project-appropriation-summary span { color: var(--muted); font-size: 12px; font-weight: 800; }
.project-appropriation-summary strong { font-size: 18px; }
.project-appropriation-summary .warning strong { color: #b45309; }
.appropriation-tags { display: grid; gap: 4px; margin-top: 5px; }
.appropriation-tags span { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; }
.appropriation-tags button { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 0; border-radius: 50%; background: transparent; color: var(--red); cursor: pointer; }
.project-appropriation-table-wrap td small { display: block; margin-top: 3px; color: var(--muted); }
@media (max-width: 820px) { .project-appropriation-summary { grid-template-columns: 1fr; } }

@media (max-width: 820px) {
  .project-modal-layout { grid-template-columns: 1fr; }
}

.document-modal {
  width: min(1320px, calc(100vw - 72px));
  max-height: calc(100dvh - 78px);
  overflow: hidden;
}

.modal.dre-editor-modal,
.modal.dfc-editor-modal {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  margin: auto;
  overflow: hidden;
}

.modal.dre-editor-modal .dre-editor-card,
.modal.dfc-editor-modal .dfc-editor-card {
  width: 100%;
  height: 100%;
  max-height: none;
}

.modal.report-detail-modal {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  margin: auto;
  overflow: hidden;
}

.modal.report-detail-modal .report-detail-card {
  width: 100%;
  height: 100%;
  max-height: none;
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.modal.report-detail-modal .report-detail-table-wrap {
  max-height: calc(100dvh - 260px);
}

.document-modal-card {
  max-height: calc(100dvh - 78px);
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-heading h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.document-modal-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #f2f4f7;
}

.document-modal-tabs button {
  min-height: 34px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.document-modal-tabs button.active {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.document-modal-card form {
  display: grid;
  grid-template-rows: auto minmax(128px, 1fr) auto;
  max-height: calc(100dvh - 174px);
  padding: 8px 18px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.document-modal-section {
  display: grid;
  gap: 6px 12px;
}

.compact-document-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
}

.compact-document-grid .field-span-2 { grid-column: span 2; }
.compact-document-grid .field-span-3 { grid-column: span 3; }
.compact-document-grid .field-span-4 { grid-column: span 4; }
.compact-document-grid .field-span-6 { grid-column: span 6; }
.compact-document-grid .field-span-8 { grid-column: span 8; }
.compact-document-grid .field-span-9 { grid-column: span 9; }
.transaction-source-trace { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr .8fr .55fr .8fr 1.8fr; gap: 10px; align-items: center; padding: 9px 11px; border: 1px solid #93c5fd; border-radius: 9px; background: #eff6ff; color: #1e3a5f; }
.transaction-source-trace[hidden] { display: none; }
.transaction-source-trace > strong { color: #075985; font-size: 12px; text-transform: uppercase; }
.transaction-source-trace span { display: grid; gap: 2px; min-width: 0; }
.transaction-source-trace small { color: #64748b; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.transaction-source-trace b { overflow-wrap: anywhere; font-size: 11px; }

@media (max-width: 900px) {
  .compact-document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-document-grid > label { grid-column: span 1; }
  .compact-document-grid .field-span-6,
  .compact-document-grid .field-span-8,
  .compact-document-grid .field-span-9 { grid-column: span 2; }
  .transaction-source-trace { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .compact-document-grid { grid-template-columns: minmax(0, 1fr); }
  .compact-document-grid > label { grid-column: span 1; }
  .transaction-source-trace { grid-template-columns: minmax(0, 1fr); }
}

.document-modal .modal-card label {
  gap: 2px;
  font-size: 11px;
}

.document-modal .modal-card input,
.document-modal .modal-card select {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 13px;
}

.search-combobox {
  position: relative;
  min-width: 0;
}

.search-combobox input[type="text"] {
  width: 100%;
}

.search-combobox-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 238px;
  overflow: auto;
  border: 1px solid #9fb4c7;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 27, 43, 0.18);
}

.search-combobox-option {
  display: block;
  width: 100%;
  min-height: 32px;
  border: 0;
  border-bottom: 1px solid #e5edf4;
  background: #ffffff;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.search-combobox-option:hover,
.search-combobox-option:focus {
  background: #dbeafe;
  outline: 0;
}

.search-combobox-option.is-empty {
  color: var(--muted);
  cursor: default;
}

.modal-actions .transaction-delete-button {
  margin-right: auto;
}

.modal-actions .transaction-duplicate-button:not([hidden]),
.modal-actions .transaction-delete-button:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.search-combobox-option span,
.search-combobox-option small {
  display: block;
}

.search-combobox-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.transaction-form-feedback {
  margin-top: 8px;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 800;
}

.transaction-form-feedback.error {
  background: var(--red-soft);
  color: var(--red);
}

:root[data-theme="dark"] .search-combobox-list,
:root[data-theme="dark"] .search-combobox-option {
  border-color: var(--line);
  background: var(--surface);
}

:root[data-theme="dark"] .search-combobox-option:hover,
:root[data-theme="dark"] .search-combobox-option:focus {
  background: var(--surface-soft);
}

.installments-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
  margin-top: 7px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.installments-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border-radius: 7px;
  background: #f3f6fa;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 12px;
}

.installments-summary span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.installments-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.installments-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.installments-table th,
.installments-table td {
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.installments-table th {
  background: #e5e7eb;
  color: var(--muted);
  font-weight: 900;
}

.installments-table tr:nth-child(even) td {
  background: #f7f8fa;
}

.installment-date-input,
.installment-amount-input {
  min-height: 28px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 0 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.installment-date-input {
  width: 132px;
}

.installment-amount-input {
  width: 96px;
}

.installment-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.document-modal .modal-actions {
  margin-top: 9px;
}

.document-modal .modal-actions button {
  min-height: 36px;
  padding: 0 14px;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }
}

@media (max-width: 980px) {
  .topbar,
  .date-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .topbar-actions,
  .date-toolbar {
    justify-content: flex-start;
  }

  .topbar-actions {
    flex-basis: 100%;
    flex-wrap: wrap;
  }

  .dashboard-grid,
  .page-grid,
  .report-grid,
  .cash-flow-layout,
  .dre-card,
  .flow-card,
  .balance-card,
  .due-card {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .projects-overview { grid-template-columns: 1fr; }
  .inventory-summary-grid { grid-template-columns: 1fr; }
  .inventory-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-product-grid .field-span-3,
  .inventory-product-grid .field-span-6,
  .inventory-product-grid .field-span-12 { grid-column: span 2; }

  .purchase-item-entry {
    grid-template-columns: 1fr;
  }

  .purchase-supplier-field {
    grid-template-columns: 1fr;
  }

  .purchase-supplier-quick-form {
    grid-template-columns: 1fr;
  }

  .purchase-product-quick-form {
    grid-template-columns: 1fr;
  }

  .purchase-financial-panel {
    grid-template-columns: 1fr;
  }
  .projects-period-heading { align-items: flex-start; flex-direction: column; }
  .projects-period-filter { width: 100%; flex-wrap: wrap; }

  .dre-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-panel {
    position: static;
  }

  .cash-flow-filters,
  .cash-flow-summary-card {
    position: static;
  }

  .cash-flow-summary-card {
    min-width: 0;
  }

  .advanced-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-consolidated-item { grid-template-columns: 1fr 1fr; }
}

.dfc-table .dfc-month-header th {
  text-align: center;
  border-bottom: 1px solid #b9cad8;
}

.dfc-table .dfc-scenario-header th {
  top: 37px;
  text-align: center;
  font-size: 10px;
}

.dfc-table .dfc-forecast-column {
  width: 128px;
  min-width: 128px;
  background-image: linear-gradient(rgba(241, 245, 249, 0.28), rgba(241, 245, 249, 0.28));
  border-left: 1px solid rgba(100, 116, 139, 0.18);
}

.dfc-table thead .dfc-forecast-column {
  color: #755c12;
  background: #fff8dc;
}

.dfc-table thead .dfc-realized-column {
  color: #0b4f75;
  background: #edf7fc;
}

.dfc-table td.dfc-realized-column,
.dfc-table th.dfc-realized-column {
  width: 128px;
  min-width: 128px;
}

:root[data-theme="dark"] .dfc-report-card,
:root[data-theme="dark"] .dfc-table-wrap,
:root[data-theme="dark"] .dfc-table th,
:root[data-theme="dark"] .dfc-scroll-top {
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .dfc-table th,
:root[data-theme="dark"] .dfc-table td,
:root[data-theme="dark"] .dfc-table .dfc-month-header th {
  border-color: var(--line);
}

:root[data-theme="dark"] .dfc-row-account {
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .dfc-row-account.level-2 {
  background: var(--surface-soft);
}

:root[data-theme="dark"] .dfc-table .dfc-forecast-column {
  background-image: linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025));
  border-left-color: var(--line);
}

:root[data-theme="dark"] .dfc-table thead .dfc-forecast-column,
:root[data-theme="dark"] .dfc-table thead .dfc-realized-column {
  background: var(--surface-soft);
  color: var(--ink);
}

.dfc-kpi small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 680px) {
  .workspace {
    padding: 12px;
  }

  .trial-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-title {
    min-width: 0;
  }

  .page-title h1 {
    font-size: 22px;
  }

  .search-trigger,
  .account-button,
  .ghost-button,
  .primary-button {
    width: 100%;
  }

  .period-control,
  .specific-period-filter,
  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

  .specific-period-filter {
    min-width: 0;
    flex-wrap: wrap;
  }

  .dre-metrics {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .import-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .file-button {
    width: 100%;
  }

  .list-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .registry-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .account-balance-summary {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }

  .account-balance-summary > span {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 8px 0 0;
  }

  .list-item b {
    grid-column: 2 / 3;
  }

  .registry-actions {
    grid-column: 2 / 3;
  }
}
