.dste-loop-rail {
  min-width: 0;
  padding: 10px 12px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.dste-loop-rail-track {
  display: grid;
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  min-width: 960px;
}

.dste-loop-stage {
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 7px 12px 7px 8px;
  border: 0;
  border-right: 1px solid #e8edf3;
  background: #fff;
  color: #475467;
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.dste-loop-stage:last-child { border-right: 0; }
.dste-loop-stage:hover { background: #f7f9fc; color: #1f519e; }
.dste-loop-stage.active { background: #edf4ff; color: #174583; }
.dste-loop-stage.active::after { content: ""; position: absolute; right: 8px; bottom: 0; left: 8px; height: 2px; background: #1f519e; }
.dste-loop-stage > i { width: 28px; height: 28px; border: 1px solid #cbd8eb; border-radius: 50%; background: #f7f9fc; color: #1f519e; font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.dste-loop-stage.active > i { border-color: #1f519e; background: #1f519e; color: #fff; }
.dste-loop-stage.selected { background: #f3f7fc; box-shadow: inset 0 0 0 1px #8eafd8; }
.dste-loop-stage.selected > i { border-color: #5f84b8; color: #174583; }
.dste-loop-stage > span { min-width: 0; display: grid; gap: 4px; }
.dste-loop-stage b { overflow: hidden; font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.dste-loop-stage small { overflow: hidden; color: #667085; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.dste-loop-journey-detail { margin-top: 10px; border: 1px solid #d8e0ea; border-left: 4px solid #1f519e; border-radius: 6px; background: #fff; }
.dste-loop-journey-detail header { min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 16px; border-bottom: 1px solid #e8edf3; }
.dste-loop-journey-detail header span { color: #315f9d; font-size: 11px; font-weight: 800; }
.dste-loop-journey-detail header h2 { margin: 3px 0 0; color: #172033; font-size: 16px; letter-spacing: 0; }
.dste-loop-journey-grid { display: grid; grid-template-columns: 1.1fr 1.15fr 1fr 1.15fr .8fr; }
.dste-loop-journey-grid > div { min-width: 0; min-height: 78px; padding: 12px 14px; border-right: 1px solid #e8edf3; }
.dste-loop-journey-grid > div:last-child { border-right: 0; }
.dste-loop-journey-grid small, .dste-loop-journey-grid b { display: block; }
.dste-loop-journey-grid small { margin-bottom: 6px; color: #667085; font-size: 11px; }
.dste-loop-journey-grid b { color: #26354a; font-size: 12px; line-height: 1.55; font-weight: 600; overflow-wrap: anywhere; }
.dste-loop-journey-detail footer { min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 14px; border-top: 1px solid #e8edf3; background: #f8fafc; }
.dste-loop-journey-detail footer span { min-width: 0; color: #667085; font-size: 11px; overflow-wrap: anywhere; }
.dste-loop-journey-detail footer button { flex: 0 0 auto; }

.dste-loop-lineage {
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #cbd8eb;
  border-left: 3px solid #1f519e;
  border-radius: 6px;
  background: #f7faff;
  color: #475467;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.dste-loop-lineage b { color: #172033; }
.dste-loop-lineage span { min-width: 0; overflow-wrap: anywhere; }

.dste-formal-house {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 6px;
  box-shadow: none;
}

.dste-formal-house .strategy-house-roof,
.dste-formal-house .strategy-pillar,
.dste-formal-house .strategy-foundation-item,
.dste-formal-house .strategy-house-base { border-radius: 6px; }

.dste-formal-house .strategy-house-roof { min-height: 104px; background: #1f519e; }
.dste-formal-house .strategy-house-pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dste-formal-house .strategy-house-foundation { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dste-loop-unit-panel,
.dste-loop-budget-panel,
.dste-loop-meeting-panel,
.dste-loop-performance-return { margin-top: 12px; }

.dste-budget-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #dfe4ec;
  border-radius: 6px;
}

.dste-budget-summary > div {
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border-right: 1px solid #e8edf3;
  background: #fff;
  display: grid;
  align-content: center;
  gap: 6px;
}

.dste-budget-summary > div:last-child { border-right: 0; }
.dste-budget-summary small { color: #667085; font-size: 11px; }
.dste-budget-summary b { color: #172033; font-size: 16px; overflow-wrap: anywhere; }

.dste-loop-opinion {
  margin-bottom: 12px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  gap: 7px;
}

.dste-loop-opinion textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid #d3dae5;
  border-radius: 5px;
  padding: 9px 10px;
  color: #172033;
  font: inherit;
  font-weight: 400;
}

.dste-loop-form { padding: 16px 18px; }
.dste-loop-form input,
.dste-loop-form textarea { box-sizing: border-box; width: 100%; }

@media (max-width: 1280px) {
  .dste-budget-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dste-budget-summary > div:nth-child(3) { border-right: 0; }
  .dste-budget-summary > div:nth-child(-n+3) { border-bottom: 1px solid #e8edf3; }
}
