/* Compliance audit (admin-compaudit.js): the report, its print view and
   the print stylesheet. */
.ca-filters .filters { flex-wrap: wrap; gap: 10px 14px; }
.ca-filters .filters + .filters { margin-top: 10px; }
.ca-filters input[type="number"] { width: 5.5em; }
.ca-camps { min-width: 220px; flex: 1 1 260px; max-width: 420px; }
.ca-tiles { margin: 0 0 16px; }
.ca-tiles .tone-good .v { color: var(--ok-text); }
.ca-tiles .tone-warn .v { color: var(--warn-text); }
.ca-tiles .tone-bad .v { color: var(--bad-text); }
.ca-report tr.ca-fail td:first-child { box-shadow: inset 3px 0 0 var(--bad-text); }
.ca-report td.ca-bad { color: var(--bad-text); font-weight: 800; }
.ca-facts { margin: 6px 0 0; padding-left: 20px; line-height: 1.55; }
.ca-sec { margin: 22px 0 10px; }
.ca-drill > summary { cursor: pointer; list-style: revert; padding: 2px 0; }
.ca-drill > summary .pill { margin: 0 6px; }
.ca-drill[open] > summary { margin-bottom: 8px; }
.ca-drill td { vertical-align: top; }

/* The print view: a full-page sheet over the console. */
body.ca-printing { overflow: hidden; }
.ca-print { position: fixed; inset: 0; z-index: 60; overflow: auto; background: var(--bg); padding: 16px clamp(16px, 4vw, 48px) 48px; }
.ca-print-bar { display: flex; gap: 10px; justify-content: flex-end; position: sticky; top: 0; padding: 6px 0 12px; background: var(--bg); z-index: 1; }
.ca-print-head h1 { font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
.ca-print-head { border-bottom: 2px solid var(--border-strong, #ccc); padding-bottom: 10px; margin-bottom: 16px; }

@media (max-width: 640px) {
  .ca-camps { max-width: none; }
  .ca-print-head h1 { font-size: 17px; }
}

@media print {
  @page { margin: 14mm 12mm; }
  :root { color-scheme: light; }
  html, body { background: #fff !important; color: #000 !important; }
  /* Printing from the print view: only the sheet. */
  body.ca-printing > *:not(.ca-print) { display: none !important; }
  body.ca-printing { overflow: visible; }
  .ca-print { position: static; overflow: visible; padding: 0; background: #fff; }
  .ca-print-bar { display: none !important; }
  /* Printing the page itself: no menu, filters or buttons. */
  body.admin .sidenav, body.admin header, body.admin .hubbar, body.admin .alertbar, .ca-filters, .page-actions, .toast, .scrim { display: none !important; }
  body.admin .app, body.admin .app-col, body.admin main { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .ca-report .card, .ca-report .tile, .ca-print .card { box-shadow: none !important; border: 1px solid #bbb !important; background: #fff !important; break-inside: avoid-page; }
  .ca-report .tablewrap { overflow: visible !important; max-height: none !important; }
  .ca-report table { font-size: 10.5pt; width: 100%; }
  .ca-report thead { display: table-header-group; }
  .ca-report tr { break-inside: avoid; }
  .ca-drill { break-inside: auto; }
  .ca-drill > summary { list-style: none; }
  .pill { border: 1px solid #888; background: #fff !important; color: #000 !important; }
  a { color: #000; text-decoration: none; }
}

/* Numeric columns line up with their headings. */
.ca-rules th:nth-child(n+3), .ca-bycamp th:nth-child(n+3), .ca-abandon th:nth-child(n+3):not(:last-child) { text-align: right; }
