/* One frame for every admin page (2026-10-12). Linked after each page's own
   <style> rules and scoped to body.admin-wide, so it wins over the per-page
   caps (.ac-page 1360px, .pilot-page 1200px, .run-page 900px, portfolio's
   inline 1320px, reproject's 1100px).

   1. The page body spans the same width as the header: --container-max,
      centered, with the same 40px buffer on each end (the header's
      --chrome-pad lines up with it).
   2. Every card is the same card: one rule border, one radius, one shadow,
      one gap between cards.
   3. A card that holds a table centers its title and the line under it, so
      it is clear which table a title belongs to. */

body.admin-wide > :is(main, .container) {
  max-width: none;
  width: auto;
  margin: 0;
  /* --chrome-pad is the header's own side padding, so the page's left edge
     sits exactly under the brand at every width. */
  padding: var(--space-8) var(--chrome-pad, var(--space-10)) var(--space-16);
  box-sizing: border-box;
}
@media (max-width: 720px) {
  body.admin-wide > :is(main, .container) { padding: var(--space-5) var(--space-4) var(--space-10); }
}
@media (max-width: 480px) {
  body.admin-wide > :is(main, .container) { padding: var(--space-4) var(--space-4) var(--space-10); }
}

/* Cards */
body.admin-wide :is(.ac-card, .form-card, .cc-card, .cp-card, .card, .pf-card, .pf-bar, .stat-tile, .page-intro) {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
body.admin-wide :is(.ac-card, .form-card, .cc-card, .cp-card, .card) {
  padding: var(--space-5) var(--space-6);
  margin: 0 0 var(--space-5);
}
body.admin-wide .page-intro { border-left: 4px solid var(--accent); padding: var(--space-5) var(--space-6); margin: var(--space-3) 0 var(--space-5); }
body.admin-wide .page-intro p, body.admin-wide p.page-intro { max-width: none; }
body.admin-wide .pf-bar { margin-bottom: var(--space-5); }
body.admin-wide .ac-tiles { gap: var(--space-4); margin-bottom: var(--space-5); }
@media (max-width: 640px) {
  body.admin-wide :is(.ac-card, .form-card, .cc-card, .cp-card, .card) { padding: var(--space-4); }
}

/* A table's title sits centered above it. */
body.admin-wide :is(.ac-card, .form-card, .cc-card, .cp-card, .card):has(table) > h2,
body.admin-wide :is(.ac-card, .form-card, .cc-card, .cp-card, .card) :is(h2, h3):has(+ :is(table, .ac-table-wrap, .cc-table-wrap, .table-wrap)) {
  text-align: center;
}
body.admin-wide :is(.ac-card, .form-card, .cc-card, .cp-card, .card):has(table) > h2 + :is(p, .hint, .sub) {
  text-align: center;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
