/* Admin dashboard RBAC (master goal V·D·21, page 42): the role matrix on top of admin-ops-kit.css (strict CSP). */
.rb-matrix-wrap { max-block-size: 70vh; overflow: auto; }
.rb-matrix th.rb-perm { text-align: center; white-space: nowrap; }
.rb-matrix .rb-cell { text-align: center; }
.rb-matrix tbody th { text-align: start; font-weight: 600; padding: 10px 12px; border-block-end: 1px solid var(--table-row-border); }
/* The headings stay in view while the matrix scrolls; the role column stays in view while it scrolls sideways.  The
   whole head (area row and permission row) is one sticky block, so its rows can never overlap whatever their height
   (a wrapped area name, a larger font or browser zoom). */
.rb-matrix thead { position: sticky; inset-block-start: 0; z-index: 2; }
.rb-matrix thead th { background: var(--panel); }
.rb-matrix tbody th, .rb-matrix .rb-corner { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--panel); }
.rb-matrix .rb-corner { z-index: 3; }
.rb-area { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rb-code { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.rb-no { color: var(--muted); font-size: 12px; }
.rb-break-glass { margin: 8px 0 0; padding-inline-start: 20px; line-height: 1.7; }
.rb-break-glass .rb-code { display: inline; }

/* On a phone the matrix becomes one card per role with the permissions it holds. */
.rb-cards { display: none; margin: 0; padding: 0; list-style: none; }
.rb-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-block-end: 8px; }
.rb-card ul { margin: 6px 0 0; padding-inline-start: 18px; }
@media (max-width: 640px) {
  .rb-matrix-wrap { display: none; }
  .rb-cards { display: block; }
}
