@font-face {
  font-family: "Comfortaa";
  src: url("assets/fonts/comfortaa-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src: url("assets/fonts/comfortaa-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  --flow-ink: #182036;
  --flow-muted: #66728a;
  --flow-line: #cbd3df;
  --flow-dark-line: #252f45;
  --flow-green: #0c9e69;
  --flow-green-deep: #06724b;
  --flow-green-soft: #e5f7ee;
  --flow-paper: #ffffff;
  --flow-canvas: #f1f3f5;
  --flow-soft: #f8fafb;
  --flow-yellow: #fff2c6;
  --flow-red: #b4233d;
  --flow-red-soft: #fff0f1;
  --flow-blue: #ebf1ff;
}

* { box-sizing: border-box; }

html,
body {
  width: 1920px;
  min-width: 1920px;
  height: 1080px;
  min-height: 1080px;
  margin: 0;
  overflow: hidden;
}

body.despesas-page {
  background: var(--flow-canvas);
  color: var(--flow-ink);
  font-family: "Comfortaa", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
}

body.despesas-page * { border-radius: 0 !important; }

button,
input,
select,
textarea { font: inherit; }

button { color: inherit; cursor: pointer; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #174da3;
  outline-offset: 2px;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined" !important;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  letter-spacing: normal;
  white-space: nowrap;
  font-feature-settings: "liga";
}

kbd {
  min-width: 22px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid #9aa7b9;
  background: #fff;
  color: var(--flow-ink);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.window-controls {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 100;
  display: flex;
  gap: 8px;
}

.window-control-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--flow-line);
  background: #fff;
  color: var(--flow-green-deep);
}

.window-control-btn.close { color: #d21f3c; }

.flow-shell {
  width: 1720px;
  height: 960px;
  margin: 58px auto 0;
  display: grid;
  grid-template-rows: 86px minmax(0, 1fr);
  gap: 12px;
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 13px 14px;
  border: 1px solid var(--flow-dark-line);
  background: var(--flow-paper);
}

.flow-brand,
.header-tools,
.shortcut-guide,
.shortcut-guide span,
.ledger-header-actions,
.entry-actions,
.save-hint,
.rail-balance-heading,
.line-actions { display: flex; align-items: center; }

.flow-brand { min-width: 0; gap: 11px; }

.back-button,
.brand-mark,
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
}

.back-button { color: #143a7d; }

.brand-mark { background: var(--flow-green); color: #fff; }

.brand-mark .material-symbols-outlined { font-size: 24px; }

.section-path,
.field-label,
.entry-field > span,
.day-overline {
  display: block;
  color: var(--flow-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }

.flow-brand h1 {
  margin-top: 2px;
  font-size: 30px;
  line-height: 1;
}

.flow-brand p {
  margin-top: 5px;
  color: var(--flow-muted);
  font-size: 11px;
}

.header-tools { flex: 0 0 auto; gap: 9px; }

.shortcut-guide {
  gap: 11px;
  margin-right: 5px;
  color: var(--flow-muted);
  font-size: 10px;
  white-space: nowrap;
}

.shortcut-guide span,
.save-hint { gap: 4px; }

.header-button,
.month-button,
.discard-button,
.save-button,
.next-entry button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  color: var(--flow-ink);
  font-size: 11px;
  font-weight: 900;
}

.header-button.primary,
.save-button {
  border-color: #075839;
  background: var(--flow-green);
  color: #fff;
}

.flow-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr) 390px;
  gap: 12px;
}

.finance-rail,
.ledger-panel,
.entry-sheet {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--flow-dark-line);
  background: var(--flow-paper);
}

.finance-rail {
  display: flex;
  flex-direction: column;
  background: #f8fafb;
}

.period-switcher,
.rail-navigation,
.rail-balance,
.rail-alert {
  padding: 14px;
  border-bottom: 1px solid var(--flow-line);
}

.period-control {
  height: 74px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  margin-top: 8px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
}

.period-control > button {
  width: 38px;
  height: 72px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #174789;
}

.period-control > button:first-child { border-right: 1px solid var(--flow-line); }
.period-control > button:last-child { border-left: 1px solid var(--flow-line); }

.period-picker {
  min-width: 0;
  height: 72px;
  display: grid;
  align-content: center;
  justify-items: center;
  cursor: pointer;
}

.period-picker span { font-size: 15px; line-height: 1.25; text-align: center; }

.period-picker input {
  width: 118px;
  height: 19px;
  margin-top: 3px;
  border: 0;
  background: transparent;
  color: var(--flow-muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.rail-navigation { display: grid; gap: 5px; }
.rail-navigation .field-label { margin-bottom: 4px; }

.rail-navigation button {
  min-height: 43px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #344157;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.rail-navigation button.active {
  border-color: #9fcdb8;
  background: var(--flow-green-soft);
  color: #075b3b;
}

.rail-navigation b {
  min-width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #b8c1cf;
  background: #fff;
  font-size: 10px;
}

.rail-balance { display: grid; gap: 10px; }

.rail-balance-heading { justify-content: space-between; }

.rail-balance-heading button {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #afbac8;
  background: #fff;
  color: #1d4b88;
}

.rail-balance-heading .material-symbols-outlined { font-size: 14px; }

.rail-balance dl { display: grid; gap: 8px; margin: 0; }

.rail-balance dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
}

.rail-balance dt { color: var(--flow-muted); }
.rail-balance dd { margin: 0; font-size: 11px; }
.positive, .paid-value { color: var(--flow-green-deep) !important; }

.balance-scale {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
}

.balance-scale i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--flow-green);
  transition: width 150ms ease;
}

.rail-balance p {
  color: var(--flow-muted);
  font-size: 10px;
  line-height: 1.45;
}

.rail-alert {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  margin-top: auto;
  border-bottom: 0;
  background: var(--flow-blue);
}

.rail-alert.alert-danger { background: var(--flow-red-soft); }
.rail-alert > .material-symbols-outlined { color: #215695; }
.rail-alert.alert-danger > .material-symbols-outlined { color: var(--flow-red); }

.rail-alert strong {
  display: block;
  color: #264168;
  font-size: 10px;
  line-height: 1.35;
}

.rail-alert.alert-danger strong { color: #8d1a30; }

.rail-alert p {
  margin-top: 4px;
  color: #587091;
  font-size: 9px;
  line-height: 1.35;
}

.rail-alert.alert-danger p { color: #9e5360; }

.ledger-panel {
  display: grid;
  grid-template-rows: 82px 67px 58px minmax(0, 1fr);
  overflow: hidden;
}

.ledger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--flow-dark-line);
}

.ledger-header h2,
.entry-sheet h2 { margin-top: 3px; font-size: 23px; line-height: 1.05; }
.ledger-header-actions { gap: 7px; }
.month-button { background: var(--flow-yellow); }
.month-button.secondary {
  background: var(--flow-blue);
  color: #244a82;
}

.icon-button {
  width: 39px;
  height: 39px;
}

.ledger-summary {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1.1fr minmax(180px, 1.52fr);
  border-bottom: 1px solid var(--flow-line);
  background: #fbfcfc;
}

.ledger-summary > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--flow-line);
}

.ledger-summary > div:last-child { border-right: 0; }

.ledger-summary span:not(.material-symbols-outlined) {
  display: block;
  color: var(--flow-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.ledger-summary strong { display: block; margin-top: 4px; font-size: 17px; white-space: nowrap; }

.ledger-summary .summary-note {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  background: #f0f7f4;
}

.summary-note .material-symbols-outlined { color: var(--flow-green-deep); }

.summary-note p { color: #336756; font-size: 9px; line-height: 1.45; }

.ledger-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: 420px 280px 120px 130px;
  gap: 8px;
  align-items: stretch;
  justify-content: start;
  padding: 9px 14px;
  border-bottom: 1px solid var(--flow-line);
  background: #f8fafb;
}

.ledger-search {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #9eabbc;
  background: #fff;
}

.ledger-search .material-symbols-outlined { justify-self: center; color: #194788; }

.ledger-search input,
.entry-field input,
.entry-field select,
.entry-field textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--flow-ink);
  font-size: 11px;
  font-weight: 800;
}

.ledger-search input { height: 36px; padding-right: 10px; }

.toolbar-segment {
  height: 38px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #9eabbc;
  background: #fff;
}

.toolbar-segment button {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #cbd3df;
  background: #fff;
  color: #556277;
  font-size: 9px;
  font-weight: 900;
}

.toolbar-segment button:last-child { border-right: 0; }
.toolbar-segment button.selected { background: var(--flow-green-soft); color: #075b3b; }

.toolbar-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 6px;
  border: 1px solid #9eabbc;
  background: #fff;
  color: #4b5970;
  font-size: 9px;
  font-weight: 900;
}

.agenda-list {
  min-height: 0;
  overflow: auto;
  padding: 0 14px 12px;
  background: #fff;
}

.monthly-result {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 16px;
  background: linear-gradient(135deg, #f7fbf8 0%, #f5f7ff 55%, #fffaf0 100%);
}

.ledger-panel.result-mode { display: block; overflow: hidden; }
.ledger-panel.result-mode > .ledger-header,
.ledger-panel.result-mode > .ledger-summary,
.ledger-panel.result-mode > .ledger-toolbar,
.ledger-panel.result-mode > .agenda-list { display: none; }

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 15px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
}

.result-header h2 { margin-top: 3px; font-size: 23px; line-height: 1.08; }
.result-header p { margin-top: 6px; color: var(--flow-muted); font-size: 10px; line-height: 1.45; }
.result-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.result-header-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid #9ccab4;
  background: var(--flow-green-soft);
  color: #075b3b;
  font-size: 10px;
}

.result-header-pill .material-symbols-outlined { font-size: 18px; }

.result-scenario-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid #176b95;
  background: #eaf6fd;
  color: #07557c;
  font-size: 10px;
  font-weight: 900;
}
.result-scenario-launch .material-symbols-outlined { font-size: 17px; }
.result-scenario {
  margin-top: 10px;
  border: 1px solid #5795b5;
  background: #f4fbff;
}
.result-scenario > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  border-bottom: 1px solid #b6d9eb;
  background: #e8f6fd;
}
.result-scenario h3 { margin-top: 2px; font-size: 14px; line-height: 1.15; }
.result-scenario header p { margin-top: 4px; color: #4a7187; font-size: 9px; line-height: 1.35; }
.result-scenario-actions { display: flex; align-items: center; gap: 7px; }
.result-scenario-actions > button:not(.icon-button) {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #6d9eb7;
  background: #fff;
  color: #165c81;
  font-size: 9px;
  font-weight: 900;
}
.result-scenario-actions .icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #6d9eb7;
  background: #fff;
  color: #165c81;
}
.result-scenario-actions .icon-button .material-symbols-outlined { font-size: 18px; }
.scenario-fields {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.5fr .75fr .75fr;
  gap: 8px;
  padding: 11px 13px 9px;
}
.scenario-fields label { min-width: 0; }
.scenario-fields label > span { display: block; min-height: 22px; color: #527087; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.scenario-fields input,
.scenario-fields select { width: 100%; height: 34px; border: 1px solid #8cb8cd; background: #fff; color: #183f58; font-size: 10px; }
.scenario-fields select { padding: 0 7px; }
.scenario-fields small { display: block; margin-top: 4px; color: #638195; font-size: 8px; line-height: 1.25; }
.scenario-money { display: grid; grid-template-columns: 33px minmax(0, 1fr); height: 34px; border: 1px solid #8cb8cd; background: #fff; }
.scenario-money b { display: grid; place-items: center; border-right: 1px solid #c5d9e5; color: #416880; font-size: 9px; }
.scenario-money input { height: 32px; border: 0; padding: 0 8px; color: #075b3b; font-size: 16px; font-weight: 900; text-align: right; }
.scenario-rate > div { display: grid; grid-template-columns: minmax(0, 1fr) 25px; height: 34px; border: 1px solid #8cb8cd; background: #fff; }
.scenario-rate input { height: 32px; border: 0; padding: 0 6px; font-weight: 900; text-align: right; }
.scenario-rate b { display: grid; place-items: center; border-left: 1px solid #c5d9e5; color: #416880; font-size: 10px; }
.scenario-rate.is-disabled > div { background: #edf2f5; }
.scenario-rate.is-disabled input { color: #8194a2; }
.scenario-result {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 8px;
  padding: 0 13px 11px;
}
.scenario-result > div { min-width: 0; padding: 9px 10px; border: 1px solid #bad5e3; background: #fff; }
.scenario-result span { display: block; color: #5c7485; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.scenario-result strong { display: block; margin-top: 5px; color: #075b3b; font-size: 17px; line-height: 1; white-space: nowrap; }
.scenario-result strong.negative { color: var(--flow-red); }
.scenario-result small { display: block; margin-top: 5px; color: #627e90; font-size: 8px; line-height: 1.2; }
.scenario-result .scenario-main { border-color: #08754b; background: var(--flow-green); }
.scenario-result .scenario-main span,
.scenario-result .scenario-main small,
.scenario-result .scenario-main strong { color: #fff; }
.scenario-result .scenario-main.negative { border-color: var(--flow-red); background: var(--flow-red-soft); }
.scenario-result .scenario-main.negative span,
.scenario-result .scenario-main.negative small,
.scenario-result .scenario-main.negative strong { color: #8d1a30; }
.scenario-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 9px 13px; border-top: 1px solid #b6d9eb; background: #fffdf4; color: #7a672d; font-size: 8px; line-height: 1.35; }
.scenario-note .material-symbols-outlined { flex: 0 0 auto; color: #a27c0c; font-size: 15px; }

.result-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.result-card {
  min-width: 0;
  min-height: 88px;
  padding: 11px 12px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
}

.result-card > span {
  display: block;
  color: var(--flow-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.result-card strong { display: block; margin-top: 7px; font-size: 18px; line-height: 1.1; white-space: nowrap; }
.result-card small { display: block; margin-top: 6px; color: var(--flow-muted); font-size: 8px; line-height: 1.25; }
.result-card.revenue { background: #e7f8ef; border-color: #87c9aa; }
.result-card.profit { background: #fff2c8; border-color: #e3bf61; }
.result-card.expense { background: #fff0f2; border-color: #e6a4b1; }
.result-card.projected.positive { background: var(--flow-green); border-color: #075839; color: #fff; }
.result-card.projected.positive > span,
.result-card.projected.positive small { color: #e5fff1; }
.result-card.projected.negative { background: var(--flow-red-soft); border-color: var(--flow-red); color: #8d1a30; }

.result-callout {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #88cbaa;
  background: #eff9f3;
}

.result-callout.negative { border-color: #e0a3af; background: #fff3f4; }
.result-callout > .material-symbols-outlined { color: var(--flow-green-deep); font-size: 21px; }
.result-callout.negative > .material-symbols-outlined { color: var(--flow-red); }
.result-callout strong { display: block; color: #14543b; font-size: 10px; }
.result-callout.negative strong { color: #8d1a30; }
.result-callout p { margin-top: 3px; color: #4b7965; font-size: 9px; line-height: 1.35; }
.result-callout.negative p { color: #9a5260; }
.result-callout button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #2b8461;
  background: #fff;
  color: #075b3b;
  font-size: 9px;
  font-weight: 900;
}

.result-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, .84fr);
  gap: 10px;
  margin-top: 10px;
}

.result-panel { min-width: 0; border: 1px solid var(--flow-dark-line); background: #fff; }
.result-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--flow-line); background: #f6f9fa; }
.result-panel h3 { margin-top: 2px; font-size: 13px; line-height: 1.2; }
.result-panel-note { color: var(--flow-muted); font-size: 8px; }

.result-bridge { padding: 4px 12px 9px; }
.result-bridge-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 31px; border-bottom: 1px solid #e1e7ec; color: #465368; font-size: 10px; }
.result-bridge-row strong { font-size: 11px; white-space: nowrap; }
.result-bridge-row.income strong { color: var(--flow-green-deep); }
.result-bridge-row.negative strong { color: var(--flow-red); }
.result-bridge-row.total { margin: 2px -4px; padding: 0 4px; background: #f5f8fb; color: #223b64; font-weight: 900; }
.result-bridge-row.final { margin-top: 5px; padding: 0 6px; border: 1px solid #8fcbb0; background: var(--flow-green-soft); color: #075b3b; font-size: 11px; font-weight: 900; }
.result-bridge-row.final.negative { border-color: #e0a3af; background: var(--flow-red-soft); color: #8d1a30; }
.result-footnote { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 9px 12px; border-top: 1px solid var(--flow-line); background: #fff9e8; color: #7b5e19; font-size: 8px; line-height: 1.4; }
.result-footnote .material-symbols-outlined { flex: 0 0 auto; font-size: 15px; }

.result-side-stack { display: grid; gap: 10px; align-content: start; }
.realized-value { padding: 12px 12px 5px; font-size: 22px; line-height: 1; }
.realized-value.positive { color: var(--flow-green-deep); }
.realized-value.negative { color: var(--flow-red); }
.realized-panel dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px 12px 0; border: 1px solid var(--flow-line); }
.realized-panel dl div { padding: 8px; border-right: 1px solid var(--flow-line); }
.realized-panel dl div:last-child { border-right: 0; }
.realized-panel dt { color: var(--flow-muted); font-size: 8px; }
.realized-panel dd { margin: 4px 0 0; font-size: 10px; }
.realized-panel > p { padding: 9px 12px 11px; color: var(--flow-muted); font-size: 8px; line-height: 1.4; }

.result-category-list { display: grid; gap: 0; padding: 4px 12px 10px; }
.result-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 35px;
  border: 0;
  border-bottom: 1px solid #e1e7ec;
  background: transparent;
  color: var(--flow-ink);
  text-align: left;
}
.result-category:last-child { border-bottom: 0; }
.result-category > span { position: relative; display: grid; align-items: center; min-width: 0; height: 22px; overflow: hidden; }
.result-category > span i { position: absolute; left: 0; top: 4px; height: 14px; background: #e2f5ea; border-left: 3px solid var(--flow-green); }
.result-category b { position: relative; padding-left: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.result-category strong { color: #30445f; font-size: 9px; white-space: nowrap; }
.result-category:hover b { color: #075b3b; text-decoration: underline; }

.result-warnings { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid #e4bd60; background: #fff8df; }
.result-warnings > .material-symbols-outlined { color: #a97900; font-size: 20px; }
.result-warnings strong { display: block; color: #765512; font-size: 10px; }
.result-warnings p { margin-top: 4px; color: #856b34; font-size: 9px; line-height: 1.35; }

.result-loading,
.result-empty { min-height: 300px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 24px; border: 1px dashed #9eb1c4; background: #fff; color: var(--flow-muted); text-align: center; }
.result-loading .material-symbols-outlined,
.result-empty .material-symbols-outlined { color: #1c6f9e; font-size: 29px; }
.result-loading strong,
.result-empty strong { color: #254267; font-size: 12px; }
.result-loading p,
.result-empty p { max-width: 360px; font-size: 9px; line-height: 1.45; }

.agenda-day { padding-top: 12px; }

.agenda-day > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 41px;
  padding: 0 0 8px 1px;
}

.agenda-day h3 { margin-top: 2px; font-size: 13px; }
.day-overline { color: #6d7890; font-size: 8px; }
.overdue-day .day-overline { color: var(--flow-red); }
.today-day .day-overline { color: var(--flow-green-deep); }
.day-total { color: var(--flow-muted); font-size: 10px; white-space: nowrap; }

.expense-line {
  min-width: 0;
  min-height: 61px;
  display: grid;
  grid-template-columns: 51px minmax(150px, 1fr) 76px 86px 94px 96px 108px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--flow-line);
  border-bottom: 0;
  background: #fff;
}

.agenda-day .expense-line:last-child { border-bottom: 1px solid var(--flow-line); }
.expense-line.overdue { border-color: #e2a8b2; background: #fffafb; }
.expense-line.is-projected { background: #fbfcff; }

.line-date {
  height: 44px;
  display: grid;
  align-content: center;
  justify-items: center;
  border-right: 1px solid var(--flow-line);
  color: #1c365f;
}

.line-date strong { font-size: 18px; line-height: 1; }
.line-date span { margin-top: 3px; color: var(--flow-muted); font-size: 8px; font-weight: 900; }
.line-main { min-width: 0; }

.line-main strong,
.line-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-main strong { font-size: 11px; }
.line-main span { margin-top: 4px; color: var(--flow-muted); font-size: 9px; }
.expense-line[data-expense-details] { cursor: pointer; }
.expense-line[data-expense-details]:hover { border-color: #89acd6; background: #f8fbff; }
.expense-line[data-expense-details]:focus-visible { position: relative; z-index: 1; outline: 2px solid #176fc5; outline-offset: -2px; }
.line-category-inline { display: block; margin-top: 3px; overflow: hidden; color: #58647a; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.line-category-placeholder { min-height: 1px; }

.origin {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #b8c1cf;
  padding: 0 5px;
  font-size: 8px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-status {
  min-height: 32px;
  display: grid;
  align-content: center;
  justify-items: center;
  overflow: hidden;
  border: 1px solid #b8c1cf;
  padding: 2px 5px;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-status strong,
.line-status small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-status strong { font-size: 8px; font-weight: 900; }
.line-status small { margin-top: 2px; color: inherit; font-size: 7px; opacity: .82; }
button.line-status {
  font: inherit;
  cursor: pointer;
}

button.line-status:hover,
button.line-status:focus-visible {
  border-color: #075839;
  box-shadow: inset 0 -3px 0 rgba(9, 184, 122, .28);
}

.origin.manual { background: #eef4ff; color: #28599d; }
.origin.entrada { background: #fff7d7; color: #7a5a00; }
.origin.folha { background: #f1ebff; color: #654598; }

.origin-button {
  width: 100%;
  min-width: 0;
  cursor: pointer;
}

.origin-button:hover,
.origin-button:focus-visible {
  border-color: #8c6900;
  background: #ffefb3;
  color: #604900;
}

.line-category {
  overflow: hidden;
  color: #58647a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-status.awaiting { background: var(--flow-yellow); color: #725500; }
.line-status.paid { border-color: #82cba6; background: var(--flow-green-soft); color: #05714a; }
.line-status.partial { border-color: #e6c27b; background: #fff6df; color: #8a5b08; }
.line-status.late { border-color: #e6a8b3; background: var(--flow-red-soft); color: #a01e36; }
.line-status.planned { background: var(--flow-blue); color: #365c98; }

.line-value { font-size: 12px; text-align: right; white-space: nowrap; }

.line-actions {
  min-width: 108px;
  height: 34px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 32px;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.line-action {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  color: #1d467f;
  line-height: 1;
}

.line-action .material-symbols-outlined { font-size: 23px; line-height: 1; }
.line-action.pay { background: var(--flow-green-soft); color: var(--flow-green-deep); }
.line-action.cancel { color: var(--flow-red); }
.line-action.add { background: var(--flow-green); color: #fff; border-color: #075839; }
.line-action.hide-projected { background: var(--flow-red-soft); color: var(--flow-red); }

.agenda-empty {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  color: var(--flow-muted);
  text-align: center;
}

.agenda-empty .material-symbols-outlined {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--flow-dark-line);
  background: var(--flow-green-soft);
  color: var(--flow-green-deep);
  font-size: 26px;
}

.agenda-empty strong { color: var(--flow-ink); font-size: 13px; }
.agenda-empty p { max-width: 330px; font-size: 10px; line-height: 1.5; }

.entry-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fffefa;
}

.entry-sheet-header {
  padding: 16px;
  border-bottom: 1px solid var(--flow-dark-line);
  background: #fff9e9;
}

.entry-chip {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  margin-bottom: 11px;
  padding: 0 7px;
  border: 1px solid #d5b76f;
  background: #fff;
  color: #81611c;
  font-size: 9px;
  font-weight: 900;
}

.entry-chip .material-symbols-outlined { font-size: 14px; }

.entry-sheet-header p {
  margin-top: 7px;
  color: var(--flow-muted);
  font-size: 10px;
  line-height: 1.5;
}

.expense-form {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 16px;
  overflow: auto;
}

.entry-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.entry-field > span { color: #5d687b; font-size: 9px; }
.entry-field em { color: #8a95a7; font-size: 8px; font-style: normal; text-transform: lowercase; }

.entry-field > input,
.entry-field > select,
.entry-field > textarea,
.currency-input {
  height: 39px;
  border: 1px solid #8f9aad;
  background: #fff;
}

.entry-field > input,
.entry-field > select { padding: 0 10px; }

.entry-field > textarea { height: 76px; padding: 10px; resize: none; }

.currency-input {
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr);
  align-items: center;
}

.currency-input b {
  height: 37px;
  display: grid;
  place-items: center;
  border-right: 1px solid #8f9aad;
  color: #596477;
  font-size: 11px;
}

.currency-input input {
  height: 37px;
  padding: 0 12px;
  color: var(--flow-green-deep);
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

.entry-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.paid-check {
  min-height: 48px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid #b8c1cf;
  background: #fff;
  cursor: pointer;
}

.paid-check input { position: absolute; opacity: 0; pointer-events: none; }

.check-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #758197;
  color: transparent;
}

.check-mark .material-symbols-outlined { font-size: 16px; }
.paid-check input:checked + .check-mark { border-color: #075839; background: var(--flow-green); color: #fff; }
.paid-check strong,
.paid-check small { display: block; }
.paid-check strong { font-size: 10px; }
.paid-check small { margin-top: 3px; color: var(--flow-muted); font-size: 8px; }

.recurrence-field {
  display: grid;
  gap: 0;
  border: 1px solid #bdc9da;
  background: #f3f8ff;
}

.recurrence-field > .paid-check { border: 0; background: transparent; }
.recurrence-field > .paid-check input:checked + .check-mark { border-color: #075839; background: var(--flow-green); color: #fff; }

.recurrence-options {
  display: grid;
  grid-template-columns: minmax(0, 158px) minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid #bdc9da;
  background: #fffdf5;
}

.recurrence-options p {
  margin: 0 0 2px;
  color: #6b6556;
  font-size: 8px;
  line-height: 1.45;
}

.recurrence-options .material-symbols-outlined { color: #b17400; font-size: 14px; vertical-align: middle; }

.origin.recorrente { color: #075839; border-color: #82c9aa; background: #e4f7ee; }

.attachment-field {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #b8c1cf;
  background: #f8fafb;
}

.attachment-field > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.attachment-field p {
  margin-top: 4px;
  color: var(--flow-muted);
  font-size: 8px;
  line-height: 1.35;
}

.attachment-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.attachment-actions button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  color: #1d467f;
  font-size: 8px;
  font-weight: 900;
}

.attachment-actions button.primary {
  border-color: #075839;
  background: var(--flow-green-soft);
  color: var(--flow-green-deep);
}

.attachment-actions button.danger { color: var(--flow-red); }
.attachment-actions .material-symbols-outlined { font-size: 16px; }

.attachment-preview {
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px dashed #aab6c6;
  background: #fff;
  color: var(--flow-muted);
  font-size: 9px;
}

.attachment-preview.has-file {
  border-style: solid;
  border-color: #9fcdb8;
  background: var(--flow-green-soft);
  color: #075b3b;
}

.attachment-preview .material-symbols-outlined {
  color: #1d4b88;
  font-size: 18px;
}

.attachment-preview strong,
.attachment-preview small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview strong { font-size: 9px; color: inherit; }
.attachment-preview small { margin-top: 2px; font-size: 8px; opacity: .82; }

.entry-sheet-footer {
  padding: 13px 16px;
  border-top: 1px solid var(--flow-dark-line);
  background: #fff;
}

.save-hint { color: var(--flow-muted); font-size: 9px; }
.save-hint .material-symbols-outlined { font-size: 15px; color: #1d487f; }
.entry-actions { justify-content: flex-end; gap: 8px; margin-top: 11px; }
.discard-button, .save-button { min-height: 38px; }
.discard-button { color: #5e6877; }

.dp-loading {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(24, 32, 54, .23);
}

.dp-loading[hidden] { display: none; }

.dp-loading > div {
  min-width: 310px;
  padding: 22px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  text-align: center;
}

.dp-loading .material-symbols-outlined { color: var(--flow-green-deep); font-size: 34px; }
.dp-loading strong { display: block; margin-top: 9px; font-size: 12px; }
.dp-loading p { margin-top: 6px; color: var(--flow-muted); font-size: 10px; }

.dp-toast {
  position: fixed;
  z-index: 400;
  right: 38px;
  bottom: 30px;
  min-width: 250px;
  max-width: 420px;
  padding: 12px 15px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  box-shadow: 5px 5px 0 rgba(24, 32, 54, .2);
  color: var(--flow-ink);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.dp-toast.show { opacity: 1; transform: translateY(0); }
.dp-toast.success { border-color: #2b996e; background: var(--flow-green-soft); color: #075b3b; }
.dp-toast.error { border-color: #d88797; background: var(--flow-red-soft); color: #8d1a30; }

.dp-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: rgba(24, 32, 54, .28);
}

.dp-dialog {
  width: 440px;
  padding: 20px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  box-shadow: 8px 8px 0 rgba(24, 32, 54, .2);
}

.dp-dialog.payment-dialog { width: 560px; }
.expense-detail-dialog { width: 760px; max-height: calc(100vh - 72px); overflow: auto; padding: 0; }
.expense-detail-loading { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 180px; color: var(--flow-muted); font-size: 11px; }
.expense-detail-loading .material-symbols-outlined { color: #176fc5; font-size: 23px; }
.expense-detail-header { display: grid; grid-template-columns: 43px minmax(0, 1fr) 30px; align-items: center; gap: 11px; padding: 15px 16px; border-bottom: 1px solid var(--flow-line); background: linear-gradient(105deg, #f1f7ff, #fbf9ff); }
.expense-detail-icon { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #84a9d2; background: #e4f1ff; color: #125b9c; }
.expense-detail-icon .material-symbols-outlined { font-size: 22px; }
.expense-detail-header small { display: block; color: var(--flow-muted); font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.expense-detail-header h3 { margin: 3px 0 0; overflow: hidden; color: var(--flow-ink); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.expense-detail-header p { margin: 3px 0 0; overflow: hidden; color: var(--flow-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.expense-detail-close { width: 30px; height: 30px; border: 0; background: transparent; color: #345c8d; cursor: pointer; }
.expense-detail-close:hover { background: #e7f2ff; color: #0b4f91; }
.expense-detail-total { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--flow-line); background: #fbfdff; }
.expense-detail-total>div { min-height: 61px; display: grid; align-content: center; gap: 3px; padding: 9px 14px; border-right: 1px solid var(--flow-line); }
.expense-detail-total>div:last-child { border-right: 0; }
.expense-detail-total span,.expense-detail-grid span { color: var(--flow-muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.expense-detail-total b { color: #705500; font-size: 12px; }.expense-detail-total strong { color: #075b3b; font-size: 15px; }
.expense-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 15px; border: 1px solid var(--flow-line); }
.expense-detail-grid>div { min-height: 57px; display: grid; align-content: center; gap: 4px; min-width: 0; padding: 9px 10px; border-right: 1px solid var(--flow-line); border-bottom: 1px solid var(--flow-line); }
.expense-detail-grid>div:nth-child(4n) { border-right: 0; }.expense-detail-grid>div:nth-last-child(-n+4) { border-bottom: 0; }
.expense-detail-grid strong { overflow: hidden; color: var(--flow-ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.expense-detail-note { display: flex; gap: 8px; margin: 0 15px 15px; padding: 10px; border: 1px solid #d4e3f4; background: #f5faff; color: var(--flow-muted); }
.expense-detail-note .material-symbols-outlined { color: #176fc5; font-size: 18px; }.expense-detail-note p { margin: 0; font-size: 10px; line-height: 1.4; }
.expense-detail-attachment { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin: 0 15px 15px; padding: 10px; border: 1px solid #9fc1e3; background: #f5fbff; }
.expense-detail-attachment.missing { border-color: #d7e0ea; background: #fbfcfd; }.expense-detail-attachment>.material-symbols-outlined { color: #be4a57; font-size: 22px; }.expense-detail-attachment.missing>.material-symbols-outlined { color: #91a4ba; }
.expense-detail-attachment small,.expense-detail-attachment strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.expense-detail-attachment small { color: var(--flow-muted); font-size: 8px; text-transform: uppercase; }.expense-detail-attachment strong { margin-top:3px; color: var(--flow-ink); font-size: 10px; }
.expense-detail-attachment button { min-height: 31px; border: 1px solid #176fc5; background: #fff; color: #0b579a; padding: 0 10px; font-size: 10px; font-weight: 900; cursor: pointer; }.expense-detail-attachment button:hover { background: #e7f3ff; }
.expense-detail-payments { margin: 0 15px 15px; border-top: 1px solid var(--flow-line); }.expense-detail-payments h4 { margin: 11px 0 7px; color: var(--flow-ink); font-size: 11px; }.expense-detail-payments>div { display: grid; grid-template-columns: minmax(0, 1fr) 165px 90px; align-items: center; gap: 8px; min-height: 39px; padding: 7px 9px; border: 1px solid var(--flow-line); border-bottom: 0; }.expense-detail-payments>div:last-child { border-bottom: 1px solid var(--flow-line); }.expense-detail-payments span { overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.expense-detail-payments small { color: var(--flow-muted); font-size: 9px; }.expense-detail-payments strong { color: #075b3b; font-size: 11px; text-align: right; }
.dp-dialog.folha-payment-dialog { width: 820px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0 12px; }
.folha-payment-dialog .dp-dialog-icon { grid-row: 1 / span 2; }
.folha-payment-dialog .dp-dialog-copy { padding-top: 1px; }
.folha-payment-total { grid-column: 1 / -1; display:flex; align-items:baseline; justify-content:space-between; margin:14px 0 0; padding:10px 12px; border:1px solid var(--flow-line); background:#f5f9ff; }
.folha-payment-total span { color:var(--flow-muted); font-size:10px; text-transform:uppercase; }
.folha-payment-total strong { color:#075b3b; font-size:16px; }
.folha-payment-lines { grid-column:1 / -1; display:flex; flex-direction:column; gap:7px; margin-top:9px; }
.folha-payment-line { display:grid; grid-template-columns:28px minmax(0,1fr) 98px 150px 126px; gap:8px; align-items:end; padding:9px 10px; border:1px solid var(--flow-line); background:#fff; }
.folha-payment-check { align-self:center; width:22px; height:22px; position:relative; display:grid; place-items:center; cursor:pointer; }
.folha-payment-check input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.folha-payment-check span { width:20px; height:20px; display:grid; place-items:center; border:1px solid #789ac2; background:#fff; color:transparent; font-size:15px; }
.folha-payment-check input:checked + span { border-color:#087a54; background:#0aa66c; color:#fff; }
.folha-payment-component { min-width:0; align-self:center; }
.folha-payment-component strong,.folha-payment-component small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.folha-payment-component strong { font-size:12px; }
.folha-payment-component small { margin-top:2px; color:var(--flow-muted); font-size:9px; }
.folha-payment-line>b { align-self:center; color:#075b3b; font-size:12px; text-align:right; }
.folha-payment-line label:not(.folha-payment-check) { min-width:0; display:flex; flex-direction:column; gap:4px; }
.folha-payment-line label:not(.folha-payment-check) span { color:var(--flow-muted); font-size:9px; text-transform:uppercase; }
.folha-payment-line select,.folha-payment-line input { min-width:0; height:32px; border:1px solid #9eb8d8; background:#fff; padding:0 7px; color:var(--flow-ink); font:11px "Segoe UI",Arial,sans-serif; outline:0; }
.folha-payment-line select:focus,.folha-payment-line input:focus { border-color:#176fc5; box-shadow:0 0 0 2px #d9eaff; }
.folha-payment-dialog .dp-dialog-help,.folha-payment-dialog .dp-dialog-error,.folha-payment-dialog .dp-dialog-actions { grid-column:1 / -1; }
.line-value small { display:block; margin-top:2px; color:var(--flow-muted); font-size:9px; font-weight:500; }

.entry-detail-popover {
  --entry-popover-arrow-left: 50%;
  position: fixed;
  z-index: 520;
  width: 430px;
  max-height: 420px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  box-shadow: 7px 7px 0 rgba(24, 32, 54, .18);
}

.entry-detail-popover::before {
  content: "";
  position: absolute;
  left: var(--entry-popover-arrow-left);
  top: -8px;
  width: 14px;
  height: 14px;
  border-left: 1px solid var(--flow-dark-line);
  border-top: 1px solid var(--flow-dark-line);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.entry-detail-popover.above::before {
  top: auto;
  bottom: -8px;
  border: 0;
  border-right: 1px solid var(--flow-dark-line);
  border-bottom: 1px solid var(--flow-dark-line);
}

.entry-detail-head {
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--flow-line);
  background: #fff9e9;
}

.entry-detail-icon,
.entry-detail-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
}

.entry-detail-icon {
  width: 38px;
  height: 38px;
  color: #7a5a00;
}

.entry-detail-close {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--flow-red);
}

.entry-detail-head small,
.entry-detail-meta span {
  color: var(--flow-muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-detail-head h3 {
  margin-top: 3px;
  overflow: hidden;
  color: var(--flow-ink);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--flow-line);
  background: #fbfcff;
}

.entry-detail-meta div {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--flow-line);
}

.entry-detail-meta div:last-child { border-right: 0; }

.entry-detail-meta strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--flow-ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-detail-key {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--flow-line);
  background: #fff;
}

.entry-detail-key span {
  display: block;
  color: var(--flow-muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-detail-key strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #1d467f;
  font-size: 9px;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-detail-key button {
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid var(--flow-dark-line);
  background: var(--flow-blue);
  color: #174789;
  font-size: 8px;
  font-weight: 900;
}

.entry-detail-key .material-symbols-outlined { font-size: 15px; }

.entry-detail-table-wrap {
  min-height: 0;
  overflow: auto;
  padding: 9px 10px 10px;
}

.entry-detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 8px;
}

.entry-detail-table th,
.entry-detail-table td {
  padding: 6px 5px;
  border: 1px solid #d1d9e5;
  text-align: left;
  vertical-align: middle;
}

.entry-detail-table th {
  background: var(--flow-green-soft);
  color: #075b3b;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-detail-table .num { text-align: right; white-space: nowrap; }
.entry-detail-table .product { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.entry-detail-empty {
  padding: 20px 10px;
  color: var(--flow-muted);
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.payment-detail-popover {
  --payment-popover-arrow-left: 50%;
  position: fixed;
  z-index: 525;
  width: 380px;
  display: grid;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  box-shadow: 7px 7px 0 rgba(24, 32, 54, .18);
}

.payment-detail-popover::before {
  content: "";
  position: absolute;
  left: var(--payment-popover-arrow-left);
  top: -8px;
  width: 14px;
  height: 14px;
  border-left: 1px solid var(--flow-dark-line);
  border-top: 1px solid var(--flow-dark-line);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.payment-detail-popover.above::before {
  top: auto;
  bottom: -8px;
  border: 0;
  border-right: 1px solid var(--flow-dark-line);
  border-bottom: 1px solid var(--flow-dark-line);
}

.payment-detail-head {
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--flow-line);
  background: var(--flow-green-soft);
}

.payment-detail-icon,
.payment-detail-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
}

.payment-detail-icon {
  width: 38px;
  height: 38px;
  color: var(--flow-green-deep);
}

.payment-detail-close {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--flow-red);
}

.payment-detail-head small,
.payment-detail-total span,
.payment-detail-grid span {
  display: block;
  color: var(--flow-muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-detail-head h3 {
  margin-top: 3px;
  overflow: hidden;
  color: var(--flow-ink);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-detail-total {
  padding: 12px 14px;
  border-bottom: 1px solid var(--flow-line);
  background: #fbfffd;
}

.payment-detail-total strong {
  display: block;
  margin-top: 3px;
  color: var(--flow-green-deep);
  font-size: 24px;
  line-height: 1;
}

.payment-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--flow-line);
}

.payment-detail-grid div {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--flow-line);
  border-bottom: 1px solid var(--flow-line);
}

.payment-detail-grid div:nth-child(2n) { border-right: 0; }
.payment-detail-grid div:nth-last-child(-n + 2) { border-bottom: 0; }

.payment-detail-grid strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--flow-ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-detail-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--flow-line);
  background: #fbfcff;
}

.payment-detail-note .material-symbols-outlined {
  color: #24528f;
  font-size: 18px;
}

.payment-detail-note p {
  color: var(--flow-muted);
  font-size: 9px;
  line-height: 1.45;
}

.payment-components { border-top: 1px solid var(--flow-line); padding: 9px 12px; }
.payment-components h4 { margin: 0 0 6px; color: var(--flow-ink); font-size: 10px; text-transform: uppercase; }
.payment-components>div { display:grid; grid-template-columns:minmax(0,1fr) 82px; gap:3px 8px; padding:6px 0; border-top:1px solid #edf1f6; }
.payment-components>div:first-of-type { border-top:0; }
.payment-components span,.payment-components small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.payment-components span { font-size:10px; font-weight:650; }
.payment-components small { color:var(--flow-muted); font-size:9px; }
.payment-components strong { grid-column:2; grid-row:1 / span 2; align-self:center; color:#05714a; font-size:10px; text-align:right; }

.payment-detail-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  background: #fff;
}

.payment-detail-actions button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #075839;
  background: var(--flow-green);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}

.payment-detail-actions .material-symbols-outlined { font-size: 16px; }

.dp-dialog-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--flow-dark-line);
  background: var(--flow-green-soft);
  color: var(--flow-green-deep);
}

.dp-dialog-icon.danger { background: var(--flow-red-soft); color: var(--flow-red); }
.dp-dialog-copy small { display: block; margin-top: 13px; color: var(--flow-muted); font-size: 9px; text-transform: uppercase; }
.dp-dialog-copy h3 { margin-top: 4px; font-size: 17px; }
.dp-dialog-copy p { margin-top: 8px; color: var(--flow-muted); font-size: 10px; line-height: 1.5; }

.dp-dialog-input {
  width: 100%;
  height: 42px;
  margin-top: 14px;
  padding: 0 10px;
  border: 1px solid #8f9aad;
  background: #fff;
  color: var(--flow-ink);
  font-size: 12px;
  font-weight: 800;
}

.dp-dialog-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.dp-dialog-field .dp-dialog-input { margin-top: 0; }

.dp-dialog-field span {
  color: var(--flow-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.dp-dialog-select {
  appearance: auto;
  cursor: pointer;
}

.dp-payment-grid {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 10px;
}

.dp-date-shortcuts {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.dp-date-shortcuts button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #9eabbc;
  background: var(--flow-blue);
  color: #254f89;
  font-size: 9px;
  font-weight: 900;
}

.dp-date-shortcuts button:hover,
.dp-date-shortcuts button:focus-visible {
  border-color: #174da3;
  background: #dfe9ff;
}

.dp-calendar {
  margin-top: 11px;
  padding: 10px;
  border: 1px solid #9eabbc;
  background: #fbfcff;
}

.dp-calendar-head {
  height: 34px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dp-calendar-head strong {
  overflow: hidden;
  color: var(--flow-ink);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.dp-calendar-head button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  color: #174789;
}

.dp-calendar-head button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.dp-calendar-weekdays,
.dp-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.dp-calendar-weekdays {
  margin-bottom: 5px;
  color: var(--flow-muted);
  font-size: 8px;
  font-weight: 900;
  text-align: center;
}

.dp-calendar-day {
  height: 30px;
  min-width: 0;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d4dce7;
  background: #fff;
  color: var(--flow-ink);
  font-size: 10px;
  font-weight: 900;
}

.dp-calendar-day.empty {
  border-color: transparent;
  background: transparent;
}

.dp-calendar-day.today {
  border-color: #8aa9d8;
  background: var(--flow-blue);
  color: #174789;
}

.dp-calendar-day.due {
  border-color: #d6b656;
  background: var(--flow-yellow);
  color: #725500;
}

.dp-calendar-day.selected {
  border-color: #075839;
  background: var(--flow-green);
  color: #fff;
}

.dp-calendar-day.disabled {
  opacity: .38;
  background: #eef1f5;
  cursor: not-allowed;
}

.dp-dialog-help,
.dp-dialog-error {
  margin-top: 7px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
}

.dp-dialog-help { color: var(--flow-muted); }
.dp-dialog-error { color: var(--flow-red); }

.dp-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }

.dp-dialog-actions .btn,
.category-manager button {
  min-height: 37px;
  padding: 0 12px;
  border: 1px solid var(--flow-dark-line);
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}

.dp-dialog-actions .btn.primary { background: var(--flow-green); color: #fff; border-color: #075839; }
.dp-dialog-actions .btn.info { background: #1674c4; color: #fff; border-color: #0b4f8b; }
.dp-dialog-actions .btn.danger { background: var(--flow-red); color: #fff; border-color: #7d1228; }

.recurring-edit-scope-dialog,
.monthly-goal-dialog { width: 610px; }

.recurring-edit-scope-options,
.monthly-goal-scope-options {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.recurring-edit-scope-option,
.monthly-goal-scope-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 132px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--flow-line);
  background: #fff;
  cursor: pointer;
}

.recurring-edit-scope-option:has(input[value="current"]),
.recurring-edit-scope-option:has(input[value="all"]),
.monthly-goal-scope-option:has(input[value="current"]),
.monthly-goal-scope-option:has(input[value="all"]) { grid-template-columns: 18px minmax(0, 1fr); }

.recurring-edit-scope-option.selected,
.monthly-goal-scope-option.selected { border-color: #158e61; background: var(--flow-green-soft); }

.recurring-edit-scope-option input[type="radio"],
.monthly-goal-scope-option input[type="radio"] { width: 15px; height: 15px; margin: 0; accent-color: var(--flow-green); }

.recurring-edit-scope-option strong,
.monthly-goal-scope-option strong,
.recurring-edit-scope-option small,
.monthly-goal-scope-option small { display: block; }

.recurring-edit-scope-option strong,
.monthly-goal-scope-option strong { color: var(--flow-ink); font-size: 11px; }
.recurring-edit-scope-option small,
.monthly-goal-scope-option small { margin-top: 3px; color: var(--flow-muted); font-size: 9px; line-height: 1.3; }

.recurring-edit-until,
.monthly-goal-until {
  width: 100%;
  height: 34px;
  border: 1px solid #8f9aad;
  background: #fff;
  padding: 0 7px;
  color: var(--flow-ink);
  font: 900 10px "Segoe UI", Arial, sans-serif;
}

.recurring-edit-until:disabled,
.monthly-goal-until:disabled { opacity: .48; cursor: not-allowed; }

.recurring-edit-scope-dialog .dp-dialog-help,
.monthly-goal-dialog .dp-dialog-help { display: flex; align-items: center; gap: 6px; }
.recurring-edit-scope-dialog .dp-dialog-help .material-symbols-outlined,
.monthly-goal-dialog .dp-dialog-help .material-symbols-outlined { font-size: 15px; color: #a87500; }

#expense-desc { text-transform: uppercase; }

.category-manager { width: 720px; }
.category-manager-list { display: grid; gap: 6px; max-height: 330px; overflow: auto; margin-top: 14px; }

.hidden-forecast-dialog { width: 720px; }

.hidden-forecast-list {
  display: grid;
  gap: 7px;
  max-height: 380px;
  overflow: auto;
  margin-top: 14px;
}

.hidden-forecast-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 116px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--flow-line);
  background: #fff;
}

.hidden-forecast-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 7px 9px;
}

.hidden-forecast-main strong,
.hidden-forecast-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden-forecast-main strong { font-size: 10px; }
.hidden-forecast-main small { grid-column: 2; color: var(--flow-muted); font-size: 8px; }
.hidden-forecast-value { color: var(--flow-ink); font-size: 11px; text-align: right; white-space: nowrap; }

.hidden-forecast-row button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #075839;
  background: var(--flow-green-soft);
  color: var(--flow-green-deep);
  font-size: 8px;
  font-weight: 900;
}

.hidden-forecast-row button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

.deleted-expense-dialog .dp-dialog-icon {
  background: #fff0f2;
  border-color: #f3a9b7;
  color: #a51f3c;
}

.deleted-expense-row {
  border-left: 4px solid #d75970;
}

.deleted-expense-row .hidden-forecast-value {
  color: #9b1735;
}

.hidden-forecast-row .material-symbols-outlined { font-size: 15px; }

.hidden-forecast-empty {
  min-height: 170px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px dashed #aeb8c7;
  background: #fbfcff;
  color: var(--flow-muted);
  text-align: center;
}

.hidden-forecast-empty .material-symbols-outlined { color: #315e9f; font-size: 30px; }
.hidden-forecast-empty strong { color: var(--flow-ink); font-size: 12px; }
.hidden-forecast-empty p { max-width: 340px; font-size: 9px; line-height: 1.45; }

.category-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 206px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--flow-line);
  background: var(--flow-soft);
  font-size: 10px;
}

.category-row.inactive { background: #f3f5f8; border-color: #b8c0cc; }
.category-state { font-size: 8px; font-weight: 900; color: var(--flow-green-deep); }
.category-row.inactive .category-state { color: #7a4b09; }
.category-row input {
  min-width: 0;
  height: 29px;
  padding: 0 8px;
  border: 1px solid #8f9aad;
  background: #fff;
  color: var(--flow-ink);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.category-row-actions { display: grid; grid-template-columns: 96px 1fr; gap: 6px; }
.category-row-actions button,
.category-add button {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--flow-green-deep);
}
.category-row-actions button.warning { color: #875500; background: #fff4d7; border-color: #d7a529; }
.category-row-actions button.success { color: var(--flow-green-deep); background: var(--flow-green-soft); border-color: #075839; }
.category-row-actions .material-symbols-outlined,
.category-add .material-symbols-outlined { font-size: 15px; }
.category-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 14px; }
.category-add input { height: 38px; min-width: 0; padding: 0 10px; border: 1px solid #8f9aad; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.category-add button { background: var(--flow-green-soft); color: var(--flow-green-deep); }
