.platform-health {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.ph-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fbfd;
}

.ph-head h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.ph-actions,
.ph-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ph-actions button,
.ph-check-actions button,
.ph-log-table button,
.ph-log-download {
  border: 1px solid #cbd7e6;
  border-radius: 999px;
  padding: 9px 13px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.ph-actions .ph-primary {
  border-color: #14b8a6;
  background: #14b8a6;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(20, 184, 166, .2);
}

.ph-actions button:disabled {
  opacity: .55;
  cursor: wait;
}

.ph-body {
  padding: 18px 20px 22px;
}

.ph-progress {
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
}

.ph-progress[hidden],
.ph-message[hidden],
.ph-details[hidden] {
  display: none;
}

.ph-message {
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
}

.ph-message.is-ok {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.ph-message.is-bad {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

.ph-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.ph-summary-card {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
}

.ph-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.ph-summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.ph-summary-card.is-pass strong,
.ph-check.is-pass .ph-badge {
  color: #047857;
}

.ph-summary-card.is-warning strong,
.ph-check.is-warning .ph-badge {
  color: #b45309;
}

.ph-summary-card.is-fail strong,
.ph-check.is-fail .ph-badge {
  color: #be123c;
}

.ph-filters {
  margin-bottom: 16px;
}

.ph-filters select,
.ph-filters input {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #ffffff;
}

.ph-filters input {
  min-width: min(100%, 280px);
}

.ph-checks {
  display: grid;
  gap: 12px;
}

.ph-check {
  border: 1px solid #e2e8f0;
  border-left-width: 5px;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.ph-check.is-pass {
  border-left-color: #10b981;
}

.ph-check.is-warning {
  border-left-color: #f59e0b;
}

.ph-check.is-fail {
  border-left-color: #e11d48;
}

.ph-check-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.ph-check h3 {
  margin: 4px 0 6px;
  font-size: 17px;
}

.ph-check p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.ph-badge {
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .04em;
}

.ph-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.ph-check-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
  align-items: stretch;
}

.ph-fix {
  border-color: #14b8a6 !important;
  color: #0f766e !important;
}

.ph-no-fix {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.ph-check-detail,
.ph-details {
  margin: 0;
  border-top: 1px solid #e2e8f0;
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
}

.ph-logs {
  margin-top: 18px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.ph-log-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.ph-log-table th,
.ph-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 13px;
}

.ph-log-table th {
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  text-transform: uppercase;
}

.ph-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 18px;
  color: #64748b;
  background: #f8fafc;
}

@media (max-width: 760px) {
  .ph-head,
  .ph-check-main {
    flex-direction: column;
  }

  .ph-check-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
