.pg-lot-adherence-host {
  grid-column: 1 / -1;
}

.pgl-panel,
.pgl-empty {
  border: 1px solid var(--pg-line, #d7e0e8);
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.pgl-empty {
  padding: 14px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.pgl-empty span {
  color: var(--pg-muted, #66758a);
  font-size: .7rem;
}

.pgl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--pg-line, #d7e0e8);
}

.pgl-head > div:first-child > span {
  display: block;
  color: var(--pg-muted, #66758a);
  font-size: .59rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pgl-head h3 {
  margin: 2px 0 0;
  font-size: .95rem;
}

.pgl-coverage {
  display: flex;
  gap: 14px;
  color: var(--pg-muted, #66758a);
  font-size: .62rem;
}

.pgl-coverage b {
  color: var(--pg-ink, #172033);
  margin-left: 4px;
}

.pgl-head-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pgl-visibility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .6rem;
  font-weight: 800;
  color: var(--pg-muted, #66758a);
  text-transform: uppercase;
}

.pgl-visibility select {
  height: 28px;
  border: 1px solid var(--pg-line, #d7e0e8);
  border-radius: 6px;
  background: #fff;
  color: var(--pg-ink, #172033);
  font-size: .66rem;
  font-weight: 700;
  padding: 0 28px 0 9px;
  outline: none;
  cursor: pointer;
}

.pgl-collapsed-note {
  padding: 10px 14px 12px;
  color: var(--pg-muted, #66758a);
  font-size: .62rem;
  border-top: 1px solid var(--pg-line, #d7e0e8);
  background: #fbfcfd;
}

.pgl-legend {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 6px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--pg-line, #d7e0e8);
  font-size: .58rem;
  font-weight: 700;
}

.pgl-legend span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 2px;
}

.pgl-legend .ok::before { background: #0f9f82; }
.pgl-legend .warn::before { background: #d79a16; }
.pgl-legend .critical::before { background: #d64545; }
.pgl-legend .nodata::before { background: #94a3b8; }

.pgl-lots {
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.pgl-lot {
  border: 1px solid #dce4eb;
  border-left: 4px solid #94a3b8;
  border-radius: 4px;
  overflow: hidden;
}

.pgl-lot.ok { border-left-color: #0f9f82; }
.pgl-lot.warn { border-left-color: #d79a16; }
.pgl-lot.critical { border-left-color: #d64545; }

.pgl-lot-summary {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px minmax(150px, 1.4fr) repeat(4, minmax(72px, .5fr)) 76px;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 0;
  background: #fff;
  color: var(--pg-ink, #172033);
  text-align: left;
  cursor: pointer;
}

.pgl-lot-summary:hover { background: #f8fafc; }

.pgl-chevron {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-weight: 800;
}

.pgl-lot-summary > strong {
  font-size: .72rem;
}

.pgl-lot-summary > span:not(.pgl-chevron) {
  text-align: center;
}

.pgl-lot-summary small {
  display: block;
  color: var(--pg-muted, #66758a);
  font-size: .53rem;
  font-weight: 700;
}

.pgl-lot-summary b {
  font-size: .7rem;
}

.pgl-lot-summary em {
  justify-self: end;
  font-size: .57rem;
  font-style: normal;
  font-weight: 800;
}

.pgl-lot.ok .pgl-lot-summary em { color: #08745f; }
.pgl-lot.warn .pgl-lot-summary em { color: #92610a; }
.pgl-lot.critical .pgl-lot-summary em { color: #ad3030; }
.pgl-lot.nodata .pgl-lot-summary em { color: #64748b; }

.pgl-detail {
  border-top: 1px solid #dce4eb;
  background: #fbfcfd;
}

.pgl-detail-head,
.pgl-activity {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 66px 66px 66px 66px 82px;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 3px 12px 3px 42px;
}

.pgl-detail-head {
  color: var(--pg-muted, #66758a);
  background: #eef3f7;
  font-size: .54rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pgl-activity {
  border-top: 1px solid #e8edf2;
  font-size: .61rem;
}

.pgl-activity > span:not(:first-child),
.pgl-detail-head > span:not(:first-child) {
  text-align: center;
}

.pgl-activity.critical > span:nth-child(4) { color: #b42323; font-weight: 800; }
.pgl-activity.warn > span:nth-child(4) { color: #92610a; font-weight: 800; }
.pgl-activity.ok > span:nth-child(4) { color: #08745f; font-weight: 800; }
.pgl-activity.nodata { color: #7b8798; }

.pgl-foot {
  padding: 6px 14px 8px;
  color: var(--pg-muted, #66758a);
  border-top: 1px solid var(--pg-line, #d7e0e8);
  font-size: .56rem;
}

@media (max-width: 820px) {
  .pgl-head { align-items: flex-start; flex-direction: column; }
  .pgl-head-side { width: 100%; justify-content: space-between; }
  .pgl-coverage { flex-wrap: wrap; }
  .pgl-lot-summary {
    grid-template-columns: 24px minmax(120px, 1fr) repeat(4, 60px);
  }
  .pgl-lot-summary em { display: none; }
  .pgl-detail { overflow-x: auto; }
  .pgl-detail-head,
  .pgl-activity { min-width: 640px; }
}
