.pg-diagnostics-host {
  grid-column: 1 / -1;
  min-width: 0;
}

.pgd-shell {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--pg-line, #d9e2ea);
  border-radius: 6px;
}

.pgd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pg-line, #d9e2ea);
}

.pgd-head span {
  display: block;
  color: #718096;
  font-size: .56rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pgd-head h3 {
  margin: 1px 0 0;
  color: #1d2b3c;
  font-size: .86rem;
  line-height: 1.2;
}

.pgd-head em {
  color: #526174;
  font-size: .6rem;
  font-style: normal;
  font-weight: 700;
}

.pgd-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--pg-line, #d9e2ea);
  border-bottom: 1px solid var(--pg-line, #d9e2ea);
}

.pgd-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px 7px 13px;
  color: #526174;
  background: #f8fafc;
  border: 0;
  cursor: pointer;
}

.pgd-tab::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #64748b;
  content: "";
}

.pgd-tab.amber::before { background: #d99116; }
.pgd-tab.blue::before { background: #3269df; }
.pgd-tab.coral::before { background: #d95f42; }
.pgd-tab.teal::before { background: #0f9f82; }
.pgd-tab.green::before { background: #1a9a62; }

.pgd-tab:hover,
.pgd-tab.active {
  background: #fff;
}

.pgd-tab.active {
  box-shadow: inset 0 -2px 0 #243c56;
}

.pgd-tab span {
  overflow: hidden;
  font-size: .62rem;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pgd-tab b {
  margin-left: 8px;
  color: #172033;
  font-size: .68rem;
  white-space: nowrap;
}

.pgd-body {
  min-height: 205px;
  background: #fff;
}

.pgd-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--pg-line, #d9e2ea);
  border-bottom: 1px solid var(--pg-line, #d9e2ea);
}

.pgd-metric {
  position: relative;
  min-width: 0;
  min-height: 72px;
  padding: 9px 10px 8px 13px;
  background: #fff;
}

.pgd-metric::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 3px;
  border-radius: 2px;
  background: #64748b;
  content: "";
}

.pgd-metric.blue::before { background: #3269df; }
.pgd-metric.teal::before { background: #0f9f82; }
.pgd-metric.coral::before { background: #d95f42; }
.pgd-metric.amber::before { background: #d99116; }
.pgd-metric.green::before { background: #1a9a62; }
.pgd-metric.orange::before { background: #e67e22; }

.pgd-metric > span {
  display: block;
  overflow: hidden;
  color: #65758a;
  font-size: .57rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pgd-metric strong {
  display: block;
  margin-top: 3px;
  color: #172033;
  font-size: 1.08rem;
  line-height: 1;
}

.pgd-metric small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #718096;
  font-size: .54rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pgd-split {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(220px, .8fr);
  min-height: 130px;
}

.pgd-split > div {
  min-width: 0;
  padding: 9px 11px;
}

.pgd-split h4,
.pgd-issues h4 {
  margin: 0 0 7px;
  color: #25364a;
  font-size: .65rem;
}

.pgd-note {
  padding: 10px 12px;
  color: #526174;
  background: #f7f9fb;
  border-left: 1px solid var(--pg-line, #d9e2ea);
  font-size: .58rem;
  line-height: 1.45;
}

.pgd-note b {
  color: #25364a;
  font-size: .62rem;
}

.pgd-note p {
  margin: 5px 0 0;
}

.pgd-economic-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border-top: 1px solid var(--pg-line, #d9e2ea);
  border-bottom: 1px solid var(--pg-line, #d9e2ea);
  background: #f7f9fb;
}

.pgd-economic-title div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pgd-economic-title span {
  color: #25364a;
  font-size: .67rem;
  font-weight: 800;
}

.pgd-economic-title b,
.pgd-economic-title small {
  color: #6b7b8e;
  font-size: .55rem;
}

.pgd-economic-metrics .pgd-metric strong {
  font-size: .94rem;
}

.pgd-economic-split {
  min-height: 118px;
}

.pgd-table-wrap {
  overflow: auto;
  max-height: 220px;
}

.pgd-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  color: #405167;
  font-size: .58rem;
}

.pgd-table-wrap th,
.pgd-table-wrap td {
  padding: 5px 7px;
  border: 1px solid #dfe7ee;
  text-align: center;
}

.pgd-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #526174;
  background: #edf2f6;
  font-weight: 800;
}

.pgd-table-wrap td:first-child,
.pgd-table-wrap th:first-child {
  text-align: left;
}

.pgd-bar {
  height: 7px;
  margin-top: 4px;
  overflow: hidden;
  background: #e7edf2;
  border-radius: 4px;
}

.pgd-bar i {
  display: block;
  height: 100%;
  background: #64748b;
  border-radius: inherit;
}

.pgd-bar i.blue { background: #3269df; }
.pgd-bar i.green { background: #15956c; }
.pgd-bar i.orange { background: #e67e22; }
.pgd-bar i.red { background: #d95f42; }

.pgd-good {
  color: #08745f;
  font-weight: 800;
}

.pgd-bad {
  color: #b33838;
  font-weight: 800;
}

.pgd-footnote {
  padding: 7px 11px;
  color: #65758a;
  background: #f7f9fb;
  border-top: 1px solid var(--pg-line, #d9e2ea);
  font-size: .56rem;
  font-weight: 600;
}

.pgd-risk-layout {
  grid-template-columns: minmax(0, 2.4fr) minmax(220px, .6fr);
}

.pgd-risk-period {
  padding: 7px 11px 5px;
  color: #25364a;
  background: #fff;
  font-size: .62rem;
  font-weight: 800;
}

.pgd-risk-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--pg-line, #d9e2ea);
  border-top: 1px solid var(--pg-line, #d9e2ea);
  border-bottom: 1px solid var(--pg-line, #d9e2ea);
}

.pgd-risk-columns > section {
  min-width: 0;
  background: #fff;
}

.pgd-risk-columns h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin: 0;
  padding: 6px 9px;
  color: #405167;
  background: #f5f7f9;
  border-left: 3px solid #64748b;
  font-size: .59rem;
}

.pgd-risk-columns section.purchase h4 {
  border-left-color: #3269df;
}

.pgd-risk-columns section.fabrication h4 {
  border-left-color: #d99116;
}

.pgd-risk-columns h4 b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  color: #25364a;
  background: #fff;
  border: 1px solid #dce5ed;
  border-radius: 9px;
  font-size: .56rem;
}

.pgd-risk-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 174px;
  padding: 1px 8px 4px;
}

.pgd-risk-empty {
  display: grid;
  place-items: center;
  min-height: 60px;
  padding: 10px;
  color: #7a8999;
  font-size: .57rem;
  text-align: center;
}

.pgd-risk-scope {
  padding: 7px 11px;
  color: #65758a;
  background: #f7f9fb;
  font-size: .55rem;
  line-height: 1.4;
}

.pgd-risk-scope b {
  color: #405167;
}

.pgd-supply-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 5px 11px;
  background: #f8fafc;
  border-bottom: 1px solid var(--pg-line, #d9e2ea);
}

.pgd-supply-strip > div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #dce5ed;
  border-left: 3px solid #64748b;
  border-radius: 4px;
}

.pgd-supply-strip > div.purchase {
  border-left-color: #3269df;
}

.pgd-supply-strip > div.fabrication {
  border-left-color: #d99116;
}

.pgd-supply-strip span {
  color: #526174;
  font-size: .57rem;
  font-weight: 800;
  white-space: nowrap;
}

.pgd-supply-strip strong {
  color: #172033;
  font-size: .72rem;
}

.pgd-supply-strip > small {
  margin-left: auto;
  color: #718096;
  font-size: .55rem;
  white-space: nowrap;
}

.pgd-supply-strip > small b {
  color: #b33838;
}

.pgd-risk {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 7px;
  padding: 6px 3px;
  border-top: 1px solid #edf1f4;
}

.pgd-risk:first-of-type {
  border-top: 0;
}

.pgd-risk > i {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  background: #d99116;
  border-radius: 50%;
}

.pgd-risk.critical > i {
  background: #d95f42;
}

.pgd-risk b,
.pgd-risk span,
.pgd-risk small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pgd-risk b {
  color: #25364a;
  font-size: .61rem;
}

.pgd-risk span {
  margin-top: 1px;
  color: #6b7b8e;
  font-size: .54rem;
  font-weight: 700;
}

.pgd-risk small {
  margin-top: 2px;
  color: #718096;
  font-size: .54rem;
}

.pgd-quality-layout {
  display: grid;
  grid-template-columns: minmax(160px, .62fr) minmax(300px, 1.3fr) minmax(240px, 1.08fr);
  min-height: 205px;
}

.pgd-score {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  background: #eef8f5;
  border-right: 1px solid var(--pg-line, #d9e2ea);
}

.pgd-score span {
  color: #397164;
  font-size: .61rem;
  font-weight: 800;
}

.pgd-score strong {
  margin-top: 5px;
  color: #08745f;
  font-size: 1.65rem;
  line-height: 1;
}

.pgd-score small {
  margin-top: 7px;
  color: #617c75;
  font-size: .55rem;
  line-height: 1.35;
}

.pgd-quality-list {
  padding: 8px 11px;
}

.pgd-quality-row {
  padding: 5px 0;
  border-top: 1px solid #edf1f4;
}

.pgd-quality-row:first-child {
  border-top: 0;
}

.pgd-quality-row > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pgd-quality-row b,
.pgd-quality-row span {
  color: #405167;
  font-size: .58rem;
}

.pgd-quality-row small {
  display: block;
  margin-top: 3px;
  color: #718096;
  font-size: .52rem;
}

.pgd-issues {
  padding: 10px 12px;
  background: #fafbfc;
  border-left: 1px solid var(--pg-line, #d9e2ea);
}

.pgd-issues ul {
  margin: 0;
  padding-left: 15px;
  color: #5c6c7f;
  font-size: .56rem;
  line-height: 1.55;
}

.pgd-empty {
  padding: 16px;
  color: #718096;
  background: #f8fafc;
  border: 1px dashed #ccd7e1;
  font-size: .6rem;
  text-align: center;
}

.pgd-empty-large {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 190px;
}

.pgd-empty-large b {
  margin-bottom: 5px;
  color: #405167;
  font-size: .7rem;
}

@media (max-width: 1000px) {
  .pgd-tabs,
  .pgd-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pgd-quality-layout {
    grid-template-columns: 1fr 2fr;
  }

  .pgd-issues {
    grid-column: 1 / -1;
    border-top: 1px solid var(--pg-line, #d9e2ea);
    border-left: 0;
  }

  .pgd-risk-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pgd-risk-columns > section:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .pgd-tabs,
  .pgd-metrics,
  .pgd-split,
  .pgd-quality-layout {
    grid-template-columns: 1fr;
  }

  .pgd-note,
  .pgd-issues,
  .pgd-score {
    border-top: 1px solid var(--pg-line, #d9e2ea);
    border-right: 0;
    border-left: 0;
  }

  .pgd-supply-strip {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .pgd-supply-strip > div {
    flex: 1 1 135px;
    justify-content: space-between;
  }

  .pgd-supply-strip > small {
    width: 100%;
    margin-left: 0;
  }

  .pgd-risk-columns {
    grid-template-columns: 1fr;
  }

  .pgd-risk-columns > section:first-child {
    grid-column: auto;
  }

  .pgd-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}
