/* Super admin portal: the editor's look (editor.css) with a wider page, a tenant list, status badges and the log. */

.is-admin main.admin-main { margin: 0 auto; width: 100%; max-width: 64rem; flex: 1; }
.admin-brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--on-chrome); text-decoration: none; }
.admin-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 1rem; }
.admin-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0; list-style: none; }
.admin-nav a { color: var(--on-chrome); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem; border-bottom: 2px solid transparent; }
.admin-nav a:hover { border-bottom-color: var(--accent-on-chrome); }
.admin-nav a[aria-current="page"] { border-bottom-color: var(--on-chrome); font-weight: 600; }
.admin-nav form { margin: 0; }
.admin-logout { color: var(--on-chrome); min-height: 44px; }
.topbar-in { flex-wrap: wrap; }
/* on narrow phones the lockup and its clear space leave no room beside it: "Plattform-Verwaltung" goes below it */
@media (max-width: 29.99rem) {
  .admin-brand { flex-wrap: wrap; }
  .admin-brand .brand-product { flex-basis: 100%; margin: 0 1.25rem 0.75rem; padding-left: 0; border-left: 0; }
}
.admin-foot { margin-top: auto; padding: 1rem var(--gutter) 1.5rem; color: var(--muted); font-size: 0.9375rem; text-align: center; }
.admin-foot p { margin: 0; }

.muted { color: var(--muted); }
.crumb { margin: 0 0 0.25rem; }
main > .crumb:first-child { margin-top: calc((1lh - 44px) / 2); }
.crumb a { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 44px; }
.crumb .i { width: 1.1rem; height: 1.1rem; }
.pagehead .lead .sep { margin-left: 0.6rem; }
code { font: 0.95em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-2); padding: 0.05rem 0.35rem; border-radius: 4px; }

/* status and feature badges: text carries the meaning, colour only supports it */
.badge { display: inline-flex; align-items: center; font-size: 0.875rem; font-weight: 600; line-height: 1.2; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1.5px solid currentColor; white-space: nowrap; vertical-align: 0.1em; }
.badge.is-preview { color: #6b4b00; background: #fff6dc; }
.badge.is-active { color: #14532d; background: #e6f6ec; }
.badge.is-deactivated { color: #8a1c13; background: #fbedea; }
.badge.is-pending { color: #8a1c13; background: #fff6dc; border-style: dashed; }
.badge.is-on { color: #14532d; background: #e6f6ec; }
.badge.is-off { color: var(--muted); background: var(--paper); }
.badge.is-missing { color: #6b4b00; background: #fff6dc; border-style: dashed; }

/* tenant list: one card per tenant, columns from tablet width */
.tenants { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.tenant { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem 1rem; }
.tenant-name { font-size: 1.125rem; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.tenant-name a { text-decoration-thickness: 2px; }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.5rem 1.25rem; margin: 0; }
.facts-row div { min-width: 0; }
.facts-row dt { font-size: 0.8125rem; color: var(--muted); }
.facts-row dd { margin: 0.1rem 0 0; overflow-wrap: anywhere; }
.facts-row .addr { font-variant-numeric: tabular-nums; }

/* tenant page */
.admin-section { --inset: 1.125rem; padding: var(--inset) 1rem; }
.admin-section > h2 { font-size: 1.25rem; }
.admin-section .actions { margin: 1rem 0 0; }
.kv { margin: 0; display: grid; gap: 0.6rem; }
.kv div { display: grid; gap: 0.1rem; }
.kv dt { font-size: 0.875rem; color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 40rem) { .kv div { grid-template-columns: 11rem 1fr; gap: 1rem; } }
.owners { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.owners li { overflow-wrap: anywhere; }

.features { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
/* the switch state as a bar inside the frame that follows the corners (editor.css: a coloured edge) */
.feature { border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--line); border-radius: var(--r-s); padding: 0.75rem 0.9rem; background: var(--bg); }
.feature.is-on { box-shadow: inset 4px 0 0 #2f7d4f; background: var(--paper); }
.feature-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.feature-head h3 { margin: 0; font-size: 1.0625rem; }
.feature-summary { margin: 0.35rem 0 0.25rem; }
.feature .hint { margin: 0.25rem 0; }
details.more { margin: 0.25rem 0; }
details.more summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
.feature-action { margin: 0.25rem 0 0; }
.feature-action .button { min-height: 44px; }
.gates { margin: 0.25rem 0 0.5rem; display: grid; gap: 0.4rem; font-size: 0.9375rem; }
.gates dt { color: var(--muted); }
.gates dd { margin: 0; }
.gates ul { margin: 0.1rem 0 0; padding-left: 1.2rem; }

.audit { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.audit li { display: grid; gap: 0.1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.audit li:last-child { border-bottom: 0; }
.audit time { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 48rem) { .audit li { grid-template-columns: 11rem 1fr auto; gap: 1rem; align-items: baseline; } }

.code-input { font-variant-numeric: tabular-nums; letter-spacing: 0.25em; max-width: 12rem; }
.button.danger-ghost { border-color: var(--danger); color: var(--danger); }
.button.danger-ghost:hover { background: var(--danger-tint); border-color: var(--danger); color: var(--danger); }
.confirm ul { margin: 0.25rem 0 0.75rem; padding-left: 1.2rem; }
.confirm li { margin: 0.2rem 0; }
.is-admin .card-public { max-width: 34rem; }
/* the team of a tenant: role form, remove link and revoke button under each entry */
.team-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0.5rem 0 0; }
.team-row label { font-size: 0.875rem; color: var(--muted); flex-basis: 100%; }

.tenant-filter { margin: 0 0 1rem; }
.tenant-filter .actions { margin: 0; }

/* tenant list: the Vorschau-Link state sits under the Zustand badge, the address breaks at dots only (<wbr>) */
.facts-row .sub { display: block; margin-top: 0.35rem; font-size: 0.8125rem; color: var(--muted); }
.facts-row .sub .badge { font-size: 0.75rem; padding: 0.1rem 0.45rem; }
.facts-row dd.addr { overflow-wrap: normal; word-break: normal; }
/* with the script the list filters while typing: no "Anzeigen" button */
.tenant-filter.is-live [data-no-js] { display: none; }
.tenant-filter .actions [hidden] { display: none; }
/* API-Tokens (src/admin/api-views.ts): the token shown once breaks anywhere; the curl example scrolls inside its box,
   which may shrink below the example's width (a flex item would otherwise grow to it and widen the page) */
.api-once > div { min-width: 0; }
.secret { overflow-wrap: anywhere; word-break: break-all; }
.api-example { margin: 0.5rem 0 0.75rem; padding: 0.75rem; background: var(--bg-2); border-radius: var(--r-s); overflow-x: auto; font-size: 0.875rem; line-height: 1.5; }
.api-example code { background: none; padding: 0; white-space: pre; }
.api-tokens li + li { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.api-tokens .kv { margin-top: 0.5rem; }
