.v5-home-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.v5-home-kpis article {
  padding: 18px;
  border: 1px solid var(--border, #e3e3de);
  border-radius: 14px;
  background: var(--surface, #fff);
}

.v5-home-kpis span,
.v5-home-kpis small,
.v5-home-version span,
.v5-home-version small {
  display: block;
  color: var(--muted, #6b7280);
}

.v5-home-kpis strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 24px;
}

.v5-home-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.v5-home-versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v5-home-version {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border, #e3e3de);
  background: var(--surface-sunken, #f3f3f0);
}

.v5-home-version strong {
  display: block;
  margin: 4px 0 6px;
}

.v5-home-version small {
  display: flex;
  gap: 7px;
  align-items: center;
}

.v5-home-version.missing strong { color: var(--muted, #6b7280); }

.v5-home-version i,
.v5-home-stage > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--faint, #9aa1ac);
}

.v5-home-version i.good,
.v5-home-stage > i.good { background: var(--good, #1f7a5a); }
.v5-home-version i.warn,
.v5-home-stage > i.warn { background: var(--warn, #a66b13); }
.v5-home-version i.bad,
.v5-home-stage > i.bad { background: var(--bad, #b54747); }

.v5-home-readiness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.v5-home-readiness-head + .v5-progress { margin-bottom: 12px; }

.v5-home-readiness-head ~ p,
.v5-home-monthly-state p {
  color: var(--muted, #6b7280);
  line-height: 1.45;
}

.v5-home-blockers {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.v5-home-blockers strong { width: 100%; font-size: 12px; }
.v5-home-blockers span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff6e6;
  color: var(--warn, #a66b13);
  font-size: 11px;
}

.v5-home-clear,
.v5-home-unavailable {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
}
.v5-home-clear { background: #f2f8f5; color: var(--good, #1f7a5a); }
.v5-home-unavailable { background: #fff4f4; color: var(--bad, #b54747); }

.v5-home-workflow {
  display: grid;
}

.v5-home-stage {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border, #e3e3de);
}

.v5-home-stage:last-child { border-bottom: 0; }
.v5-home-stage strong,
.v5-home-stage small { display: block; }
.v5-home-stage small { margin-top: 3px; color: var(--muted, #6b7280); line-height: 1.35; }
.v5-home-stage > span { color: var(--muted, #6b7280); font-size: 11px; font-weight: 700; }

.v5-home-monthly-state {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.v5-home-monthly-state p { margin: 3px 0 0; }

.v5-home-month-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border, #e3e3de);
  border-radius: 10px;
  background: var(--border, #e3e3de);
}

.v5-home-month-counts div {
  padding: 13px;
  background: var(--surface, #fff);
}

.v5-home-month-counts span,
.v5-home-month-counts strong { display: block; }
.v5-home-month-counts span { color: var(--muted, #6b7280); font-size: 11px; }
.v5-home-month-counts strong { margin-top: 4px; font-size: 18px; }

.v5-home-actions-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-left: 4px solid var(--accent, #0f5d50);
}

.v5-home-actions-panel h2 { margin: 4px 0; }
.v5-home-actions-panel p { margin: 0; color: var(--muted, #6b7280); }

.v5-chip.good { background: #edf7f2; color: var(--good, #1f7a5a); }
.v5-chip.warn { background: #fff6e6; color: var(--warn, #a66b13); }
.v5-chip.bad { background: #fff0f0; color: var(--bad, #b54747); }

@media (max-width: 1100px) {
  .v5-home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .v5-home-two-col { grid-template-columns: 1fr; }
  .v5-home-actions-panel { align-items: stretch; flex-direction: column; }
}

@media (max-width: 620px) {
  .v5-home-kpis { grid-template-columns: 1fr; }
  .v5-home-versions { grid-template-columns: 1fr; }
  .v5-home-month-counts { grid-template-columns: 1fr; }
}
