/* Data/interaction update only; retain the established workspace visual system. */
.budget-overview {
  margin-bottom: 26px;
}
.budget-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.budget-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e2eaf2;
  border-radius: 12px;
  min-width: 0;
}
.budget-kpi > span {
  font-size: 12px;
  color: #66758b;
}
.budget-kpi > strong {
  color: #102039;
  font-size: clamp(21px, 2vw, 30px);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.budget-kpi > small {
  color: #66758b;
  font-size: 11px;
  line-height: 1.6;
}
.budget-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.budget-chart {
  margin: 0 0 16px;
  padding: 20px;
  border: 1px solid #e2eaf2;
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}
.budget-chart figcaption {
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 12px;
}
.budget-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 145px;
  overflow: visible;
}
.budget-chart-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
}
.budget-chart-legend span:first-child {
  color: #7189ad;
}
.budget-chart-legend span:last-child {
  color: #147d78;
}
.budget-category-list {
  display: grid;
  gap: 12px;
}
.budget-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e2eaf2;
  border-radius: 10px;
}
.budget-category-row small {
  display: block;
  margin-top: 5px;
  color: #66758b;
}
.budget-workspace .flow-actions > input {
  width: 110px;
}
.budget-activity-allocation {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #dbe5ed;
  border-radius: 10px;
}
.budget-activity-allocation legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 650;
}
.budget-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 1100px) {
  .budget-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 700px) {
  .budget-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .budget-chart {
    padding: 12px;
  }
}
@media (max-width: 420px) {
  .budget-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}
.commerce-workspace .commerce-checkbox,
.promotion-flow .commerce-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}
.promotion-flow .commerce-checkbox input {
  width: 16px;
  height: 16px;
  flex: none;
}
.flow-editor .commerce-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
}
.flow-editor .commerce-checkbox input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  flex: none;
}
.commerce-product-list {
  margin: 0;
  padding: 14px;
  border: 1px solid #e2eaf2;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}
.commerce-product-list legend {
  padding: 0 5px;
  font-size: 12px;
  color: #66758b;
}
.commerce-cost-total {
  padding: 12px 14px;
  background: #edf7f5;
  border-radius: 8px;
  color: #116c67;
  font-weight: 650;
  font-size: 14px;
}
.flow-sample-summary {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #e2eaf2;
  border-radius: 10px;
  background: #f8fbfc;
}
.flow-sample-summary h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.flow-sample-summary p {
  margin: 7px 0;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.dashboard-workflow .portal-data-error {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid #e6a18f;
  border-radius: 10px;
  background: #fff4f1;
  color: #9a3926;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.dashboard-workflow .portal-accounting-note {
  margin: 14px 0 0;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.7;
}
.dashboard-workflow .portal-stage {
  max-width: 120px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #edf7f5;
  color: #116c67;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.dashboard-workflow .portal-current-month {
  width: auto;
  padding: 0 6px;
  font-size: 11px;
  white-space: nowrap;
}
.dashboard-workflow .portal-task-check {
  display: grid;
  place-items: center;
  color: var(--portal-teal);
  line-height: 1;
}
.dashboard-workflow .portal-task-check.danger {
  color: #a44532;
}
.dashboard-workflow .portal-month-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dashboard-workflow .portal-task-tabs {
  flex-wrap: wrap;
}
.dashboard-workflow button:focus-visible {
  outline: 2px solid var(--portal-teal);
  outline-offset: 3px;
}
.dashboard-workflow button:disabled {
  cursor: wait;
  opacity: 0.6;
}
@media (max-width: 640px) {
  .dashboard-workflow .portal-plan-row > .portal-stage {
    grid-column: 1/-1;
    justify-self: start;
  }
  .dashboard-workflow .portal-chart-legend {
    flex-wrap: wrap;
  }
}

/* Workspace: plans first, organization budget in a compact secondary rail. */
.dashboard-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 0 40px;
}
.dashboard-home-layout.has-budget {
  grid-template-columns: minmax(0, 1fr) 300px;
}
.dashboard-home-plans,
.dashboard-home-budget {
  min-width: 0;
}
.dashboard-home-plans {
  container-type: inline-size;
  container-name: workspace-plans;
}
.dashboard-home-plans > .dashboard-portal {
  max-width: none;
  margin: 0;
  padding: 0;
}
.dashboard-home-plans .portal-hero {
  display: block;
  padding: 24px;
}
.dashboard-home-plans .portal-hero h1 {
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.2;
}
.dashboard-home-plans .portal-hero-actions {
  margin-top: 18px;
  flex-wrap: wrap;
}
.dashboard-home-plans .portal-grid-top {
  grid-template-columns: minmax(0, 1fr);
}
.dashboard-home-plans .portal-card-head {
  flex-wrap: wrap;
}
.dashboard-home-plans .portal-month-actions {
  margin-left: auto;
}
.dashboard-home-plans .portal-chart-legend {
  flex-wrap: wrap;
}
.dashboard-home-budget > .budget-overview {
  gap: 14px;
  margin: 0;
}
.dashboard-home-budget .flow-heading {
  display: block;
}
.dashboard-home-budget .flow-heading h2 {
  font-size: 18px;
  line-height: 1.5;
}
.dashboard-home-budget .flow-heading p {
  font-size: 11px;
  line-height: 1.7;
}
.dashboard-home-budget .flow-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 8px;
  margin-top: 12px;
}
.dashboard-home-budget .flow-actions > * {
  min-width: 0;
  width: 100%;
  padding-inline: 8px;
  font-size: 12px;
}
.dashboard-home-budget .budget-kpis {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}
.dashboard-home-budget .budget-kpi {
  gap: 5px;
  padding: 13px 15px;
}
.dashboard-home-budget .budget-kpi > strong {
  font-size: 24px;
}
.dashboard-home-budget .budget-kpi > small {
  font-size: 11px;
  line-height: 1.5;
}
.dashboard-home-budget .budget-chart-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.dashboard-home-budget .budget-chart {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
}
.dashboard-home-budget .budget-chart figcaption {
  font-size: 12px;
}
.dashboard-home-budget .budget-chart svg {
  min-width: 380px;
  min-height: 140px;
}
.dashboard-home-budget .flow-panel {
  min-width: 0;
  padding: 15px;
}
.dashboard-home-budget .flow-table-wrap {
  overflow-x: auto;
}
.dashboard-home-budget .flow-table {
  min-width: 760px;
}
.dashboard-home-budget .flow-hint,
.dashboard-home-budget .flow-notice {
  font-size: 11px;
  line-height: 1.7;
}
@container workspace-plans (min-width: 920px) {
  .dashboard-home-plans .portal-grid-top {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  }
}
@container workspace-plans (max-width: 680px) {
  .dashboard-home-plans .portal-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-home-plans .portal-tasks {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .dashboard-home-layout.has-budget {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 16px;
  }
}
@media (max-width: 900px) {
  .dashboard-home-layout.has-budget {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-home-budget .budget-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-home-budget .budget-chart svg {
    min-width: 0;
  }
}
@media (max-width: 480px) {
  .dashboard-home-layout {
    padding-top: 16px;
  }
  .dashboard-home-budget .budget-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}
