/* 401.gladi.de - Farben wie gladi.de; hell/dunkel nach System, per Schalter festlegbar (data-theme am <html>) */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #0f1a2e;
  --muted: #55627a;
  --border: #dbe2ee;
  --accent: #1f6fd6;
  --accent-soft: #e6f0fd;
  --ok: #1b7f4b;
  --ok-soft: #e3f5ea;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --bad: #b42318;
  --bad-soft: #fde8e7;
  --radius: 14px;
  --max: 1040px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121c30; --text: #e6edf7; --muted: #9eabc2; --border: #24324d;
    --accent: #5aa9ff; --accent-soft: #15284a; --ok: #5fd39a; --ok-soft: #123224; --warn: #ffd27a;
    --warn-soft: #3a2d08; --bad: #ff8a80; --bad-soft: #3d1614;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #121c30; --text: #e6edf7; --muted: #9eabc2; --border: #24324d;
  --accent: #5aa9ff; --accent-soft: #15284a; --ok: #5fd39a; --ok-soft: #123224; --warn: #ffd27a;
  --warn-soft: #3a2d08; --bad: #ff8a80; --bad-soft: #3d1614;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

header.top { border-bottom: 1px solid var(--border); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; margin-right: auto; }
.tools { display: flex; align-items: center; gap: 8px; }
.tools form { margin: 0; }
.who { color: var(--muted); font-size: .9rem; }
.theme-toggle, .link-button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit;
  font-size: .85rem; cursor: pointer; }
.theme-toggle:hover, .link-button:hover { background: var(--accent-soft); }
.theme-toggle svg { width: 16px; height: 16px; }

main { padding: 36px 0 32px; }
.back { display: inline-block; margin-bottom: 14px; font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }
a.link-button { text-decoration: none; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 28px; max-width: 720px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
        text-decoration: none; color: var(--text); display: block; }
.card:hover { border-color: var(--accent); }
.card strong { font-size: 1.15rem; }
.card span { display: block; color: var(--muted); font-size: .9rem; }
.button { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700;
          padding: 10px 18px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
:root[data-theme="dark"] .button { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button { color: #0b1220; } }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }

.notice { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 20px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.err { background: var(--bad-soft); color: var(--bad); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
th.role, td.role { text-align: center; width: 132px; }
td:first-child { min-width: 150px; }
td .sub { display: block; color: var(--muted); font-size: .82rem; }
td form { margin: 0; }
.toggle { min-width: 84px; white-space: nowrap; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .85rem; cursor: pointer;
          border: 1px solid var(--border); background: transparent; color: var(--muted); }
.toggle.on { background: var(--ok-soft); color: var(--ok); border-color: transparent; font-weight: 700; }
.toggle:hover { border-color: var(--accent); }
.toggle:disabled { cursor: not-allowed; opacity: .5; }
.pill { font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.muted { color: var(--muted); border: 1px solid var(--border); }
.legend { color: var(--muted); font-size: .9rem; margin-top: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
footer .wrap { padding-top: 18px; padding-bottom: 28px; }

@media (max-width: 560px) {
  main { padding-top: 24px; }
  h1 { font-size: 1.6rem; }
  .theme-toggle .label, .who { display: none; }
}
