/* ── BUG-689: HR Confirmation Pack (hrc-*) ──────────────────────────── */

/* Page */
.hrc-page { padding: 18px 20px; }
.hrc-header { margin-bottom: 16px; }
.hrc-page-title { font-size: 1.25rem; font-weight: 700; display: block; }
.hrc-page-subtitle { font-size: 0.82rem; color: var(--text-muted, #8899aa); display: block; }

/* Main two-column layout */
.hrc-main { display: flex; gap: 16px; align-items: flex-start; }
.hrc-due-panel { flex: 0 0 42%; min-width: 0; }
.hrc-pack-panel { flex: 1 1 0; min-width: 0; }

/* Due panel header */
.hrc-due-header { margin-bottom: 10px; }
.hrc-panel-title { font-size: 1rem; font-weight: 600; display: block; margin-bottom: 8px; }
.hrc-severity-banner { margin-bottom: 6px; }
.hrc-severity-warn {
  background: rgba(241,196,15,0.15); color: #f1c40f;
  border: 1px solid rgba(241,196,15,0.3); border-radius: 4px;
  padding: 4px 10px; font-size: 0.8rem; font-weight: 600;
}

/* Filters */
.hrc-due-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px;
}
.hrc-filter-input {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(128,128,128,0.3);
  border-radius: 4px; padding: 4px 8px; color: inherit; font-size: 0.82rem;
  width: 120px; box-sizing: border-box;
}
.hrc-overdue-check { font-size: 0.82rem; }

/* Buttons */
.hrc-btn-primary {
  background: #4a9eff; color: #fff; border: none; border-radius: 4px;
  padding: 5px 14px; cursor: pointer; font-size: 0.82rem; font-weight: 600;
}
.hrc-btn-primary:hover { background: #2b7de9; }
.hrc-btn-primary:disabled { background: #555; cursor: not-allowed; }
.hrc-btn-secondary {
  background: transparent; border: 1px solid #4a9eff; color: #4a9eff;
  border-radius: 4px; padding: 5px 12px; cursor: pointer; font-size: 0.82rem;
}
.hrc-btn-secondary:hover { background: #1a2a3a; }
.hrc-btn-pdf {
  background: #27ae60; color: #fff; border: none; border-radius: 4px;
  padding: 5px 14px; cursor: pointer; font-size: 0.82rem; font-weight: 600;
}
.hrc-btn-pdf:hover { background: #1e8449; }
.hrc-btn-pdf:disabled { background: #555; cursor: not-allowed; }
.hrc-btn-export {
  background: transparent; border: 1px solid #555; color: inherit;
  border-radius: 4px; padding: 4px 10px; cursor: pointer; font-size: 0.78rem;
}
.hrc-btn-export:hover { border-color: #4a9eff; color: #4a9eff; }

/* Due list */
.hrc-due-list { overflow-x: auto; }
.hrc-due-list-inner { display: flex; flex-direction: column; gap: 2px; }

/* Due row item */
.hrc-due-row { border-bottom: 1px solid rgba(128,128,128,0.12); }
.hrc-due-select {
  background: none; border: none; cursor: pointer; text-align: left; padding: 7px 4px;
  width: 100%; color: inherit; font-size: 0.82rem;
}
.hrc-due-select:hover { background: rgba(74,158,255,0.06); }
.hrc-due-name-row { display: flex; align-items: baseline; gap: 8px; }
.hrc-due-name { font-weight: 600; font-size: 0.85rem; }
.hrc-due-id { font-size: 0.75rem; color: var(--text-muted, #8899aa); }
.hrc-due-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.hrc-due-depot { font-size: 0.75rem; color: var(--text-muted, #8899aa); }
.hrc-due-date { font-size: 0.75rem; color: var(--text-muted, #8899aa); }
.hrc-due-date--overdue { font-size: 0.75rem; color: #e74c3c; font-weight: 600; }
.hrc-overdue-badge {
  font-size: 0.7rem; border-radius: 3px; padding: 1px 5px; font-weight: 600;
  background: rgba(231,76,60,0.2); color: #e74c3c;
}

/* Empty / error */
.hrc-empty-state { padding: 24px; text-align: center; color: var(--text-muted, #8899aa); font-size: 0.85rem; }
.hrc-error-state  { padding: 12px; color: #e74c3c; font-size: 0.85rem; }

/* Pack panel */
.hrc-pack-empty {
  padding: 32px; text-align: center; color: var(--text-muted, #8899aa);
  font-size: 0.9rem; border: 1px dashed rgba(128,128,128,0.3); border-radius: 6px;
}

/* Driver card */
.hrc-driver-card { margin-bottom: 12px; }
.hrc-driver-card-inner {
  background: rgba(74,158,255,0.06); border: 1px solid rgba(74,158,255,0.2);
  border-radius: 6px; padding: 10px 14px;
}
.hrc-hero { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.hrc-hero-name { font-size: 1.05rem; font-weight: 700; }
.hrc-hero-id { font-size: 0.8rem; color: var(--text-muted, #8899aa); }
.hrc-card-fields { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: var(--text-muted, #8899aa); }
.hrc-cohort-rank { font-size: 0.78rem; color: var(--text-muted, #8899aa); margin-top: 4px; }

/* Period row */
.hrc-period-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.hrc-period-label { font-size: 0.82rem; color: var(--text-muted, #8899aa); white-space: nowrap; }

/* Checklist */
.hrc-checklist { margin-bottom: 10px; }
.hrc-checklist-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center;
  gap: 6px; padding: 5px 4px; border-bottom: 1px solid rgba(128,128,128,0.12);
  font-size: 0.83rem;
}
.hrc-cl-label { color: inherit; }
.hrc-cl-auto  { color: var(--text-muted, #8899aa); font-size: 0.78rem; }
.hrc-cl-eff   { font-weight: 700; font-variant-numeric: tabular-nums; }
.hrc-cl-max   { font-size: 0.78rem; color: var(--text-muted, #8899aa); }
.hrc-excl-badge {
  font-size: 0.7rem; border-radius: 3px; padding: 1px 5px;
  background: rgba(128,128,128,0.2); color: #aaa;
}
.hrc-override-badge {
  font-size: 0.7rem; border-radius: 3px; padding: 1px 5px;
  background: rgba(230,126,34,0.2); color: #e67e22;
}

/* Score summary */
.hrc-score-summary { margin-bottom: 12px; }
.hrc-score-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 2px solid rgba(74,158,255,0.3); border-radius: 5px; padding: 8px 14px;
}
.hrc-score-fraction { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hrc-score-pct      { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hrc-score-pass { color: #27ae60; }
.hrc-score-fail { color: #e74c3c; }
.hrc-score-band { font-size: 0.85rem; color: var(--text-muted, #8899aa); }
.hrc-score-min  { font-size: 0.75rem; color: var(--text-muted, #8899aa); margin-left: auto; }

/* Overrides */
.hrc-overrides { margin-bottom: 10px; }
.hrc-overrides-wrap { }
.hrc-ov-heading {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted, #8899aa); margin-bottom: 5px;
}
.hrc-override-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 4px 0; border-bottom: 1px solid rgba(128,128,128,0.1); font-size: 0.82rem;
}
.hrc-ov-label { flex: 0 0 140px; color: var(--text-muted, #8899aa); font-size: 0.8rem; }
.hrc-ov-input {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(128,128,128,0.3);
  border-radius: 4px; padding: 3px 6px; color: inherit; font-size: 0.82rem;
  width: 70px; box-sizing: border-box;
}
.hrc-ov-reason {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(128,128,128,0.3);
  border-radius: 4px; padding: 3px 6px; color: inherit; font-size: 0.82rem;
  flex: 1; min-width: 100px; box-sizing: border-box;
}

/* Manual inputs */
.hrc-manual-inputs { margin-bottom: 12px; }
.hrc-manual-wrap { }
.hrc-man-heading {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted, #8899aa); margin-bottom: 5px;
}
.hrc-manual-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 4px 0; font-size: 0.82rem;
}
.hrc-man-label { color: var(--text-muted, #8899aa); font-size: 0.8rem; white-space: nowrap; }
.hrc-man-input-sm {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(128,128,128,0.3);
  border-radius: 4px; padding: 3px 6px; color: inherit; font-size: 0.82rem;
  width: 90px; box-sizing: border-box;
}

/* Action row */
.hrc-action-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; margin-bottom: 14px; }
.hrc-action-status { font-size: 0.82rem; color: #27ae60; }

/* Evidence sections */
.hrc-evidence-collapse { margin-bottom: 10px; }
.hrc-evidence-summary {
  cursor: pointer; font-size: 0.83rem; font-weight: 600; padding: 5px 0; color: #4a9eff;
}
.hrc-evidence-body { overflow-x: auto; }
.hrc-ev-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.hrc-ev-table th { padding: 5px 8px; background: rgba(44,62,80,0.5); text-align: left; }
.hrc-ev-table td { padding: 4px 8px; border-bottom: 1px solid rgba(128,128,128,0.1); }
.hrc-ev-export-row { display: flex; gap: 6px; margin-top: 6px; }

/* ── Light theme overrides ─────────────────────────────────────────── */
body[data-theme="light"] .hrc-page-subtitle,
body[data-theme="light"] .hrc-hero-id,
body[data-theme="light"] .hrc-card-fields,
body[data-theme="light"] .hrc-cohort-rank,
body[data-theme="light"] .hrc-period-label,
body[data-theme="light"] .hrc-empty-state,
body[data-theme="light"] .hrc-pack-empty,
body[data-theme="light"] .hrc-due-id,
body[data-theme="light"] .hrc-due-depot,
body[data-theme="light"] .hrc-due-date,
body[data-theme="light"] .hrc-cl-auto,
body[data-theme="light"] .hrc-cl-max,
body[data-theme="light"] .hrc-score-band,
body[data-theme="light"] .hrc-score-min,
body[data-theme="light"] .hrc-ov-heading,
body[data-theme="light"] .hrc-ov-label,
body[data-theme="light"] .hrc-man-heading,
body[data-theme="light"] .hrc-man-label { color: #666; }

body[data-theme="light"] .hrc-driver-card-inner {
  background: rgba(74,158,255,0.05); border-color: rgba(74,158,255,0.3);
}
body[data-theme="light"] .hrc-filter-input,
body[data-theme="light"] .hrc-ov-input,
body[data-theme="light"] .hrc-ov-reason,
body[data-theme="light"] .hrc-man-input-sm {
  background: #fff; border-color: #ccc; color: #222;
}
body[data-theme="light"] .hrc-due-row { border-color: rgba(0,0,0,0.06); }
body[data-theme="light"] .hrc-checklist-row { border-color: rgba(0,0,0,0.06); }
body[data-theme="light"] .hrc-ev-table th { background: rgba(44,62,80,0.12); }
body[data-theme="light"] .hrc-ev-table td { border-color: rgba(0,0,0,0.06); }
body[data-theme="light"] .hrc-btn-secondary { color: #2b7de9; border-color: #2b7de9; }
body[data-theme="light"] .hrc-btn-secondary:hover { background: #e8f4ff; }
body[data-theme="light"] .hrc-btn-export { color: #444; border-color: #ccc; }
body[data-theme="light"] .hrc-btn-export:hover { border-color: #2b7de9; color: #2b7de9; }
body[data-theme="light"] .hrc-pack-empty { border-color: #ccc; color: #888; }
body[data-theme="light"] .hrc-severity-warn { color: #b7860a; background: rgba(241,196,15,0.12); border-color: rgba(241,196,15,0.3); }

/* ── 390px responsive ─────────────────────────────────────────────── */
@media (max-width: 440px) {
  .hrc-main { flex-direction: column; }
  .hrc-due-panel, .hrc-pack-panel { flex: 1 1 auto; width: 100%; }
  .hrc-due-filters { flex-direction: column; align-items: flex-start; }
  .hrc-filter-input { width: 100%; }
  .hrc-override-row { flex-direction: column; align-items: flex-start; }
  .hrc-ov-label { flex: none; }
  .hrc-period-row { flex-direction: column; align-items: flex-start; }
}
