/* Parity health report — internal /rep/parity-health page.
   Follows the Ops Tracker chrome (orders_tracker.css). */

.parity-health-page { padding: 1.5rem 2.5rem 5rem; max-width: 100%; }

.parity-health-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.parity-health-title { font-size: 1.45rem; font-weight: 700; margin: 0 0 0.15rem; }
.parity-health-sub { margin: 0; color: var(--text-secondary, #6b7280); font-size: 0.85rem; }
.parity-health-actions { display: flex; gap: 0.5rem; }
.parity-health-refresh,
.parity-health-export { border: 1px solid var(--border, #d1d5db); background: var(--surface, #fff); border-radius: 6px; padding: 0.45rem 0.9rem; font-size: 0.85rem; cursor: pointer; }
.parity-health-export { background: var(--brand, #641e8c); border-color: var(--brand, #641e8c); color: #fff; }

.parity-health-loading,
.parity-health-error,
.parity-empty { padding: 2rem 0; color: var(--text-secondary, #6b7280); }
.parity-health-error { color: #b91c1c; }

/* headline cards */
.parity-stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.75rem; }
.parity-stat-card { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 0.8rem 1rem; background: var(--surface, #fff); }
.parity-stat-value { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.parity-stat-label { font-size: 0.75rem; color: var(--text-secondary, #6b7280); margin-top: 0.2rem; }

.parity-section-title { font-size: 1.05rem; font-weight: 700; margin: 1.75rem 0 0.6rem; }

/* tables — wide content scrolls inside its wrapper, never the page */
.parity-table-wrap { overflow-x: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; background: var(--surface, #fff); }
.parity-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.parity-table th { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 2px solid var(--border, #e5e7eb); white-space: nowrap; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary, #6b7280); }
.parity-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border-light, #f3f4f6); vertical-align: top; }
.parity-table tbody tr:last-child td { border-bottom: none; }
.parity-cell-label { font-weight: 600; white-space: nowrap; }
.parity-cell-count { text-align: left; font-variant-numeric: tabular-nums; }
.parity-cell-right { text-align: right; }
.parity-cell-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.parity-cell-detail { max-width: 34rem; color: var(--text-secondary, #4b5563); }
.parity-asset-name { color: var(--text-secondary, #6b7280); font-weight: 400; }

.parity-samples { margin-top: 0.35rem; }
.parity-sample { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: var(--text-secondary, #6b7280); padding: 0.1rem 0; }

/* status pills */
.parity-pill { display: inline-block; border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; }
.parity-pill-pass { background: #dcfce7; color: #166534; }
.parity-pill-warn { background: #fef3c7; color: #92400e; }
.parity-pill-fail { background: #fee2e2; color: #991b1b; }
.parity-pill-info { background: #e0e7ff; color: #3730a3; }

@media (prefers-color-scheme: dark) {
  .parity-stat-card, .parity-table-wrap,
  .parity-health-refresh { background: var(--surface, #1f2430); border-color: var(--border, #374151); }
  .parity-pill-pass { background: #14532d; color: #bbf7d0; }
  .parity-pill-warn { background: #78350f; color: #fde68a; }
  .parity-pill-fail { background: #7f1d1d; color: #fecaca; }
  .parity-pill-info { background: #312e81; color: #c7d2fe; }
}
