/* Reports: hub cards, report tables and the audit log drawer. */

/* hub */
.rp-hub { display: grid; gap: var(--s-6); }
.rp-group h2 { margin: 0 0 var(--s-3); font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: 24px; color: var(--text); }
.rp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.rp-card {
  display: flex; flex-direction: column; gap: var(--s-1); min-height: 112px; padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  color: var(--text); text-decoration: none; transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
.rp-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); text-decoration: none; }
.rp-card:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--primary); }
.rp-card h3 { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: 20px; }
.rp-card p { flex: 1; margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: 18px; }
.rp-go { display: inline-flex; align-items: center; gap: 2px; margin-top: var(--s-2); color: var(--primary); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.rp-go svg { width: 16px; height: 16px; }

/* report output */
.rp-out { transition: opacity 120ms var(--ease); }
.rp-out.is-busy { opacity: .55; pointer-events: none; }
.rp-emp { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.rp-emp a, .rp-emp > span { font-weight: var(--fw-medium); color: var(--text); white-space: nowrap; }
.rp-emp a:hover { color: var(--primary); }
.rp-emp small { color: var(--text-muted); font-size: var(--fs-xs); line-height: 16px; }
.ui-table td.rp-empc { padding-top: 4px; padding-bottom: 4px; }
.rp-none { color: var(--text-faint); }
.rp-flags { color: var(--text-muted); font-size: var(--fs-xs); }
.ui-table td.rp-wrap { min-width: 200px; max-width: 360px; white-space: normal; padding-top: 6px; padding-bottom: 6px; }
.ui-table td.rp-sum { min-width: 280px; max-width: 520px; }
.rp-msg {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-10) var(--s-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); text-align: center;
}
.rp-msg p { margin: 0; color: var(--text-2); font-size: var(--fs-md); }

/* audit entry drawer */
.rp-ad-sum { margin: 0 0 var(--s-4); font-size: var(--fs-md); line-height: 20px; color: var(--text); }
.rp-ad-h { margin: var(--s-5) 0 var(--s-2); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.rp-chg-wrap { border: 1px solid var(--border); border-radius: var(--r-md); overflow: auto; }
.rp-chg { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.rp-chg th { background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rp-chg td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.rp-chg tr:last-child td { border-bottom: 0; }
.rp-chg td:first-child { color: var(--text-2); font-weight: var(--fw-medium); white-space: nowrap; }
.rp-ad-list { margin: 0; padding-left: 18px; color: var(--text-2); font-size: var(--fs-sm); line-height: 20px; }
.rp-ad-reason { margin: 0; padding: var(--s-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 20px; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .rp-cards { grid-template-columns: minmax(0, 1fr); }
  .rp-card { min-height: 0; }
  .ui-table td.rp-wrap { min-width: 180px; }
}
