:root {
  --bg: #0f172a; --card: #1e293b; --card2: #273449; --fg: #e2e8f0; --muted: #94a3b8;
  --line: #334155; --accent: #38bdf8; --ok: #22c55e; --warn: #f59e0b; --crit: #ef4444;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--fg); line-height: 1.5;
}
header {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #0b1220; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
header img { width: 28px; height: 28px; flex-shrink: 0; }
header h1 { font-size: 18px; margin: 0; flex-shrink: 0; }
header .grow { flex: 1; }
/* Versionsanzeige neben dem Titel (SW-113): dezent, nie umbrechend. */
header .version { font-size: 11px; color: var(--muted); white-space: nowrap; flex-shrink: 0; margin-left: -6px; align-self: center; }
/* Die E-Mail ist das einzige Element, das bei schmalen Geräten kürzen darf. */
header .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 480px) {
  header { gap: 8px; padding: 10px 12px; }
  header .muted { display: none; }
}
nav { display: flex; gap: 6px; padding: 8px 16px; background: #0b1220; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
nav button { background: var(--card2); color: var(--fg); border: 1px solid var(--line); }
nav button:hover { background: var(--line); filter: none; }
nav button.active { background: var(--accent); color: #04283a; border-color: var(--accent); }
main { padding: 16px; max-width: 1000px; margin: 0 auto; }
button {
  background: var(--accent); color: #04283a; border: none; padding: 8px 14px;
  border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px;
}
button.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
button.danger { background: var(--crit); color: #fff; }
button:hover { filter: brightness(1.08); }
input, select {
  background: var(--card2); border: 1px solid var(--line); color: var(--fg);
  padding: 8px 10px; border-radius: 8px; font-size: 14px; width: 100%;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.card-head strong { word-break: break-word; }
.card-head .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card-head .actions button { padding: 5px 9px; font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); }
.dot.crit { background: var(--crit); } .dot.unbekannt { background: var(--muted); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.scores { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.score { font-size: 12px; background: var(--card2); border-radius: 8px; padding: 4px 8px; }
.muted { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-width: 480px; width: 100%; max-height: 90vh; overflow: auto; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; z-index: 100; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.login-wrap { max-width: 360px; margin: 10vh auto; }
.chan-tag { font-size: 12px; background: var(--card2); border-radius: 6px; padding: 2px 6px; margin-right: 4px; }
.fixhint { font-size: 12px; color: var(--accent); margin: 2px 0 8px; padding-left: 2px; }
.mailrecs { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.mailrec { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--card2); padding: 4px 10px; border-radius: 8px; }
ul li { margin-bottom: 4px; }
