/* Public Cash Health Calculator only. The private FP&A portal keeps its own styling. */
.cash-health-page {
  --cash-ink: #172029;
  --cash-muted: #5c6975;
  --cash-paper: #f7f8f5;
  --cash-surface: #ffffff;
  --cash-green: #08785f;
  --cash-green-dark: #065e4b;
  --cash-border: #d7ddd8;
  --cash-soft-green: #eaf6f0;
  --cash-soft-alert: #fff6e8;
  background: var(--cash-paper);
  color: var(--cash-ink);
}

.cash-health-page .site-header {
  background: var(--cash-surface);
  border-bottom: 1px solid var(--cash-border);
}

.cash-health-page .site-header a,
.cash-health-page .site-header .brand { color: var(--cash-ink); }
.cash-health-page .eyebrow { color: var(--cash-green-dark); }

.cash-health-page .button-primary,
.cash-health-page .button.primary {
  color: #fff;
  background: var(--cash-green);
  border-color: var(--cash-green);
}

.cash-health-page .button-primary:hover,
.cash-health-page .button.primary:hover {
  background: var(--cash-green-dark);
  border-color: var(--cash-green-dark);
}

.cash-health-page .button-secondary,
.cash-health-page .button.secondary {
  color: var(--cash-green-dark);
  border-color: var(--cash-green);
  background: var(--cash-surface);
}

.cash-health-page .button-secondary:hover,
.cash-health-page .button.secondary:hover { background: var(--cash-soft-green); }

.cash-health-page .weekly-plan-section,
.cash-health-page .monthly-plan-section,
.cash-health-page .forecast-coming-soon-panel,
.cash-health-page .coming-soon-panel {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--cash-border);
  border-radius: 16px;
  background: var(--cash-surface);
  box-shadow: 0 8px 24px rgba(23, 32, 41, 0.06);
}

.cash-health-page .weekly-plan-heading,
.cash-health-page .monthly-plan-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cash-health-page .weekly-plan-heading h2,
.cash-health-page .monthly-plan-heading h2,
.cash-health-page .forecast-coming-soon-panel h2,
.cash-health-page .coming-soon-panel h2 {
  margin: 0;
  color: var(--cash-ink);
}

.cash-health-page .weekly-settings,
.cash-health-page .monthly-settings,
.cash-health-page .scenario-grid,
.cash-health-page .weekly-normal-plan,
.cash-health-page .monthly-normal-plan {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.cash-health-page .ratio-confirmation {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 1.25rem 0;
  padding: 1.25rem;
  border: 1px solid #d8a344;
  border-radius: 12px;
  background: var(--cash-soft-alert);
}

.cash-health-page .ratio-basis-group {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.cash-health-page .ratio-basis-group > span,
.cash-health-page .ratio-basis-detail {
  color: var(--cash-muted);
  font-size: 0.88rem;
}

.cash-health-page .ratio-basis-detail { margin: 0; }

.cash-health-page .ratio-basis-group label {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem;
  font-weight: 650;
}

.cash-health-page .ratio-basis-group input { width: auto; margin-top: 0.25rem; }
.cash-health-page .ratio-basis-group small { color: var(--cash-muted); font-size: 0.8rem; font-weight: 500; }

.cash-health-page .score-components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: -1rem 0 1.5rem;
}

.cash-health-page .score-components article {
  padding: 1rem;
  border: 1px solid var(--cash-border);
  border-radius: 12px;
  background: #f7fbf9;
}

.cash-health-page .score-components span,
.cash-health-page .score-components small { display: block; color: var(--cash-muted); }
.cash-health-page .score-components strong { display: block; margin: 0.25rem 0; color: var(--cash-green-dark); font-size: 1.2rem; }
.cash-health-page .score-methodology { margin: -0.5rem 0 1.5rem; color: var(--cash-muted); font-size: 0.82rem; }

.cash-health-page .weekly-normal-plan,
.cash-health-page .monthly-normal-plan {
  padding: 1.25rem;
  border: 1px solid var(--cash-border);
  border-radius: 12px;
  background: #fbfcfa;
}

.cash-health-page .weekly-normal-plan legend,
.cash-health-page .monthly-normal-plan legend {
  padding: 0 0.25rem;
  color: var(--cash-ink);
  font-weight: 800;
}

.cash-health-page .fieldset-intro,
.cash-health-page .form-note {
  grid-column: 1 / -1;
  margin: 0 0 0.25rem;
  color: var(--cash-muted);
}

.cash-health-page .form-credit {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--cash-green-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.cash-health-page .calculator-disclaimer {
  grid-column: 1 / -1;
  margin: .35rem 0 0;
  padding: 1rem 1.15rem;
  border: 1px solid #b9cdc5;
  border-left: 4px solid #d4a84f;
  border-radius: 12px;
  background: transparent;
  color: #172029;
}

.cash-health-page .calculator-disclaimer p {
  margin: .45rem 0 0;
  line-height: 1.55;
}

.cash-health-page .calculator-disclaimer .calculator-disclaimer-title {
  margin-top: 0;
  color: #0b6d63;
  font-weight: 800;
}

.cash-health-page .calculator-disclaimer .calculator-contact {
  color: #172029;
}

.cash-health-page .calculator-disclaimer a {
  color: #8a5d08;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.cash-health-page .cash-whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #128c7e;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.cash-health-page .cash-whatsapp-float:hover,
.cash-health-page .cash-whatsapp-float:focus-visible {
  background: #0d7469;
  color: #fff;
  transform: translateY(-2px);
}

.cash-health-page .cash-whatsapp-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .cash-health-page .cash-whatsapp-float {
    right: .8rem;
    bottom: .8rem;
    padding: .7rem .85rem;
  }
}

@media print {
  .cash-health-page .cash-whatsapp-float {
    display: none !important;
  }
}

.cash-health-page .weekly-normal-plan .button-secondary,
.cash-health-page .weekly-normal-plan .button.secondary,
.cash-health-page .monthly-normal-plan .button-secondary,
.cash-health-page .monthly-normal-plan .button.secondary {
  align-self: end;
  min-height: 52px;
}

.cash-health-page .weekly-plan-scroll,
.cash-health-page .monthly-plan-scroll {
  overflow-x: auto;
  border: 1px solid var(--cash-border);
  border-radius: 12px;
}

.cash-health-page .weekly-plan-table,
.cash-health-page .monthly-plan-table {
  width: 100%;
  min-width: 1580px;
  border-collapse: collapse;
}

.cash-health-page .weekly-plan-table th,
.cash-health-page .monthly-plan-table th {
  padding: 0.85rem;
  color: #fff;
  background: var(--cash-green-dark);
  font-size: 0.86rem;
  text-align: left;
  vertical-align: bottom;
}

.cash-health-page .weekly-plan-table td,
.cash-health-page .monthly-plan-table td {
  padding: 0.55rem;
  border-top: 1px solid #e7ebe8;
  vertical-align: top;
}

.cash-health-page .weekly-plan-table input,
.cash-health-page .monthly-plan-table input {
  min-width: 112px;
  margin: 0;
  padding: 0.65rem;
}

.cash-health-page .forecast-link {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0;
  color: var(--cash-green-dark);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.cash-health-page .forecast-coming-soon-panel,
.cash-health-page .coming-soon-panel {
  border-left: 5px solid var(--cash-green);
  background: var(--cash-soft-alert);
}

.cash-health-page .forecast-coming-soon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cash-health-page .forecast-coming-soon-panel[hidden],
.cash-health-page .coming-soon-panel[hidden],
.cash-health-page .scenario-panel[hidden] { display: none; }

.cash-health-page .weekly-result-card .metric-card,
.cash-health-page .result-card .metric-card { border-top: 3px solid var(--cash-green); }

.cash-health-page .report-chart-card {
  margin-top: 1.5rem;
}

.cash-health-page .report-chart {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  min-height: 245px;
  overflow-x: auto;
  padding: 1rem 0.25rem 0.25rem;
}

.cash-health-page .report-chart .bar-item {
  display: grid;
  flex: 1 0 78px;
  min-width: 78px;
  min-height: 210px;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 0.5rem;
  text-align: center;
}

.cash-health-page .report-chart .bar-pair {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.2rem;
  height: 175px;
}

.cash-health-page .report-chart .diverging-plot {
  position: relative;
  display: block;
  width: 100%;
  height: 175px;
}

.cash-health-page .report-chart .diverging-plot::after {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: #9ca8a2;
  content: '';
}

.cash-health-page .report-chart .diverging-plot .bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.cash-health-page .report-chart .diverging-plot .bar.positive { bottom: 50%; }
.cash-health-page .report-chart .diverging-plot .bar.negative { top: 50%; }
.cash-health-page .report-chart .diverging-plot.paired .bar.closing { left: calc(50% - 12px); }
.cash-health-page .report-chart .diverging-plot.paired .bar.reserve { left: calc(50% + 12px); }

.cash-health-page .report-chart .bar {
  display: inline-block;
  width: 19px;
  min-height: 3px;
  border-radius: 5px 5px 1px 1px;
  background: var(--cash-green);
}

.cash-health-page .report-chart .bar.closing { background: var(--cash-green-dark); }
.cash-health-page .report-chart .bar.reserve { background: #b48635; }
.cash-health-page .report-chart .bar.inflow { background: var(--cash-green); }
.cash-health-page .report-chart .bar.outflow { background: #657482; }
.cash-health-page .report-chart .bar.reserve-difference { background: #1d876d; }
.cash-health-page .report-chart .bar.negative { background: #c7483c; }

.cash-health-page .report-chart small {
  color: var(--cash-muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.cash-health-page .decision-analysis {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--cash-border);
  border-radius: 14px;
  background: #fff;
}

.cash-health-page .decision-analysis h3 { margin-top: 0; }

.cash-health-page .insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.cash-health-page .decision-item {
  margin: 0;
  padding: 0.9rem;
  border-radius: 10px;
  background: #f2f7f4;
  color: var(--cash-ink);
}

.cash-health-page .decision-item strong { color: var(--cash-green-dark); }

.cash-health-page .report-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cash-border);
  color: var(--cash-muted);
  font-size: 0.9rem;
}

.cash-health-page .report-footer p { margin: 0.35rem 0; }
.cash-health-page .report-love { color: #cc354a; }

/* Public calculator-only contact footer. The private portal does not load this page. */
.cash-health-page .cash-calculator-footer {
  display: grid;
  gap: 0.55rem;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-top: 3px solid #d2aa57;
  background: transparent;
  color: #172029;
  font-size: 0.875rem;
  line-height: 1.5;
}

.cash-health-page .cash-calculator-footer__primary,
.cash-health-page .cash-calculator-footer__secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
}

.cash-health-page .cash-calculator-footer__primary {
  color: #064c48;
  font-weight: 700;
}

.cash-health-page .cash-calculator-footer a {
  color: #8a5d08;
  font-weight: 700;
  text-underline-offset: 0.16em;
}

.cash-health-page .cash-calculator-footer a:hover,
.cash-health-page .cash-calculator-footer a:focus-visible {
  color: #064c48;
}

.cash-health-page .cash-calculator-footer__separator {
  color: #6b7983;
}

.cash-health-page .cash-calculator-footer__love {
  color: #f45a6d;
}

@media (max-width: 640px) {
  .cash-health-page .cash-calculator-footer__primary,
  .cash-health-page .cash-calculator-footer__secondary {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .cash-health-page .cash-calculator-footer__separator {
    display: none;
  }
}

@media print {
  .cash-health-page .cash-calculator-footer {
    display: none !important;
  }
}

@media print {
  @page { size: A3 landscape; margin: 8mm; }

  .cash-health-page .site-header,
  .cash-health-page .cash-intro,
  .cash-health-page #cash-health-form,
  .cash-health-page .report-actions,
  .cash-health-page .forecast-coming-soon-panel,
  .cash-health-page .coming-soon-panel { display: none !important; }

  .cash-health-page .result-card,
  .cash-health-page .decision-analysis,
  .cash-health-page .chart-card {
    break-inside: avoid;
    box-shadow: none;
  }

  .cash-health-page .result-card { border: 0; }

  .cash-health-page .table-card { break-before: page; }

  .cash-health-page #cash-forecast-scroll {
    overflow: visible;
    width: 100%;
  }

  .cash-health-page #cash-forecast-scroll table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 6.8pt;
  }

  .cash-health-page #cash-forecast-scroll th,
  .cash-health-page #cash-forecast-scroll td {
    padding: 3px 2px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .cash-health-page #cash-forecast-scroll th:first-child,
  .cash-health-page #cash-forecast-scroll td:first-child { width: 11%; }
}

@media (max-width: 700px) {
  .cash-health-page .weekly-plan-section,
  .cash-health-page .monthly-plan-section,
  .cash-health-page .forecast-coming-soon-panel,
  .cash-health-page .coming-soon-panel { padding: 1rem; }

  .cash-health-page .weekly-plan-heading,
  .cash-health-page .monthly-plan-heading { display: block; }

  .cash-health-page .report-chart { gap: 0.4rem; }
  .cash-health-page .report-chart .bar-item { flex-basis: 64px; min-width: 64px; }

  .cash-health-page .insight-grid,
  .cash-health-page .score-components { grid-template-columns: 1fr; }
}
