/* receipts.css — Delivery Receipt page styles
 * Owns: /receipts page visual treatment
 * Does NOT own: global theme tokens (see theme.css)
 */

/* ── PAGE HEADER ── */
.receipt-page-header { padding: 5rem 2rem 3rem; background: var(--bg); border-bottom: 1px solid var(--border); }
.receipt-page-inner { max-width: 800px; margin: 0 auto; }
.receipt-breadcrumb { margin-bottom: 1.5rem; }
.breadcrumb-link { font-size: 0.85rem; color: var(--fg-muted); text-decoration: none; letter-spacing: 0.02em; }
.breadcrumb-link:hover { color: var(--accent); }
.receipt-page-title { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.03em; color: var(--fg); margin-bottom: 1rem; margin-top: 1rem; }
.receipt-page-lede { font-size: 1.05rem; color: var(--fg-muted); line-height: 1.7; max-width: 620px; margin-bottom: 0.75rem; }
.receipt-page-sub { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.6; max-width: 620px; }
.receipt-page-sub strong { color: var(--fg); }

/* ── RECEIPT DOCUMENT ── */
.receipt-doc-wrap { padding: 3rem 2rem; background: var(--bg); }
.receipt-doc { max-width: 800px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }

/* STATUS BAR */
.receipt-status-bar { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 2rem; background: rgba(0,212,255,0.04); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.receipt-badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.3rem 0.75rem; border-radius: 100px; }
.receipt-badge--delivered { color: #34d399; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.25); }
.receipt-meta-id { font-family: var(--font-head); font-size: 0.8rem; font-weight: 600; color: var(--fg); }
.receipt-meta-date { font-size: 0.8rem; color: var(--fg-muted); margin-left: auto; }

/* ANNOTATION CALLOUTS */
.receipt-annotation { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1.5rem; }
.receipt-annotation--top { margin: 0; border-radius: 0; border-left: none; border-right: none; border-top: none; border-bottom: 1px solid rgba(245,158,11,0.2); padding: 1rem 2rem; }
.receipt-annotation--inline { margin-top: 0; margin-bottom: 1.5rem; }
.annotation-label { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-amber); margin-bottom: 0.35rem; }
.receipt-annotation p { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.6; }

/* SECTIONS */
.receipt-section { padding: 2rem; border-bottom: 1px solid var(--border); }
.receipt-section:last-child { border-bottom: none; }
.receipt-section-title { font-family: var(--font-head); font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.section-title-badge { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; color: var(--accent); background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.25); padding: 0.2rem 0.6rem; border-radius: 100px; text-transform: uppercase; }

/* SUMMARY GRID */
.receipt-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.receipt-kv { display: flex; flex-direction: column; gap: 0.2rem; }
.kv-key { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.kv-val { font-size: 0.95rem; color: var(--fg); }

/* CHECKLIST */
.receipt-checklist { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.5rem; }
.checklist-item { display: flex; gap: 0.85rem; align-items: flex-start; }
.check-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 0.65rem; font-weight: 700; flex-shrink: 0; margin-top: 0.1rem; }
.checklist-item--done .check-icon { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.check-body { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.5; }
.check-body strong { color: var(--fg); }

/* OUT OF SCOPE */
.receipt-out-of-scope { background: rgba(139,148,158,0.06); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; }
.oos-label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 0.5rem; }
.oos-list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.oos-list li { font-size: 0.85rem; color: var(--fg-muted); padding-left: 1rem; position: relative; }
.oos-list li::before { content: '—'; position: absolute; left: 0; }

/* EVIDENCE SECTION */
.receipt-section--evidence { background: rgba(0,212,255,0.02); }
.evidence-block { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.evidence-heading { font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; color: var(--fg); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }

/* RUN STATS */
.run-stats { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.run-stat { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.run-stat-val { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; line-height: 1; }
.run-stat-label { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.run-stat--pass .run-stat-val { color: #34d399; }
.run-stat--fail .run-stat-val { color: #f87171; }
.run-stat--skip .run-stat-val { color: var(--fg-muted); }

/* EVIDENCE LINKS */
.run-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.evidence-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--accent); text-decoration: none; font-weight: 500; transition: opacity 0.15s; }
.evidence-link:hover { opacity: 0.75; }

/* CRITICAL PATHS */
.evidence-critical-paths { border-top: 1px solid var(--border); padding-top: 1rem; }
.cp-label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 0.6rem; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cp-tag { font-size: 0.78rem; color: var(--fg); background: var(--bg-card); border: 1px solid var(--border); padding: 0.3rem 0.75rem; border-radius: 100px; }

/* LIGHTHOUSE */
.lighthouse-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.lh-score { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; min-width: 90px; }
.lh-val { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.lh-label { font-size: 0.65rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-muted); text-align: center; }
.lh-score--green .lh-val { color: #34d399; }
.lh-score--orange .lh-val { color: var(--accent-amber); }
.lh-score--red .lh-val { color: #f87171; }

/* DEPLOY URLS */
.deploy-urls { display: flex; flex-direction: column; gap: 0.6rem; }
.deploy-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.deploy-env { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); min-width: 80px; }
.deploy-url { font-size: 0.88rem; }
.deploy-status { font-size: 0.75rem; font-weight: 600; color: #34d399; margin-left: auto; }

/* BEFORE/AFTER TABLE */
.ba-table-wrap { overflow-x: auto; }
.ba-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ba-table th { text-align: left; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.ba-table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(48,54,61,0.5); color: var(--fg); vertical-align: top; }
.ba-table tr:last-child td { border-bottom: none; }
.ba-before { color: var(--fg-muted); }
.ba-after { color: var(--fg); font-weight: 500; }
.ba-delta--good { color: #34d399; font-weight: 600; }
.ba-delta--bad { color: #f87171; font-weight: 600; }

/* OPS CHECKLIST */
.ops-checklist { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.ops-item { display: flex; gap: 1rem; align-items: flex-start; }
.ops-check { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 0.65rem; font-weight: 700; flex-shrink: 0; margin-top: 0.1rem; }
.ops-item--done .ops-check { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.ops-body { display: flex; flex-direction: column; gap: 0.25rem; }
.ops-body strong { font-size: 0.9rem; color: var(--fg); }
.ops-detail { font-size: 0.82rem; color: var(--fg-muted); line-height: 1.5; }
.ops-detail code { font-family: 'Courier New', monospace; font-size: 0.8rem; background: rgba(139,148,158,0.1); padding: 0.1rem 0.4rem; border-radius: 4px; color: var(--fg); }

/* OPEN ITEMS */
.open-items-wrap { display: flex; flex-direction: column; gap: 1rem; }
.open-item { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; }
.oi-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.oi-status { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.25rem 0.65rem; border-radius: 100px; }
.oi-status--client { color: var(--accent-amber); background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); }
.oi-due { font-size: 0.78rem; color: var(--fg-muted); }
.oi-desc { font-size: 0.88rem; color: var(--fg-muted); line-height: 1.5; margin-bottom: 0.4rem; }
.oi-desc code { font-family: 'Courier New', monospace; font-size: 0.8rem; background: rgba(139,148,158,0.1); padding: 0.1rem 0.4rem; border-radius: 4px; }
.oi-owner { font-size: 0.78rem; color: var(--fg-muted); }
.open-items-none { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.75rem 0; }
.none-label { font-size: 0.9rem; color: #34d399; font-weight: 600; }
.none-sub { font-size: 0.82rem; color: var(--fg-muted); }

/* SIGN-OFF */
.receipt-section--signoff { background: rgba(0,212,255,0.02); }
.signoff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 0.5rem; }
.signoff-block { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem 1.5rem; }
.signoff-role { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 0.5rem; }
.signoff-name { font-family: var(--font-head); font-size: 1rem; font-weight: 600; color: var(--fg); margin-bottom: 0.35rem; }
.signoff-date { font-size: 0.82rem; color: var(--fg-muted); }

/* RECEIPT DOC FOOTER */
.receipt-doc-footer { padding: 1.5rem 2rem; background: var(--bg-2); border-top: 1px solid var(--border); }
.receipt-doc-footer p { font-size: 0.82rem; color: var(--fg-muted); line-height: 1.6; }
.receipt-doc-footer p + p { margin-top: 0.4rem; }
.receipt-doc-link { color: var(--accent); text-decoration: none; }
.receipt-doc-link:hover { text-decoration: underline; }
.receipt-doc-footer code { font-family: 'Courier New', monospace; font-size: 0.78rem; background: rgba(139,148,158,0.1); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* ── BOTTOM CTA ── */
.receipts-cta { padding: 6rem 2rem; background: var(--bg-2); border-top: 1px solid var(--border); }
.receipts-cta-inner { max-width: 640px; margin: 0 auto; }
.receipts-cta-title { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; color: var(--fg); margin-bottom: 1rem; }
.receipts-cta-sub { font-size: 1rem; color: var(--fg-muted); line-height: 1.7; margin-bottom: 2rem; max-width: 500px; }
.receipts-cta-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: #0d1117; font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; padding: 0.9rem 2rem; border-radius: 10px; text-decoration: none; letter-spacing: 0.01em; transition: opacity 0.2s; }
.receipts-cta-btn:hover { opacity: 0.85; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .receipt-page-header { padding: 3rem 1.5rem 2rem; }
  .receipt-doc-wrap { padding: 1.5rem 1rem; }
  .receipt-section { padding: 1.5rem; }
  .receipt-summary-grid { grid-template-columns: 1fr; }
  .signoff-grid { grid-template-columns: 1fr; }
  .run-stats { gap: 1rem; }
  .receipt-status-bar { padding: 0.75rem 1.5rem; }
  .receipt-annotation--top { padding: 0.85rem 1.5rem; }
  .lighthouse-grid { gap: 0.65rem; }
  .lh-score { min-width: 72px; padding: 0.75rem 1rem; }
  .receipts-cta { padding: 4rem 1.5rem; }
  .ba-table th, .ba-table td { padding: 0.6rem 0.65rem; }
}
