/* Admin · Health Check — only what is specific to this page. The shell, cards, pills, tables,
   controls and modal all come from /shared/admin.css. */

/* ------------------------------- Reports table ------------------------------- */
/* Pure fr tracks, no minmax floors. Proportional columns cannot sum past the container, so no
   value can be pushed outside the card at any width — the failure admin.css documents as its
   first defect. Every text cell truncates instead. */
.hc-reports { --adm-cols: 2.6fr 0.8fr 1fr 1fr 0.9fr 0.9fr; }

.hc-score {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px;
  border-radius: 999px; padding: 4px 10px;
  font-family: "Lexend", sans-serif; font-weight: 700; font-size: 12.5px;
}
.hc-score--none { background: var(--adm-idle-bg); border: 1px solid var(--adm-idle-bd); color: var(--adm-idle-fg); }
.hc-score--good { background: var(--adm-ok-bg); border: 1px solid var(--adm-ok-bd); color: var(--adm-ok-fg); }
.hc-score--fair { background: var(--adm-info-bg); border: 1px solid var(--adm-info-bd); color: var(--adm-info-fg); }
.hc-score--work { background: var(--adm-warn-bg); border: 1px solid var(--adm-warn-bd); color: var(--adm-warn-fg); }
.hc-score--risk { background: var(--adm-bad-bg); border: 1px solid var(--adm-bad-bd); color: var(--adm-bad-fg); }

.hc-row-actions { display: flex; justify-content: flex-end; }

.hc-empty-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 16px; background: var(--adm-info-bg); margin-bottom: 14px;
}
.hc-empty-title { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 18px; color: var(--adm-ink); margin-bottom: 6px; }
.hc-empty-body { font-size: 14.5px; color: var(--adm-muted); max-width: 420px; margin: 0 auto 18px; }

/* ------------------------------- Report view ------------------------------- */
.hc-back {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: none; padding: 0;
  cursor: pointer; font-family: "Lexend", sans-serif; font-weight: 600; font-size: 13.5px; color: #5F6A79;
  align-self: flex-start;
}
.hc-back:hover { color: var(--adm-ink); }

/* The context card sits ABOVE the tab strip because organisation, domain and scan source belong to
   all three tabs, not to whichever one happens to be open. */
.hc-context { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 24px 26px; }
.hc-context-eyebrow {
  font-family: "Lexend", sans-serif; font-weight: 800; font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--adm-muted); margin-bottom: 7px;
}
.hc-context-org { font-family: "Lexend", sans-serif; font-weight: 800; font-size: 27px; line-height: 1.1; letter-spacing: -0.5px; color: var(--adm-ink); margin: 0 0 6px; }
.hc-context-meta { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; font-size: 13.5px; color: var(--adm-muted); }
/* The separator lives inside the span it precedes. As a standalone flex child it is orphaned at the
   end of line one whenever the text after it wraps. */
.hc-context-rest { display: inline-flex; align-items: center; gap: 11px; }
.hc-context-sep { width: 3px; height: 3px; border-radius: 50%; background: #C2CBD8; flex: 0 0 auto; }
.hc-facts { flex: 0 0 auto; display: flex; gap: 24px; flex-wrap: wrap; }
.hc-fact { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hc-fact-value { font-family: "Lexend", sans-serif; font-weight: 800; font-size: 17px; color: var(--adm-ink); line-height: 1; }
.hc-fact-label { font-size: 11.5px; color: var(--adm-muted); white-space: nowrap; }

.hc-rep-tabs { display: flex; gap: 28px; padding: 0 26px; border-bottom: 1px solid #E7EBF1; flex-wrap: wrap; }
.hc-rep-tab {
  appearance: none; background: none; border: none; cursor: pointer; padding: 16px 2px;
  font-family: "Lexend", sans-serif; font-size: 14.5px; font-weight: 600; color: var(--adm-muted);
  border-bottom: 3px solid transparent;
}
.hc-rep-tab[aria-selected="true"] { font-weight: 700; color: var(--adm-ink); border-bottom-color: var(--adm-red); }
.hc-rep-body { padding: 26px; position: relative; }

/* ------------------------------- Generation panel ------------------------------- */
/* Driven by real progress polled from the service, not by an animation timing out. The prototype
   used CSS keyframes because it had no backend to ask; here the stage really is the stage. */
.hc-gen { padding: 24px 26px; background: #F7F9FC; border: 1px solid var(--adm-line-soft); border-radius: 16px; }
.hc-gen-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.hc-gen-title { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 16px; color: var(--adm-ink); }
.hc-gen-note { font-size: 13.5px; color: var(--adm-muted); padding-left: 30px; }
.hc-gen-rule { height: 1px; background: #E4E9F1; margin: 20px 0 6px; }
.hc-gen-steps { display: flex; flex-direction: column; gap: 2px; }
.hc-gen-step { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 9px; }
.hc-gen-step[data-state="current"] { background: rgba(212, 155, 58, 0.08); }
.hc-gen-mark { flex: 0 0 auto; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.hc-gen-label { flex: 1; min-width: 0; font-family: "Lexend", sans-serif; font-weight: 600; font-size: 14px; color: var(--adm-body); }
.hc-gen-step[data-state="pending"] .hc-gen-label { color: var(--adm-muted); font-weight: 500; }
.hc-gen-elapsed { flex: 0 0 auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--adm-muted); }
.hc-spin {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid #F1E2C8; border-top-color: #E0A21E; animation: hcSpin .9s linear infinite;
}
.hc-spin--lg { width: 18px; height: 18px; }
.hc-dot-pending { width: 9px; height: 9px; border-radius: 50%; background: #D8DEE8; }
@keyframes hcSpin { to { transform: rotate(360deg); } }

/* ------------------------------- Documents ------------------------------- */
/* The report and the statement are long-form artefacts read top to bottom, not dashboards. */
.hc-doc { max-width: 68rem; font-size: 14px; line-height: 1.7; color: var(--adm-body); }
.hc-doc h2 {
  font-family: "Lexend", sans-serif; font-weight: 700; font-size: 19px; color: var(--adm-ink);
  margin: 30px 0 4px;
}
.hc-doc h2::after { content: ""; display: block; height: 2px; background: var(--adm-red); margin-top: 6px; margin-bottom: 14px; }
.hc-doc h3 { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 15px; color: var(--adm-ink); margin: 24px 0 10px; }
.hc-doc h2:first-child, .hc-doc h3:first-child { margin-top: 0; }
.hc-doc p { margin: 0 0 12px; }
.hc-doc ul, .hc-doc ol { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.hc-doc li { line-height: 1.65; }
.hc-doc strong { font-family: "Lexend", sans-serif; font-weight: 700; color: var(--adm-ink); }
.hc-doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #F2F5FA; border-radius: 4px; padding: 1px 5px; }
.hc-doc pre {
  margin: 0 0 14px; background: #F7F9FC; border: 1px solid var(--adm-line-soft); border-radius: 9px;
  padding: 13px 15px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.6; color: var(--adm-body);
}
.hc-doc pre code { background: none; padding: 0; font-size: inherit; }
.hc-doc blockquote {
  margin: 0 0 18px; padding: 14px 16px; background: #FBFCFE;
  border: 1px solid var(--adm-line-soft); border-left: 3px solid var(--adm-red); border-radius: 0 10px 10px 0;
  color: var(--adm-muted); font-size: 13.5px;
}
.hc-doc table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; }
.hc-doc thead th {
  text-align: left; background: #F7F9FC; border-bottom: 1px solid var(--adm-line);
  padding: 10px 12px; font-family: "Lexend", sans-serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--adm-muted);
}
.hc-doc tbody td { padding: 10px 12px; border-bottom: 1px solid var(--adm-line-soft); vertical-align: top; overflow-wrap: anywhere; }
.hc-doc tbody tr:last-child td { border-bottom: none; }
.hc-doc em { color: var(--adm-muted); }

.hc-doc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.hc-doc-actions .adm-note { margin-left: auto; }

/* Statement: the same document treatment, plus the two CSM-facing frames the customer never sees. */
.hc-stmt-guide {
  background: var(--adm-warn-bg); border: 1px solid var(--adm-warn-bd); border-radius: 14px;
  padding: 16px 18px; font-size: 13.5px; line-height: 1.65; color: var(--adm-body); margin-bottom: 22px;
}
.hc-stmt-foot { border-top: 1px solid var(--adm-line-soft); padding-top: 18px; margin-top: 26px; font-size: 13px; color: var(--adm-muted); line-height: 1.65; }
/* An unresolved fact must be obviously unresolved, never quietly absent. */
.hc-placeholder { background: #FFF3CD; border-bottom: 1.5px dashed #C89A2B; color: #6B4B00; padding: 0 3px; border-radius: 3px; font-weight: 600; }

/* CSM notes */
.hc-notes { display: flex; flex-direction: column; gap: 26px; max-width: 68rem; }
.hc-notes-h { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 20px; color: var(--adm-ink); margin: 0 0 4px; }
.hc-notes-rule { height: 2px; background: var(--adm-red); margin-bottom: 16px; }
.hc-check { font-size: 14px; line-height: 1.7; margin: 0; }
.hc-check strong { font-family: "Lexend", sans-serif; font-weight: 700; color: var(--adm-warn-fg); }
.hc-patterns { --adm-cols: 1.4fr 2.4fr 0.5fr; border: 1px solid #E4E9F1; border-radius: 10px; overflow: hidden; }
.hc-patterns .adm-thead { background: var(--adm-ink); border-bottom: none; }
.hc-patterns .adm-th { color: #fff; }

/* ------------------------------- Wizard ------------------------------- */
.hc-wizard { width: 620px; }
.hc-steps { display: flex; gap: 5px; padding: 0 28px; margin-top: 16px; }
.hc-step-seg { flex: 1; height: 4px; border-radius: 999px; background: #E7EBF1; }
.hc-step-seg[data-on="true"] { background: var(--adm-red); }
.hc-wizard-body { padding: 22px 28px 26px; }
.hc-wizard-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 28px; border-top: 1px solid #EFF1F6; background: #FBFCFE;
  border-radius: 0 0 22px 22px;
}
/* The hint takes the leftover width and wraps inside it, so the two buttons stay on the footer
   row. Giving the hint its natural width instead pushed Generate onto a second line. */
.hc-wizard-hint { flex: 1 1 0; min-width: 0; font-size: 12.5px; line-height: 1.45; color: var(--adm-muted); }
.hc-wizard-spacer { display: none; }
.hc-eyebrow {
  font-family: "Lexend", sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--adm-muted); margin-bottom: 10px;
}
.hc-acct { border: 1px solid var(--adm-line-soft); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.hc-acct-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--adm-line-soft); }
.hc-acct-row:last-child { border-bottom: none; }
/* The tick and the plus carry meaning (held on file versus needs you), so each row also carries a
   text hint: the state never rests on a glyph alone. */
.hc-acct-mark { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.hc-acct-mark--held { background: var(--adm-ok-bg); }
.hc-acct-mark--needs { background: var(--adm-warn-bg); }
.hc-acct-label { flex: 0 0 150px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hc-acct-name { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 13.5px; color: var(--adm-ink); }
.hc-acct-hint { font-size: 11.5px; color: var(--adm-muted); }
.hc-acct-value { flex: 1; min-width: 0; font-size: 13.5px; color: var(--adm-body); }

.hc-src { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.hc-src-opt {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1.6px solid var(--adm-field); border-radius: 14px; padding: 14px 16px;
}
.hc-src-opt[aria-pressed="true"] { border-color: var(--adm-red); background: #FEF7F5; }
.hc-src-opt:disabled { cursor: not-allowed; background: #F7F9FC; }
.hc-src-radio {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #C9D3E0;
  display: flex; align-items: center; justify-content: center;
}
.hc-src-opt[aria-pressed="true"] .hc-src-radio { border-color: var(--adm-red); background: var(--adm-red); }
.hc-src-radio span { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.hc-src-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hc-src-label { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 14.5px; color: var(--adm-ink); }
.hc-src-note { font-size: 12.5px; color: var(--adm-muted); line-height: 1.45; }

.hc-recap { background: #FBFCFE; border: 1px solid var(--adm-line-soft); border-radius: 14px; padding: 15px 17px; }
.hc-recap-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 4px 0; }
.hc-recap-key { flex: 0 0 auto; font-size: 12.5px; color: var(--adm-muted); }
.hc-recap-val { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 12.5px; color: var(--adm-ink); text-align: right; min-width: 0; }
.hc-recap-val--unset { color: var(--adm-bad-fg); }

.hc-textarea {
  width: 100%; min-height: 104px; resize: vertical; padding: 13px 15px;
  border: 1.6px solid var(--adm-field); border-radius: 12px;
  font-family: "Mulish", sans-serif; font-size: 14px; line-height: 1.6; color: var(--adm-body); outline: none;
}
.hc-textarea:focus { border-color: #2F6FE0; box-shadow: 0 0 0 4px rgba(47, 111, 224, 0.12); }

/* ------------------------------- Combo box ------------------------------- */
/* Its own component rather than the shared RMSelect, for one reason: the panel is
   `position: fixed` and placed from the trigger's bounding rect. The shared one is absolute, and
   an absolute panel inside the modal's `overflow-y: auto` body is clipped by the scroll box, which
   makes the list unreachable — the trap the design handoff calls out by name. */
.hc-combo { position: relative; width: 100%; }
.hc-combo-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  background: #fff; border: 1.6px solid var(--adm-field); border-radius: 11px; padding: 10px 13px;
  cursor: pointer; font-family: "Lexend", sans-serif; font-weight: 600; font-size: 13.5px; color: var(--adm-ink);
  text-align: left;
}
.hc-combo-trigger:disabled { cursor: not-allowed; background: #F7F9FC; color: var(--adm-muted); }
.hc-combo-trigger[data-empty="true"] { color: var(--adm-muted); font-weight: 500; }
.hc-combo-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-combo-chev { flex: 0 0 auto; color: var(--adm-muted); transition: transform .15s ease; }
.hc-combo-trigger[aria-expanded="true"] .hc-combo-chev { transform: rotate(180deg); }

.hc-combo-panel {
  position: fixed; z-index: 90; background: #fff; border: 1px solid #D8DEE8; border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 26, 40, 0.18); overflow: hidden;
}
.hc-combo-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--adm-line-soft); }
.hc-combo-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: "Mulish", sans-serif; font-size: 14px; color: var(--adm-ink); }
.hc-combo-list { max-height: 216px; overflow-y: auto; }
.hc-combo-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; padding: 10px 13px; border-bottom: 1px solid var(--adm-line-soft);
}
.hc-combo-opt:last-child { border-bottom: none; }
.hc-combo-opt:hover, .hc-combo-opt:focus-visible { background: #F7F9FC; }
.hc-combo-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hc-combo-opt-label { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 13.5px; color: var(--adm-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-combo-opt-note { font-size: 12px; color: var(--adm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-combo-none { padding: 18px 14px; text-align: center; font-size: 13px; color: var(--adm-muted); }

.hc-error { background: var(--adm-bad-bg); border: 1px solid var(--adm-bad-bd); color: var(--adm-bad-fg); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; line-height: 1.6; }

@media (max-width: 1100px) {
  .hc-reports { --adm-cols: minmax(0, 1fr); }
}
