  :root {
    --bg: #1e1f22; --panel: #2b2d31; --panel-2: #313338; --line: #3f4147;
    --text: #dbdee1; --muted: #949ba4; --accent: #5865f2; --accent-2: #4752c4;
    --ok: #23a55a; --bad: #f23f43; --warn: #f0b232; --chip: #383a40;
    --radius: 10px;
  }
  * { box-sizing: border-box; }
  body { margin: 0; font: 14px/1.45 "gg sans", "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }
  header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 22px;
           background: var(--panel); border-bottom: 1px solid var(--line); }
  header img.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--chip); }
  header .title { font-weight: 700; font-size: 16px; }
  header .sub { color: var(--muted); font-size: 12px; }
  header .spacer { flex: 1; }
  .status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
  .status i { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); display: inline-block; }
  .status.on i { background: var(--ok); }
  select.guild { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }

  .layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 61px); }
  nav { border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow: auto; }
  nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; color: var(--muted);
          text-decoration: none; cursor: pointer; margin-bottom: 2px; }
  nav a:hover { background: var(--panel-2); color: var(--text); }
  nav a.active { background: var(--panel-2); color: #fff; }
  nav .badge { background: var(--bad); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 7px; font-weight: 700; }
  nav .filter { margin: 14px 6px 0; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; cursor: pointer; }

  main { padding: 22px 28px 120px; max-width: 980px; }
  h2 { font-size: 20px; margin: 6px 0 16px; }
  .banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; background: rgba(240,178,50,.12); border: 1px solid rgba(240,178,50,.4); color: #f5d38a; }
  .banner.bad { background: rgba(242,63,67,.12); border-color: rgba(242,63,67,.45); color: #ffb3b5; }

  .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
  .card.problem { border-color: rgba(242,63,67,.6); }
  .card.changed { border-color: var(--accent); }
  .card .label { font-weight: 600; display: flex; align-items: center; gap: 8px; }
  .card .help { color: var(--muted); font-size: 12.5px; margin: 2px 0 10px; }
  .card .key { color: #6d7178; font: 11px ui-monospace, Consolas, monospace; margin-left: auto; }
  .pill { font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 700; }
  .pill.bad { background: rgba(242,63,67,.18); color: #ff8a8d; }
  .pill.new { background: rgba(88,101,242,.22); color: #b4bcff; }

  .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .chip { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); border-radius: 6px; padding: 4px 6px 4px 9px; max-width: 100%; }
  .chip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #99aab5; }
  .chip.bad { background: rgba(242,63,67,.16); color: #ffb3b5; }
  .chip img { width: 18px; height: 18px; border-radius: 50%; }
  .chip .x, .chip .mv { cursor: pointer; color: var(--muted); padding: 0 4px; border-radius: 4px; user-select: none; }
  .chip .x:hover { color: #fff; background: var(--bad); }
  .chip .mv:hover { color: #fff; background: var(--line); }
  .chip .num { color: var(--muted); font-size: 11px; }

  .combo { position: relative; max-width: 460px; }
  .combo input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; outline: none; }
  .combo input:focus { border-color: var(--accent); }
  .combo .list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #111214; border: 1px solid var(--line);
                 border-radius: 8px; max-height: 300px; overflow: auto; display: none; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
  .combo.open .list { display: block; }
  .combo .group { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  .combo .opt { padding: 7px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
  .combo .opt:hover, .combo .opt.hl { background: var(--accent); color: #fff; }
  .combo .opt .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .combo .opt img { width: 20px; height: 20px; border-radius: 50%; }
  .combo .opt .muted { color: var(--muted); font-size: 12px; }
  .combo .opt:hover .muted, .combo .opt.hl .muted { color: #e0e3ff; }
  .combo .empty { padding: 10px 12px; color: var(--muted); }

  .row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
  .row input.txt { flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
  .btn { background: var(--chip); color: var(--text); border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
  .btn:hover { background: var(--line); }
  .btn.primary { background: var(--accent); color: #fff; }
  .btn.primary:hover { background: var(--accent-2); }
  .btn.ghost { background: transparent; }
  .btn.small { padding: 4px 10px; font-size: 12px; }
  .btn.danger:hover { background: var(--bad); color: #fff; }

  .savebar { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); transition: transform .2s;
             background: #111214; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 10px 18px;
             display: flex; gap: 14px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 40; }
  .savebar.show { transform: translate(-50%, 0); }
  .toast { position: fixed; right: 20px; top: 76px; background: var(--ok); color: #fff; padding: 10px 16px; border-radius: 8px;
           font-weight: 600; opacity: 0; transition: opacity .2s; z-index: 50; pointer-events: none; }
  .toast.bad { background: var(--bad); }
  .toast.show { opacity: 1; }
  .hidden { display: none !important; }
  @media (max-width: 760px) { .layout { grid-template-columns: 1fr; } nav { position: static; height: auto; } }

/* ---------- Suche ---------- */
.search { position: relative; flex: 0 1 380px; }
.search input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
                padding: 8px 12px 8px 34px; font: inherit; outline: none; }
.search input:focus { border-color: var(--accent); }
.search::before { content: "🔍"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .7; }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); background: var(--chip); color: var(--muted);
              border-radius: 4px; padding: 0 6px; font: 11px ui-monospace, Consolas, monospace; }
.card .where { color: var(--accent); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.card .where:hover { text-decoration: underline; }
mark { background: rgba(240,178,50,.35); color: inherit; border-radius: 3px; padding: 0 1px; }
nav a .ico { width: 20px; display: inline-block; }

/* ---------- Text / Zahl / An-Aus / Auswahl ---------- */
textarea.long { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
                padding: 10px 12px; font: 13px/1.5 ui-monospace, Consolas, monospace; resize: vertical; outline: none; }
textarea.long:focus { border-color: var(--accent); }
.textbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); }
.textbar .count.over { color: var(--bad); font-weight: 700; }
.textbar .spacer { flex: 1; }
.ph { background: var(--chip); border-radius: 6px; padding: 2px 8px; cursor: pointer; font: 12px ui-monospace, Consolas, monospace; color: #b4bcff; }
.ph:hover { background: var(--accent); color: #fff; }
input.num { width: 110px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
input.num:focus { border-color: var(--accent); outline: none; }
select.choice { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; min-width: 240px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: var(--line); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { left: 21px; }
.hint { color: var(--muted); font-size: 12px; margin-left: 8px; }

/* ---------- Tabs / Angemeldeter User ---------- */
.tabs { display: flex; gap: 4px; margin-left: 18px; }
.tabs a { padding: 7px 14px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 600; user-select: none; }
.tabs a:hover { background: var(--panel-2); color: var(--text); }
.tabs a.active { background: var(--accent); color: #fff; }
.me { display: flex; align-items: center; gap: 8px; }
.me img { width: 30px; height: 30px; border-radius: 50%; }
.me div { display: flex; flex-direction: column; line-height: 1.2; font-size: 12.5px; }
.me div span { color: var(--muted); font-size: 11.5px; }
.me a { text-decoration: none; }
main.readonly .card :is(input, textarea, select, .combo, .x, .mv, button, .ph, .switch) { pointer-events: none; opacity: .65; }

/* ---------- Login ---------- */
body.loginpage { display: grid; place-items: center; min-height: 100vh;
  background: radial-gradient(circle at 30% 20%, rgba(88,101,242,.25), transparent 55%), var(--bg); }
.loginbox { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 36px 40px; width: min(420px, 92vw);
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.loginbox .logo { font-size: 46px; }
.loginbox h1 { margin: 6px 0 2px; font-size: 24px; }
.loginbox .banner { text-align: left; margin: 16px 0 0; }
.btn.discord { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; width: 100%;
  background: #5865f2; color: #fff; padding: 12px 16px; font-size: 15px; text-decoration: none; }
.btn.discord:hover { background: #4752c4; }
.muted { color: var(--muted); }
.small { font-size: 12px; margin-top: 16px; }

/* ---------- Moderation ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-direction: column; }
.tile b { font-size: 28px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 12.5px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.card .label .spacer, .row .spacer, .profile .spacer, .entry .spacer { flex: 1; }
.card.flush { padding: 0; overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 6px; }
.card.flush .tbl { margin: 0; }
.tbl th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 8px; border-top: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.tbl.big td { padding: 10px 14px; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--panel-2); }
.tbl .reason { color: var(--text); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .av { width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.nowrap { white-space: nowrap; }
.pill.act { background: var(--chip); color: var(--text); white-space: nowrap; }
.pill.act.warn { background: rgba(240,178,50,.2); color: #f5d38a; }
.pill.act.orange { background: rgba(240,130,50,.2); color: #ffb98a; }
.pill.act.bad { background: rgba(242,63,67,.2); color: #ff9a9c; }
.pill.act.ok { background: rgba(35,165,90,.2); color: #8fe0b0; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.inp { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; outline: none; }
.inp:focus { border-color: var(--accent); }
.grow { flex: 1; min-width: 180px; }
.back { color: var(--accent); cursor: pointer; display: inline-block; margin-bottom: 10px; font-weight: 600; }
.link { color: var(--accent); cursor: pointer; margin-left: 6px; }
.profile { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile img, .profile .ph-av { width: 64px; height: 64px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-size: 28px; }
.profile h2 { margin: 0 0 2px; }
.profile a { color: var(--accent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.radio { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 8px; border: 1px solid transparent; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--panel-2); }
.radio input { accent-color: var(--accent); }
.timeline .entry { border-left: 3px solid var(--line); padding: 6px 0 10px 14px; margin-left: 4px; }
.timeline .entry .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.timeline .entry .reason { margin-top: 4px; white-space: pre-wrap; }
code { background: var(--chip); border-radius: 4px; padding: 0 5px; font-size: 11.5px; }
.modbtns { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.modbtns .grp { display: flex; gap: 6px; align-items: center; }
.modbtns select.choice { min-width: 0; }
.btn.warnb { background: rgba(240,178,50,.25); } .btn.warnb:hover { background: var(--warn); color: #000; }
.btn.orangeb { background: rgba(240,130,50,.25); } .btn.orangeb:hover { background: #f08232; color: #fff; }
.btn.badb { background: rgba(242,63,67,.3); } .btn.badb:hover { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: wait; }
@media (max-width: 760px) { header { flex-wrap: wrap; } .tabs { margin-left: 0; } }
/* Nichts darf die Seite seitlich aufblähen */
main { min-width: 0; }
.cols > * { min-width: 0; }
.tbl .reason { white-space: normal; max-width: none; overflow-wrap: anywhere; }
.tabs a, header .title { white-space: nowrap; }
/* Begrüßung oben rechts */
.me .hello { font-size: 14px; color: #fff; }
.me .noav { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.tabs a { text-decoration: none; }
.me .hello { white-space: nowrap; }
@media (max-width: 1150px) {
  .search { flex: 0 1 220px; }
  .search kbd { display: none; }
  select.guild { max-width: 170px; }
  header .sub { display: none; }
}
