.nav-list {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.forecast-view {
  display: grid;
  gap: 18px;
}

.forecast-view .panel {
  overflow: hidden;
}

.forecast-intro-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-top-color: #2563eb;
}

.forecast-intro-panel h2,
.forecast-input-panel h2,
.forecast-view .panel-heading h2 {
  margin: 0;
}

.forecast-intro-panel p {
  max-width: 900px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.forecast-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.meta-badge--warning {
  color: #8a4b00;
  background: #fff7df;
  border: 1px solid #f6d98b;
}

.forecast-form {
  display: grid;
  gap: 18px;
}

.forecast-input-panel,
.forecast-team-panel,
.forecast-other-panel,
.forecast-pnl-panel,
.forecast-manager-plan-panel,
.forecast-source-panel,
.forecast-summary-panel,
.forecast-capacity-panel {
  padding: 20px;
}

.forecast-view .panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.forecast-view .panel-heading > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.forecast-view .hint-line {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.forecast-input-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.forecast-input-grid .field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.forecast-input-grid .field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.forecast-input-grid input,
.forecast-input-table input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.forecast-input-grid input:focus,
.forecast-input-table input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.forecast-additional-manager-block {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, .55fr) minmax(420px, 1fr);
  align-items: end;
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.forecast-additional-manager-block h3 {
  margin: 0;
  font-size: 15px;
}

.forecast-additional-manager-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.forecast-additional-manager-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.forecast-additional-manager-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}

.forecast-additional-manager-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.forecast-additional-manager-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.forecast-additional-manager-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.forecast-additional-manager-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.forecast-additional-manager-summary strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-capacity-inputs {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.forecast-capacity-inputs h3 {
  margin: 0 0 13px;
  font-size: 14px;
}

.forecast-input-grid--capacity {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ghost-light-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.ghost-light-button:hover {
  border-color: #9caac0;
  background: #f8fafc;
}

.forecast-form-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.forecast-save-state {
  max-width: 270px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.forecast-save-state.is-warning {
  color: #9a5b00;
}

.forecast-save-state.is-error {
  color: #b42318;
}

.forecast-save-state.is-success {
  color: #16794d;
}

.forecast-save-button {
  min-height: 38px;
  padding: 0 16px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: #0f8b7f;
  border: 1px solid #0f8b7f;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

.forecast-save-button:hover {
  background: #0b746a;
  border-color: #0b746a;
}

.forecast-save-button:disabled {
  cursor: wait;
  opacity: .65;
}

.forecast-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.forecast-metric {
  min-width: 0;
}

.forecast-metric strong {
  overflow: hidden;
  font-size: clamp(22px, 1.65vw, 31px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-metric--with-current {
  align-content: stretch;
  grid-template-rows: auto 1fr auto;
}

.forecast-metric-current {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.forecast-metric-current span {
  color: #0f766e;
  font-size: 10px;
  font-weight: 800;
}

.forecast-metric-current strong {
  color: #0f766e;
  font-size: clamp(16px, 1.05vw, 21px);
}

.forecast-metric--leads { border-top-color: #0f8b7f; }
.forecast-metric--contracts { border-top-color: #2563eb; }
.forecast-metric--issued { border-top-color: #0891b2; }
.forecast-metric--managers { border-top-color: #475569; }
.forecast-metric--expenses { border-top-color: #c62828; }
.forecast-metric--revenue { border-top-color: #3f7f0c; }
.forecast-metric--result { border-top-color: #7c3aed; }
.forecast-metric--break-even { border-top-color: #c16a00; }

.forecast-manager-load-card {
  padding-top: 17px;
}

.forecast-manager-load-values {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.forecast-manager-load-head,
.forecast-manager-load-row {
  display: grid;
  grid-template-columns: 54px repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.forecast-manager-load-head span {
  display: block;
  min-height: 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.forecast-manager-load-row {
  min-height: 29px;
}

.forecast-manager-load-row--current {
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.forecast-manager-load-row .forecast-manager-load-row-label {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.forecast-manager-load-row .forecast-manager-load-row-label--current {
  color: #0f766e;
}

.forecast-manager-load-row strong {
  display: block;
  font-size: clamp(20px, 1.25vw, 26px);
}

.forecast-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.forecast-summary-list {
  display: grid;
  gap: 0;
}

.forecast-summary-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.forecast-summary-list > div:last-child {
  border-bottom: 0;
}

.forecast-summary-list span {
  color: var(--muted);
  font-size: 13px;
}

.forecast-summary-list strong {
  flex: 0 0 auto;
  text-align: right;
}

.forecast-capacity-bar {
  height: 12px;
  margin: 3px 0 14px;
  overflow: hidden;
  background: #e9eef5;
  border-radius: 999px;
}

.forecast-capacity-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #0f8b7f, #2563eb);
  border-radius: inherit;
  transition: width .2s ease, background .2s ease;
}

.forecast-capacity-bar span.is-overloaded {
  background: linear-gradient(90deg, #e59a13, #c62828);
}

.forecast-view .table-wrap {
  overflow-x: auto;
}

.forecast-input-table {
  min-width: 680px;
}

.forecast-input-table td,
.forecast-input-table th {
  vertical-align: middle;
}

.forecast-input-table input {
  max-width: 190px;
}

.forecast-team-total,
.forecast-input-table td:last-child {
  font-weight: 800;
}

.forecast-pnl-table td:last-child {
  text-align: right;
  font-weight: 800;
}

.forecast-pnl-table tr:last-child td {
  font-size: 16px;
  border-top: 2px solid #cbd5e1;
}

.forecast-manager-table {
  min-width: 560px;
}

.forecast-source-table {
  min-width: 1050px;
}

.forecast-source-table input {
  max-width: 115px;
}

.forecast-source-table td:not(:first-child),
.forecast-source-table th:not(:first-child) {
  text-align: right;
}

.forecast-source-table input {
  margin-left: auto;
  text-align: right;
}

.is-positive {
  color: #177245 !important;
}

.is-negative {
  color: #b42318 !important;
}

.is-neutral {
  color: var(--muted) !important;
}

@media (max-width: 1350px) {
  .forecast-input-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .forecast-input-grid--capacity {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .forecast-additional-manager-block {
    grid-template-columns: minmax(260px, 1fr) minmax(180px, .5fr);
  }

  .forecast-additional-manager-summary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1050px) {
  .forecast-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .forecast-intro-panel,
  .forecast-view .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .forecast-form-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .forecast-save-state {
    flex: 1 0 100%;
    max-width: none;
    text-align: left;
  }

  .forecast-input-grid,
  .forecast-input-grid--capacity,
  .forecast-kpi-grid,
  .forecast-additional-manager-block,
  .forecast-additional-manager-summary {
    grid-template-columns: 1fr;
  }

  .forecast-additional-manager-summary {
    grid-column: auto;
  }

  .forecast-input-panel,
  .forecast-team-panel,
  .forecast-other-panel,
  .forecast-pnl-panel,
  .forecast-manager-plan-panel,
  .forecast-source-panel,
  .forecast-summary-panel,
  .forecast-capacity-panel {
    padding: 16px;
  }
}




.forecast-finance-grid {
  align-items: stretch;
}

.forecast-finance-grid .forecast-other-panel,
.forecast-finance-grid .forecast-pnl-panel {
  height: 100%;
}

.forecast-finance-grid .forecast-input-table {
  min-width: 0;
}
