/* Angelehnt an das Server-Panel. */
:root {
  color-scheme: dark;
  --bg: #111214;
  --surface-1: #191919;
  --surface-2: #222326;
  --surface-3: #2c2d31;
  --border: #34353a;
  --text-primary: #efefef;
  --text-secondary: #9c9c9c;
  --accent: #338ced;
  --good: #0aac23;
  --critical: #dc3c3d;
  --radius: 8px;
  --mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f5f7;
    --surface-1: #ffffff;
    --surface-2: #f2f3f5;
    --surface-3: #e7e8eb;
    --border: #dcdde1;
    --text-primary: #191919;
    --text-secondary: #666666;
    --accent: #257de0;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text-primary);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1 { font-size: 20px; margin: 0 0 16px; font-weight: 600; }
h2 { font-size: 15px; margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--text-secondary); }
.spaced { margin-top: 8px; }
.small { font-size: 12px; }
.hidden { display: none !important; }

.wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.narrow { width: min(380px, 100%); }
.head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
.head h1 { margin: 0; }

form { display: flex; flex-direction: column; gap: 12px; }
form p { margin: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
/* 16px verhindert, dass iOS beim Antippen hineinzoomt. */
input {
  font: inherit; font-size: 16px; background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 6px; padding: 9px 12px; min-width: 0; min-height: 44px;
}
button {
  font: inherit; font-weight: 500; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-primary); padding: 8px 14px; border-radius: 6px; cursor: pointer; min-height: 40px;
}
button:hover:not(:disabled) { background: var(--surface-3); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--accent); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page { max-width: 760px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.page .head { margin-bottom: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.item { border-top: 1px solid var(--border); padding: 10px 0; }
.item:first-child { border-top: 0; }
.item p { margin: 4px 0 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row > :first-child { margin-right: auto; }
/* Fremde Texte: Zeilen behalten, lange Wörter umbrechen. */
.text { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.body { max-height: 12em; overflow-y: auto; }
a.strong { color: var(--accent); font-weight: 600; }
.badge { font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.badge.good { color: var(--good); border-color: var(--good); }
.badge.bad { color: var(--critical); border-color: var(--critical); }
.badge.warn { color: var(--text-secondary); border-style: dashed; }
summary { cursor: pointer; font-size: 15px; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
details form { margin-top: 12px; }

.error-text { color: var(--critical); font-size: 13px; }
.good-text { color: var(--good); font-size: 13px; }
.error-text:empty, .good-text:empty { display: none; }

.qr { background: #fff; border-radius: var(--radius); width: 216px; height: 216px; padding: 8px; margin: 0 auto 12px; }
.qr svg { display: block; width: 100%; height: 100%; }
.secret { display: block; overflow-wrap: anywhere; user-select: all; font-size: 15px; }
