/* supervisor / admin tables */
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.card .btn.ghost { color: var(--ink-2); }
.card .btn.ghost:hover { background: #f1f4f6; }

/* circuit error bar (Blazor shows it when the page stops responding) */
#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; padding: 12px 48px 12px 20px;
  background: #fff4e5; color: #6b3e00; border-top: 2px solid #f0a020; box-shadow: 0 -2px 8px rgba(0,0,0,.15); font-size: 14px; }
#blazor-error-ui .reload { font-weight: 600; margin: 0 6px; }
#blazor-error-ui .dismiss { position: absolute; right: 16px; top: 8px; font-size: 20px; text-decoration: none; color: inherit; }

/* admin tab bar: wraps instead of widening the page (D-05); labels never break inside */
#admintabs { flex-wrap: wrap; row-gap: 2px; max-width: 100%; }
#admintabs a { white-space: nowrap; }
.main, .content { min-width: 0; }
.content { max-width: 100%; }

/* DEF-14: signed-in user + environment tag */
.whoami { padding: 10px; margin: 6px 0; border-top: 1px solid var(--navy-2); }
.whoami-name { color: #fff; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami-role { color: #8592ab; font-size: 12px; }
.env-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 4px; background: #f0a020; color: #2b1a00; }
.env-tag.env-prod, .env-tag.env-production { background: var(--red, #c62828); color: #fff; }
.side .brand .env-tag { margin-left: auto; }

/* DEF-05: narrow windows - top bar + off-canvas side panel under 1024 px (tested 1366 / 1024 / 768 / 375) */
.mnav-cb, .mtop, .mnav-backdrop { display: none; }
@media (max-width: 1023px) {
  .shell { display: block; }
  .mtop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; padding: 8px 12px; }
  .mnav-btn { cursor: pointer; font-size: 22px; line-height: 1; padding: 2px 8px; border-radius: 6px; color: #fff; user-select: none; }
  .mnav-btn:hover { background: var(--navy-2); }
  .mtop-title { font-weight: 600; }
  .mtop-user { margin-left: auto; font-size: 12px; color: #c9d2e3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45vw; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; max-width: 85vw; height: 100vh; overflow-y: auto; z-index: 60;
          transform: translateX(-105%); transition: transform 0.18s ease; box-shadow: 4px 0 18px rgba(0, 0, 0, 0.25); }
  .mnav-cb:checked ~ .side { transform: none; }
  .mnav-cb:checked ~ .mnav-backdrop { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(8, 24, 53, 0.45); }
  .main { min-width: 0; }
  .content { padding: 14px; }
}
@media (max-width: 480px) {
  .content { padding: 10px; }
  table { font-size: 12px; }
  .row.wrap > * { max-width: 100%; }
}

/* tab links without href (no javascript: URLs under the CSP, VAPT v2 SEC-03) */
a[role="button"] { cursor: pointer; }
/* UI-01 (monkey k008 -> E2E 195): a 20-digit number widened the QA calls table under the side panel, which then took
   the clicks. Grid columns may shrink below their content, and long numbers wrap instead of overflowing. */
.grid > * { min-width: 0; }
td.mono, .mono.small { overflow-wrap: anywhere; }
