:root {
  color-scheme: light;
  --bg: #eef0f6;
  --card: #ffffff;
  --ink: #151827;
  --muted: #6b7185;
  --line: #e8eaf1;
  --soft: #f5f6fa;
  --accent: #5b55e8;
  --accent-soft: #ecebfd;
  --accent-mid: #c9c6f8;
  --dark: #1b2232;
  --green: #17a34a;
  --green-soft: #e5f6eb;
  --red: #e5484d;
  --red-soft: #fdecec;
  --amber: #c98200;
  --amber-soft: #fff3d9;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(21, 24, 39, 0.04), 0 8px 24px rgba(21, 24, 39, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
a { color: inherit; }
button { font: inherit; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.req { color: var(--red); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(91, 85, 232, 0.3); }
.btn-primary:hover { background: #4b45d6; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #283146; }
.btn-count {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 13px;
}
.btn-danger-ghost { background: transparent; color: var(--red); border: 1px solid #f5c6c8; padding: 8px 14px; }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #cf3a3f; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }

.alert {
  background: var(--red-soft);
  color: #b4232a;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-weight: 500;
}

/* ---------- Public form ---------- */

.public-body {
  background:
    radial-gradient(900px 500px at 10% -10%, #dcdafd 0%, transparent 60%),
    radial-gradient(700px 500px at 110% 10%, #d8eefc 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}

.public {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

.hero { padding: 0 8px 28px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(26px, 5vw, 34px); margin: 18px 0 12px; }
.hero p { color: #474d63; margin: 0 0 12px; }
.hero-cta { font-weight: 600; color: var(--ink) !important; }

.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.level { background: rgba(255, 255, 255, 0.7); border-radius: 18px; padding: 16px; border: 1px solid rgba(255, 255, 255, 0.9); }
.level p { font-size: 14px; margin: 8px 0 0; }
.level-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
}
.level-2 .level-tag { background: var(--dark); color: #fff; }

.apply { padding: 32px; }
.required-note { margin: 0 0 8px; font-size: 13px; color: var(--muted); }

.field { border: 0; margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 8px; padding: 0; }
.hint { margin: -4px 0 10px; font-size: 13px; color: var(--muted); }

input[type="text"], input:not([type]), input[type="password"], input[type="search"], textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--soft);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
input:focus, textarea:focus { border-color: var(--accent); background: #fff; }
textarea { resize: vertical; min-height: 120px; }

.has-error input, .has-error textarea { border-color: var(--red); background: #fff; }
.error { color: #c42a30; font-size: 13px; margin: 8px 0 0; font-weight: 500; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; border: 0; margin: 0; padding: 0; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 22px 10px 16px;
  border-radius: 999px;
  background: var(--soft);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-weight: 500;
}
.choice input { accent-color: var(--accent); margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 14px 16px;
}
.notice p { margin: 0; font-size: 14px; color: #3d3a8f; }
.notice a { color: var(--accent); font-weight: 600; }
.notice-icon { color: var(--accent); flex: none; margin-top: 1px; }
.discord-note .consent { margin-top: 12px; }

.help { margin-top: 10px; }
.help summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 0;
}
.help summary::-webkit-details-marker { display: none; }
.help summary svg { width: 16px; height: 16px; }
.help summary:hover { text-decoration: underline; }
.help-body {
  margin-top: 8px;
  background: var(--soft);
  border-radius: 16px;
  padding: 14px 16px 16px;
}
.help ol { margin: 0 0 12px; padding-left: 20px; font-size: 14px; color: #474d63; }
.help li + li { margin-top: 2px; }
.help img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.discord-note.has-error .notice { outline: 1.5px solid var(--red); }

.agreement { padding: 22px 0 8px; }
.agreement h2 { font-size: 18px; margin-bottom: 12px; }
.agreement-text {
  max-height: 230px;
  overflow-y: auto;
  background: var(--soft);
  border-radius: 16px;
  padding: 4px 18px;
  font-size: 14px;
  color: #474d63;
}
.agreement-text ul { margin: 0 0 12px; padding-left: 20px; }
.consent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 600;
  cursor: pointer;
}
.consent input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.agreement.has-error .agreement-text { outline: 1.5px solid var(--red); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.apply .btn-primary { width: 100%; margin-top: 22px; }

.thanks { text-align: center; padding: 48px 32px; margin-top: 10vh; }
.thanks h1 { font-size: 26px; margin: 18px 0 10px; }
.thanks p { color: var(--muted); margin: 0; }
.thanks-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}
.thanks-icon svg { width: 30px; height: 30px; }

/* ---------- Admin shell ---------- */

.admin-body {
  background: linear-gradient(160deg, #e9ecf5 0%, #f1f2f8 50%, #ebeef6 100%);
  min-height: 100vh;
}

.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 84px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 24px 0;
  background: rgba(255, 255, 255, 0.75);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
}
.brand {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(91, 85, 232, 0.35);
}
.brand svg { width: 24px; height: 24px; }
.side-nav { display: flex; flex-direction: column; gap: 10px; }
.side-bottom { margin-top: auto; }
.side-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.side-link:hover { background: var(--soft); color: var(--ink); }
.side-link.active { background: var(--accent-soft); color: var(--accent); }

.content {
  flex: 1;
  min-width: 0;
  max-width: 1320px;
  padding: 32px 36px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar h1 { font-size: 30px; margin: 2px 0 4px; }
.topbar .muted { margin: 0; font-size: 14px; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; }

/* ---------- Stat cards ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(21, 24, 39, 0.05), 0 14px 30px rgba(21, 24, 39, 0.08); }
.stat-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.stat-label { margin: 0; font-size: 14px; color: var(--muted); font-weight: 500; }
.stat-value { margin: 2px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

.stat-dark { background: var(--dark); color: #fff; }
.stat-dark .stat-icon { background: rgba(255, 255, 255, 0.1); color: #fff; }
.stat-dark .stat-label, .stat-dark .stat-note { color: rgba(255, 255, 255, 0.65); }
.tone-green .stat-icon { background: var(--green-soft); color: var(--green); }
.tone-red .stat-icon { background: var(--red-soft); color: var(--red); }
.tone-dark .stat-icon { background: #eceef3; color: #3a4154; }

/* ---------- Charts ---------- */

.charts { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 18px; }
.chip {
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  border-radius: 999px;
  padding: 4px 12px;
}

.chart { width: 100%; height: auto; display: block; }
.grid-line { stroke: var(--line); stroke-dasharray: 4 5; }
.axis { fill: #9aa0b4; font-size: 11px; }
.axis-today { fill: var(--accent); font-weight: 700; }
.bar { fill: var(--accent-mid); }
.bar-peak { fill: var(--accent); }
.bar-empty { fill: var(--line); }
g:hover > .bar { fill: var(--accent); }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.donut { width: 170px; height: 170px; }
.arc, .arc-track { fill: none; stroke-width: 16; }
.arc-track { stroke: var(--soft); }
.arc-angenommen { stroke: var(--green); }
.arc-offen { stroke: #f2b544; }
.arc-abgelehnt { stroke: var(--red); }
.arc-gesperrt { stroke: #3a4154; }
.donut-value { font-size: 26px; font-weight: 700; fill: var(--ink); }
.donut-label { font-size: 11px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend strong { margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-angenommen { background: var(--green); }
.dot-offen { background: #f2b544; }
.dot-abgelehnt { background: var(--red); }
.dot-gesperrt { background: #3a4154; }

/* ---------- Table ---------- */

.table-card { padding: 24px 0 8px; }
.table-head { padding: 0 24px; flex-wrap: wrap; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border-radius: 999px;
  padding: 0 6px 0 14px;
  color: var(--muted);
  width: min(320px, 100%);
}
.search input { background: transparent; padding: 9px 8px 9px 0; border: 0; }
.search input:focus { background: transparent; }

.table-card { padding-top: 0; overflow: hidden; }
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  margin-bottom: 20px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  padding: 18px 14px 15px;
  border-bottom: 3px solid transparent;
}
.tab span {
  font-size: 12px;
  background: var(--soft);
  border-radius: 999px;
  padding: 1px 8px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab.active span { background: var(--accent); color: #fff; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 16px;
}
td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
tbody tr:not(.details):hover { background: #fafbfd; }
.link { text-decoration: none; }
.link:hover { color: var(--accent); text-decoration: underline; }

.player { display: flex; align-items: center; gap: 12px; }
.player strong { display: block; font-weight: 600; }
.player small { color: var(--muted); font-size: 13px; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.tone-0 { background: #ecebfd; color: #5b55e8; }
.tone-1 { background: #e2f3fb; color: #1d7fae; }
.tone-2 { background: #e5f6eb; color: #17803d; }
.tone-3 { background: #fff1dc; color: #b06f00; }
.tone-4 { background: #fde8f1; color: #c0306e; }
.tone-5 { background: #eef0f4; color: #4b5266; }

.tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.tag-dark { background: var(--dark); color: #fff; }
.reason {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 280px;
}

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-offen { background: var(--amber-soft); color: var(--amber); }
.status-angenommen { background: var(--green-soft); color: var(--green); }
.status-abgelehnt { background: var(--red-soft); color: var(--red); }
.status-gesperrt { background: #eceef3; color: #3a4154; }

.actions { display: flex; gap: 6px; justify-content: flex-end; }
.actions form { margin: 0; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { color: var(--ink); background: var(--soft); }
.icon-btn.accept { color: var(--green); border-color: #bfe6cc; }
.icon-btn.accept:hover { background: var(--green-soft); }
.icon-btn.reject { color: var(--red); border-color: #f5c6c8; }
.icon-btn.reject:hover { background: var(--red-soft); }
.icon-btn.trust2 { color: #b07a00; border-color: #f1dca6; }
.icon-btn.trust2:hover { background: var(--amber-soft); }
.icon-btn.trust2.active { background: #fbbf24; border-color: #f0b11a; color: #fff; }
.icon-btn.trust2.active:hover { background: #f0b11a; }
.icon-btn.ban { color: #3a4154; }

.trust-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trust { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.trust-1 { background: var(--accent-soft); color: var(--accent); }
.trust-2 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.icon-btn.ban:hover { background: #eceef3; }
.icon-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent-mid); color: var(--accent); }
.icon-btn.chev[aria-expanded="true"] svg { transform: rotate(180deg); }

.panel td { background: #fafbfd; border-top: 0; padding-top: 6px; padding-bottom: 22px; }
.panel h4 { font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.panel .spaced { margin-top: 16px; }
.details-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: start; }
.long-text { margin: 0; white-space: pre-wrap; max-width: 70ch; }
.panel dl { display: grid; grid-template-columns: auto auto; gap: 6px 16px; margin: 0; font-size: 13px; align-items: center; }
.panel dt { color: var(--muted); }
.panel dd { margin: 0; }

.panel-form { display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.panel-form h4 { font-size: 15px; color: var(--ink); margin: 0; }
.panel-form label:not(.choice) { font-size: 13px; font-weight: 600; }
.panel-form textarea { min-height: 80px; background: #fff; border-color: var(--line); }
.panel-note { margin: 0; font-size: 13px; }
.panel-form .choice { padding: 8px 16px 8px 12px; font-size: 14px; background: #fff; border-color: var(--line); }
.panel-form .choice:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: #b4232a; }
.panel-form .choice input { accent-color: var(--red); }
.panel-actions { display: flex; gap: 8px; margin-top: 4px; }

.details-buttons { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.details-buttons form { margin: 0; }
.details-buttons .btn { width: 100%; padding: 8px 14px; }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: #e0defc; }

.setup-hint {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 24px 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--amber-soft);
  color: #7a5200;
}
.setup-hint svg { flex: none; margin-top: 2px; }
.setup-hint p { margin: 0; font-size: 14px; }
.setup-hint code { font-size: 12.5px; background: rgba(255, 255, 255, 0.7); border-radius: 6px; padding: 1px 6px; }

.notice-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.notice-ok { background: var(--green-soft); color: var(--green); }
.notice-warn { background: var(--amber-soft); color: var(--amber); }
.notice-error { background: var(--red-soft); color: var(--red); }
.notice-none { background: var(--soft); color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

/* ---------- Login ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 100%); padding: 36px; display: flex; flex-direction: column; }
.login-card h1 { font-size: 24px; margin: 16px 0 4px; }
.login-card .muted { margin: 0 0 22px; font-size: 14px; }
.login-card label { font-weight: 600; margin-bottom: 8px; }
.login-card .btn { margin-top: 18px; }
.login-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .charts { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .sidebar {
    position: static;
    height: auto;
    width: 100%;
    flex-direction: row;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  }
  .side-nav { flex-direction: row; }
  .side-bottom { margin: 0 0 0 auto; }
  .content { padding: 20px 16px 40px; }
  .stats { grid-template-columns: 1fr; }
  .levels { grid-template-columns: 1fr; }
  .apply { padding: 22px; }
  .details-grid { grid-template-columns: 1fr; }
}

/* ---------- Accounts, protocol, backups ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.spaced-label { margin-top: 14px; }
.login-card input + .hint { margin: 6px 0 4px; }
.login-card .hint + label, .login-card input + label { margin-top: 14px; }

select, input[type="date"] {
  min-height: 48px;
  font: inherit;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--soft);
  color: var(--ink);
}
select:focus, input[type="date"]:focus { outline: none; border-color: var(--accent); background: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.flash {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 14px;
}
.flash svg { flex: none; margin-top: 1px; }
.flash-ok { background: var(--green-soft); color: #11743a; }
.flash-info { background: var(--accent-soft); color: #3d3a8f; }
.flash-warn { background: var(--amber-soft); color: #7a5200; }
.flash-error { background: var(--red-soft); color: #b4232a; }

.code-block {
  margin: 8px 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--dark);
  color: #e6e9f2;
  font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

table.compact { min-width: 720px; }
.panel-form.wide { max-width: none; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 18px; align-items: start; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.consent.inline { margin: 0 0 10px; }
.perm-grid { border: 0; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.perm-grid legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.perm { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.perm input { margin-top: 3px; accent-color: var(--accent); }
.perm-disabled { opacity: 0.5; }

.role-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.role-owner { background: var(--dark); color: #fff; }
.role-admin { background: var(--accent-soft); color: var(--accent); }
.role-moderator { background: var(--soft); color: #3a4154; }

.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; font-size: 14px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; }
.sub-head { font-size: 15px; margin: 16px 0 8px; }
.plain-list { margin: 0; padding-left: 18px; font-size: 14px; }
.spaced-form { margin-top: 16px; }

.history { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 4px; }

.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 16px; align-items: end; }
.filter-bar label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.filter-actions { display: flex; gap: 8px; }
.log-table td { vertical-align: top; }
.event-details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.event-details dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 12.5px; }
.event-details dt { color: var(--muted); }
.event-details dd { margin: 0; }
.event-details pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.pager { display: flex; justify-content: center; padding: 16px; }

.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stat-value.small { font-size: 18px; letter-spacing: 0; line-height: 1.3; word-break: break-all; }
.stat-value.small.mono { font-size: 14px; }

.is-busy { opacity: 0.6; cursor: progress; }

/* Public form additions */
.error-summary ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }
.error-summary a { color: inherit; font-weight: 600; }
.error-summary:focus { outline: 2px solid var(--red); outline-offset: 2px; }
.counter { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); text-align: right; }
.privacy { margin: 18px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--soft); font-size: 14px; }
.privacy summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.privacy summary svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.privacy ul { margin: 10px 0 0; padding-left: 20px; color: #474d63; }
.privacy li + li { margin-top: 6px; }
.apply .btn-primary:disabled { opacity: 0.7; cursor: progress; }

@media (max-width: 1100px) {
  .stats-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .side-nav { flex-wrap: wrap; gap: 6px; }
  .side-link { width: 40px; height: 40px; }
}
.table-card > .card-head:first-child { padding-top: 22px; }
.table-note { padding: 12px 24px 4px; margin: 0; font-size: 13px; }
.form-row .consent.inline { margin-top: 30px; }

/* ---------- Spiele ---------- */
.game-tabs { padding: 0 24px; }
.game-list { list-style: none; margin: 0; padding: 0 24px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.game-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.game-list .mono { font-size: 13px; }
.game-list .trust { flex: none; }
.filter-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 0 24px 16px; }
.chip-link { text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.chip-link.active { background: var(--accent); color: #fff; }

/* ---------- Wiederherstellung ---------- */
.stats-2 { grid-template-columns: repeat(2, 1fr); }
.table-intro { margin: -6px 24px 12px; font-size: 14px; }
.align-right { text-align: right; }
.btn-small { padding: 7px 14px; font-size: 13px; }
.spaced-list { margin: 14px 0 18px; }
.spaced-list li + li { margin-top: 6px; }
.restore-card { width: min(520px, 100%); }
.restore-card progress { width: 100%; height: 10px; margin: 6px 0 16px; accent-color: var(--accent); }
.restore-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.restore-steps li { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.restore-steps .step-label { font-weight: 600; }
.restore-steps .step-state { font-size: 13px; color: var(--muted); }
.restore-steps .step-laeuft { background: var(--accent-soft); }
.restore-steps .step-ok { background: var(--green-soft); }
.restore-steps .step-ok .step-state { color: #11743a; }
.restore-steps .step-fehler { background: var(--red-soft); }
.restore-steps .step-fehler .step-state { color: #b4232a; }
@media (max-width: 720px) { .stats-2 { grid-template-columns: 1fr; } }
.game-entry { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.game-value { font-weight: 600; overflow-wrap: anywhere; }
.game-owner { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
