/* PGB Command Center — public lot pages (lot-detail + the lot-hub chrome).
   render_detail() enqueues ONLY this sheet; render_hub() enqueues this PLUS
   testing-index.css (which owns the hub's COA table). So everything here must
   coexist with testing-index.css on the hub.

   Design system (raw hex by policy — do NOT tokenize or import theme CSS):
     navy #16304F / steel #5E89A3 / teal #1D9E75 (teal-700 #0F6E56 for
     text-carrying teal) / ink-soft #56636F / line #E3E9ED.
   Fonts come from the theme's @font-face; the stacks degrade gracefully.

   The gauge + pill rules are a by-policy DUPLICATE of testing-index.css /
   lab-card.php. The stroke/track/marker .pgb-cc-gauge* rules match
   testing-index.css (only the gauge's outer margin differs — this page seats it
   inside a .pgb-cc-test-card, not a lab card; on the hub, where both sheets
   load, testing-index.css enqueues last and its margin wins, so the divergence
   is harmless). teal-newest is keyed off .pgb-cc-gauge--newest HERE
   (testing-index.css uses .pgb-cc-lab-card:first-child, which the lot-detail
   markup can't satisfy — its cards are .pgb-cc-test-card after an <h2>). Keep
   the colors in sync. */

/* Content is wrapped in the theme header/footer; constrain the inner. */
.pgb-cc-public__inner {
	max-width: 960px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 4rem;
	color: #16304F;
	line-height: 1.5;
}
.pgb-cc-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ---- header ---------------------------------------------------------- */
.pgb-cc-public__header h1 {
	font-family: "Space Grotesk", system-ui, sans-serif;
	font-size: 1.9rem;
	font-weight: 600;
	color: #16304F;
	margin: 0 0 0.35rem;
	letter-spacing: -0.01em;
}
.pgb-cc-public__sub {
	color: #56636F;
	margin: 0 0 1rem;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}
.pgb-cc-public__sub strong {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.9rem;
	color: #16304F;
	font-weight: 600;
}
.pgb-cc-public__lede {
	color: #16304F;
	font-size: 1rem;
	margin: 0 0 0.35rem;
}
.pgb-cc-public__note {
	color: #56636F;
	font-size: 0.9rem;
	margin: 0 0 1rem;
}

/* ---- detail meta (dl) ------------------------------------------------ */
.pgb-cc-lot-meta {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.3rem 1rem;
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
}
.pgb-cc-lot-meta dt {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5E89A3;
	align-self: center;
}
.pgb-cc-lot-meta dd {
	margin: 0;
	color: #16304F;
}

/* ---- test blocks + cards -------------------------------------------- */
.pgb-cc-test-block {
	margin-top: 2.25rem;
}
.pgb-cc-test-block h2 {
	font-family: "Space Grotesk", system-ui, sans-serif;
	font-size: 1.1rem;
	font-weight: 600;
	color: #16304F;
	margin: 0 0 0.75rem;
	padding-bottom: 0.35rem;
	border-bottom: 2px solid #1D9E75;
	display: inline-block;
}
.pgb-cc-test-card {
	box-sizing: border-box;
	border: 1px solid #E3E9ED;
	border-radius: 14px;
	padding: 1.1rem 1.2rem;
	margin-top: 0.85rem;
	background: #fff;
}
.pgb-cc-test-card header {
	display: flex;
	gap: 0.55rem;
	align-items: center;
	margin-bottom: 0.5rem;
}
.pgb-cc-test-card h3 {
	font-family: "Space Grotesk", system-ui, sans-serif;
	font-size: 1rem;
	margin: 0;
	font-weight: 600;
	color: #16304F;
}
.pgb-cc-test-card__lab {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.68rem;
	font-weight: 400;
	color: #5E89A3;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.12rem 0.5rem;
	border: 1px solid #E3E9ED;
	border-radius: 999px;
	background: #fff;
}

/* ---- purity gauge (by-policy duplicate of testing-index.css:162-170) -- */
.pgb-cc-gauge { width: 100%; max-width: 240px; height: auto; margin: 4px 0 12px; display: block; }
.pgb-cc-gauge text {
	fill: #56636F;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 10px;
}
.pgb-cc-gauge__track { stroke: #E3E9ED; stroke-width: 4; stroke-linecap: round; }
.pgb-cc-gauge__fill { stroke: #5E89A3; stroke-width: 4; stroke-linecap: round; }
.pgb-cc-gauge__marker { fill: #5E89A3; stroke: #fff; stroke-width: 2; }
/* Newest round carries the teal read (NOT :first-child — see header note). */
.pgb-cc-gauge--newest .pgb-cc-gauge__fill { stroke: #0F6E56; }
.pgb-cc-gauge--newest .pgb-cc-gauge__marker { fill: #0F6E56; }

/* ---- stats grid ------------------------------------------------------ */
.pgb-cc-stats {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.55rem 1.25rem;
	margin: 0.25rem 0 0.5rem;
}
@media (min-width: 480px) {
	.pgb-cc-stats { grid-template-columns: 1fr 1fr; }
}
.pgb-cc-stats > div {
	display: flex;
	flex-direction: column;
}
.pgb-cc-stat-label {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.68rem;
	color: #56636F;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.pgb-cc-stat-value {
	font-family: "Space Grotesk", system-ui, sans-serif;
	font-size: 1.05rem;
	font-weight: 600;
	color: #16304F;
	margin-top: 2px;
}

/* ---- status pills (pass/fail/neutral kept byte-identical to
   testing-index.css; the rest are detail-only lifecycle pills) --------- */
.pgb-cc-pill {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
}
.pgb-cc-pill--pass {
	background: #d1fae5;
	color: #065f46;
}
.pgb-cc-pill--fail {
	background: #fee2e2;
	color: #991b1b;
}
.pgb-cc-pill--neutral {
	background: #e5e7eb;
	color: #374151;
}
.pgb-cc-pill--exhausted {
	background: #f3f4f6;
	color: #6b7280;
}
.pgb-cc-pill--recalled,
.pgb-cc-pill--superseded {
	background: #fef3c7;
	color: #92400e;
}
.pgb-cc-pill--incoming {
	background: #dbeafe;
	color: #1e40af;
}
/* Phase 7: pending-COA ('Testing in progress') — amber, distinct from
   incoming's blue and recalled's warning tones. */
.pgb-cc-pill--received {
	background: #fef9c3;
	color: #854d0e;
}
.pgb-cc-pill--cancelled {
	background: #f3f4f6;
	color: #6b7280;
}
.pgb-cc-test-card--recalled,
.pgb-cc-test-card--superseded {
	background: #fffbeb;
	border-color: #fde68a;
}

/* ---- report button + links ------------------------------------------ */
.pgb-cc-button {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.5rem 1rem;
	background: #0F6E56;
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 600;
}
.pgb-cc-button:hover {
	background: #16304F;
}

.pgb-cc-public__footer {
	margin-top: 3rem;
	padding-top: 1rem;
	border-top: 1px solid #E3E9ED;
	font-size: 0.82rem;
	color: #56636F;
}

/* ---- lifecycle state banners (lot-detail) --------------------------- */
.pgb-lot-status {
	padding: 1rem 1.1rem;
	margin: 1.25rem 0;
	border-radius: 12px;
}
.pgb-lot-status strong {
	color: #16304F;
}
.pgb-lot-status p {
	margin: 0.35rem 0 0;
	color: #56636F;
}
.pgb-lot-status--incoming {
	background: #f0f6fb;
	border-left: 4px solid #5E89A3;
}
.pgb-lot-status--cancelled {
	background: #f6f7f8;
	border-left: 4px solid #9aa5af;
}
.pgb-lot-status--awaiting-tests {
	background: #fff8e6;
	border-left: 4px solid #e8a435;
}
/* Recall stays deliberately alarming (safety) — not harmonized to teal. */
.pgb-lot-status--recalled {
	background: #fdecec;
	border-left: 4px solid #c0392b;
}
.pgb-lot-status--recalled strong {
	color: #991b1b;
}

/* --- Breadcrumb (back-navigation on hub + lot-detail) ------------------ */
.pgb-cc-breadcrumb {
	font-size: 1rem;
	margin: 0 0 1rem;
	color: #16304F;
}
.pgb-cc-breadcrumb a {
	color: #0F6E56;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.pgb-cc-breadcrumb a:hover {
	text-decoration: none;
}
.pgb-cc-breadcrumb__sep {
	opacity: 0.45;
	margin: 0 0.4rem;
	color: #56636F;
}
.pgb-cc-breadcrumb__current {
	opacity: 0.7;
	color: #56636F;
}
