/* #694 Reports (staff only), on the Finances page's base (finances.css): same palette, 44px targets, text at least 14px.
   What's added: the controls, the report tabs, day charts, step bars, and tables that become one card per row on a
   phone. */

[hidden] { display: none !important; }

.rp-controls { flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.rp-staff { font-size: 15px; }
.rp-staff span { padding-top: 0; }

.rp-tabs { flex-wrap: wrap; overflow: visible; margin-top: 4px; }
.rp-tabs button { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; }
.rp-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.rp-report[aria-busy="true"] { opacity: .55; transition: opacity .2s; }
.rp-cards { margin-top: 8px; }
.rp-cards .card.attention { border-color: #f0c98a; background: linear-gradient(180deg, var(--warn-bg), #fff 70%); }
.rp-cards .card.attention .big { color: var(--warn); }
.rp-panel { margin: 14px 0; }
.rp-panel > .muted { margin: 0 0 10px; max-width: 75ch; }
.rp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rp-two .rp-panel { margin: 0; }
.rp-foot { margin: 6px 2px 18px; }
.rp-foot a, .rp-report a { color: var(--brand); font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; }
.empty.error { color: var(--bad); font-style: normal; font-weight: 600; }

/* Day charts: one bar a day, the tallest day full height. */
.rp-chart { margin: 6px 0 0; }
.rp-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 8px 0 0; border-bottom: 1px solid var(--line); }
.rp-bar { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; align-items: flex-end; }
.rp-bar .fill { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 0; }
.rp-bar:hover .fill { background: #005f84; }
.rp-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.rp-axis span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.rp-chart figcaption { margin-top: 6px; }

/* Steps: each bar against the first step. */
.rp-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.rp-step-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.rp-step-head span { color: var(--muted); font-size: 14px; }
.rp-step-bar { height: 14px; background: #eef3f6; border-radius: 999px; margin: 6px 0 4px; overflow: hidden; }
.rp-step-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.rp-step-note { margin: 2px 0; font-size: 14px; color: var(--warn); font-weight: 600; }
.rp-steps li > .muted { margin: 0; }

/* Picked dates (2026-11-04): two date inputs beside the Period select. */
.rp-dates { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; }
.rp-dates input[type="date"] { min-width: 150px; }

.rp-table th, .rp-table td { font-size: 14px; }
.rp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-table td .tag { margin-left: 6px; }
/* A visit's pages in order, each with the time on it. */
.rp-code { font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #3f525c; background: #eef1f3; padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.rp-trail { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; max-width: 34ch; }
.rp-trail li { display: inline-flex; align-items: baseline; gap: 4px; }
.rp-trail li + li::before { content: "→"; color: var(--muted); margin-right: 4px; }
.rp-trail-secs { color: var(--muted); font-size: 13px; white-space: nowrap; }
/* Recent visitors (2026-11-04, owner: "make everything fit in the screen and be legible"): six columns of short lines,
   the long network address wrapping instead of pushing the table off the screen. */
.rp-visits td { vertical-align: top; font-size: 15px; line-height: 1.4; }
.rp-stack { display: grid; gap: 2px; justify-items: start; }
.rp-visits td:first-child strong { white-space: nowrap; }
.rp-sub { color: var(--muted); font-size: 13px; }
.rp-ids { display: flex; flex-wrap: wrap; gap: 4px; }
.rp-ip { white-space: normal; overflow-wrap: anywhere; }
.rp-visits .rp-trail { max-width: 44ch; }
.rp-result .tag { margin-left: 0; }
.rp-filter { display: inline-grid; gap: 4px; margin: 0 0 10px; }
.tag.plain { background: #eef1f3; color: #3f525c; }

@media (max-width: 960px) {
  .rp-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .rp-controls { width: 100%; }
  .rp-controls .year-pick { flex: 1 1 100%; }
  .rp-dates { width: 100%; }
  .rp-dates .year-pick { flex: 1 1 40%; }
  .rp-trail { max-width: none; justify-content: flex-end; }
  .rp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rp-cards .card { padding: 14px; }
  .rp-cards .card .big { font-size: 24px; }
  .rp-bars { height: 120px; gap: 1px; }
  .rp-axis span:nth-child(2), .rp-axis span:nth-child(4) { display: none; }
  /* On a phone a table becomes one card per row, each value under its column's name. */
  .rp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rp-table, .rp-table tbody, .rp-table tr, .rp-table td { display: block; width: 100%; }
  .rp-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
  .rp-table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .rp-table td::before { content: attr(data-label); color: var(--muted); font-weight: 650; text-align: left; }
  .rp-table td:first-child { font-weight: 700; font-size: 15px; display: block; text-align: left; }
  .rp-table td:first-child::before { content: none; }
  .rp-table .num { white-space: normal; }
  .rp-visits .rp-stack { justify-items: end; text-align: right; }
  .rp-visits .rp-ids { justify-content: flex-end; }
  .rp-visits td:first-child .rp-stack { grid-auto-flow: column; justify-content: start; justify-items: start; gap: 8px; align-items: baseline; text-align: left; }
}
