.rhc-wrap {
  max-width: 720px;
  margin: 40px auto;
  padding: 28px 32px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.rhc-wrap h1 { margin: 0 0 6px; font-size: 24px; color: #1a73e8; }
.rhc-tagline { color: #666; margin: 0 0 18px; font-size: 14px; }
.rhc-user { color: #444; font-size: 13px; margin: 8px 0; }
.rhc-status-line { margin: 10px 0 14px; font-size: 13px; color: #555; }
.rhc-btn {
  display: inline-block; padding: 10px 18px; border: none; border-radius: 6px;
  font-size: 14px; font-weight: 600; cursor: pointer; margin-right: 8px;
}
.rhc-btn-primary { background: #1a73e8; color: #fff; }
.rhc-btn-primary:hover { background: #155cb8; }
.rhc-btn-primary:disabled { background: #9bb6d6; cursor: wait; }
.rhc-btn-secondary { background: #eee; color: #333; }
.rhc-btn-secondary:hover { background: #ddd; }
.rhc-banner {
  padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: 13px;
}
.rhc-banner-ok { background: #e8f5e9; color: #2e7d32; border: 1px solid #66bb6a; }
.rhc-banner-fail { background: #ffebee; color: #c62828; border: 1px solid #ef5350; }
.rhc-region-row { margin: 12px 0; font-size: 13px; }
.rhc-region-row label { font-weight: 600; color: #444; }
.rhc-region-row select { margin-left: 6px; padding: 4px 8px; border-radius: 4px; border: 1px solid #ccc; font-size: 13px; }
.rhc-region-hint { display: block; font-size: 11px; color: #888; margin-top: 4px; }

/* ==== Dashboard: vehicle cards ==== */
.rhc-vehicles { display: grid; gap: 14px; margin-top: 14px; }
.rhc-vehicle-card {
  border: 1px solid #e0e0e0; border-radius: 10px; padding: 14px 16px; background: #fff;
}
.rhc-vehicle-card.tier-full { border-left: 4px solid #2e7d32; }
.rhc-vehicle-card.tier-basic { border-left: 4px solid #f57f17; }
.rhc-vehicle-card.tier-lite { border-left: 4px solid #6a737d; }
.rhc-vehicle-card.tier-unsupported { border-left: 4px solid #c62828; background: #fafafa; }
.rhc-vc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rhc-vc-title h3 { margin: 0 0 2px; font-size: 17px; color: #222; }
.rhc-vc-vin { font-size: 11px; color: #888; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.rhc-tier-badge {
  font-size: 11px; padding: 4px 10px; border-radius: 12px; font-weight: 700; white-space: nowrap;
}
.rhc-tier-badge.tier-full { background: #e8f5e9; color: #2e7d32; }
.rhc-tier-badge.tier-basic { background: #fff8e1; color: #f57f17; }
.rhc-tier-badge.tier-lite { background: #f0f3f6; color: #555; }
.rhc-tier-badge.tier-unsupported { background: #ffebee; color: #c62828; }
.rhc-vc-result { margin-top: 10px; }
.rhc-progress { font-size: 13px; color: #1a73e8; padding: 8px 12px; background: #e8f0fe; border-radius: 6px; }
.rhc-result-ok { font-size: 13px; color: #2e7d32; padding: 8px 12px; background: #e8f5e9; border-radius: 6px; }
.rhc-result-fail { font-size: 13px; color: #c62828; padding: 8px 12px; background: #ffebee; border-radius: 6px; }
.rhc-json-details { margin-top: 8px; }
.rhc-json-details summary { cursor: pointer; font-size: 12px; color: #555; padding: 4px 0; }
.rhc-json-details pre { background: #0d1117; color: #c9d1d9; padding: 12px; border-radius: 6px; font-size: 11px; max-height: 400px; overflow: auto; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.rhc-vc-meta { font-size: 12px; color: #555; margin: 8px 0; }
.rhc-vc-reason { font-size: 11px; color: #888; margin-top: 4px; font-style: italic; }
.rhc-vc-actions { margin-top: 8px; }
.rhc-btn-primary:disabled { background: #cfd8e3; cursor: not-allowed; }

/* ==== Active jobs + history panels ==== */
.rhc-panels { margin-top: 8px; }
.rhc-job-card {
  border: 1px solid #e0e0e0; border-radius: 10px; padding: 14px 16px; background: #fff; margin-bottom: 12px;
}
.rhc-job-card.status-capturing { border-left: 4px solid #1a73e8; background: #e8f0fe; }
.rhc-job-card.status-finalizing { border-left: 4px solid #f57f17; background: #fff8e1; }
.rhc-job-card.status-done       { border-left: 4px solid #2e7d32; background: #e8f5e9; }
.rhc-job-card.status-expired    { border-left: 4px solid #757575; background: #f5f5f5; }
.rhc-job-card.status-failed     { border-left: 4px solid #c62828; background: #ffebee; }
.rhc-job-card.status-cancelled  { border-left: 4px solid #9e9e9e; background: #fafafa; }
.rhc-job-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rhc-job-status { font-size: 12px; color: #555; margin-left: 8px; font-weight: 600; }
.rhc-job-pct { font-size: 11px; color: #888; }
.rhc-job-meta { font-size: 12px; color: #555; margin-top: 6px; }
.rhc-job-hint { font-size: 13px; color: #333; margin-top: 8px; padding: 8px 10px; background: #fff; border-radius: 6px; border: 1px solid #eee; }
.rhc-job-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.rhc-report-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fff; margin-bottom: 8px;
}
.rhc-report-actions { display: flex; gap: 6px; align-items: center; }

/* QR on report cover */
.rpt-cert-qr { padding: 6px; background: #fff; border: 1px solid #ddd; border-radius: 6px; }

/* Vehicle pairing step — shown before a Full capture when the car has no key */
.rhc-pair-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.rhc-pair-box {
  background: #fff; border-radius: 10px; padding: 22px 24px;
  max-width: 460px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.rhc-pair-box h2 { margin: 0 0 10px; font-size: 20px; }
.rhc-pair-steps { margin: 12px 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.rhc-pair-linkrow { margin: 16px 0 8px; }
.rhc-pair-or { font-size: 13px; color: #666; margin: 12px 0 8px; }
.rhc-pair-qr { display: inline-block; padding: 8px; background: #fff; border: 1px solid #ddd; border-radius: 6px; }
.rhc-pair-qr img { display: block; width: 160px; height: 160px; }
.rhc-pair-status {
  margin-top: 16px; padding: 10px 12px; border-radius: 6px;
  background: #f1f6fd; border: 1px solid #d6e4f7; font-size: 13px; color: #234;
}
.rhc-pair-status-warn { background: #fff6e5; border-color: #f0d9a8; color: #6b4c00; }
.rhc-pair-status ul { margin: 8px 0 0 18px; padding: 0; }
.rhc-pair-actions { margin-top: 16px; display: flex; gap: 8px; }
