/* Admin "Runs & usage" styles — owned by the admin-usage feature; loaded after /styles.css (linked by /views/admin.js).
 * Tokens only (light + dark come from styles.css). Data tables keep their rules; everything else is space and tone steps. */
.ru-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ru-head h2 { margin: 0; }
.ru-head .tabs { margin: 0; }
.ru-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
.ru-stat { background: var(--soft); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.ru-stat .l { font-size: 12px; color: var(--muted); }
.ru-stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; }
.ru-stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ru-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.ru-grid > div { min-width: 0; }
.ru-grid h3, .ru-sub { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.ru-sub { margin-top: 18px; }
.ru-est { font-size: 11px; color: var(--warn); white-space: nowrap; }
.ru-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; align-items: end; }
.ru-filters .field { margin: 0; }
.ru-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ru-pager .btn[disabled] { opacity: .45; cursor: default; }
.ru-table td.ru-who { min-width: 160px; }
.ru-table td.ru-when, .ru-table td.num { white-space: nowrap; }
@media (max-width: 1180px) { .ru-grid { grid-template-columns: 1fr; } }
.ru-table td.ru-who a, .ru-table td.ru-when a { font-weight: 550; }
.ru-table tr.ru-total td { font-weight: 600; border-bottom: 0; background: var(--soft); }
.ru-prompt { max-width: 420px; overflow-wrap: anywhere; }
.ru-err { color: var(--bad); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.ru-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.ru-off { padding: 18px; }

@media (max-width: 860px) {
  .ru-grid { grid-template-columns: 1fr; }
  .ru-filters { grid-template-columns: 1fr 1fr; }
  .ru-filters .ru-q { grid-column: 1 / -1; }
  /* Runs table: each run becomes a stacked block on phones (no sideways scroll). */
  .ru-stack thead { display: none; }
  .ru-stack, .ru-stack tbody, .ru-stack tr, .ru-stack td { display: block; width: 100%; }
  .ru-stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ru-stack td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .ru-stack td::before { content: attr(data-l); color: var(--muted); font-family: var(--font); font-size: 12px; text-align: left; flex: none; }
  .ru-stack td:empty { display: none; }
  .ru-stack td.ru-who, .ru-stack td.ru-when, .ru-stack td.ru-key { display: block; text-align: left; min-width: 0; }
  .ru-stack td.ru-who::before, .ru-stack td.ru-when::before, .ru-stack td.ru-key::before { content: none; }
  .ru-stack td.ru-key { font-weight: 600; }
  .ru-stack tr.ru-total { background: var(--soft); padding: 10px; border-radius: var(--radius); }
  .ru-stack tr.ru-total td { background: none; }
  .ru-prompt { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .ru-table * { transition: none !important; } }
