/* Grenzwerk Leitstand – Kontrollraum-Look: Graphit, Warnstreifen, Anzeigetafel-Zahlen */

@font-face { font-family: "Exo 2"; src: url("/fonts/Exo2.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #161a20;
  --panel-2: #1c2129;
  --panel-3: #232934;
  --line: #2a313c;
  --text: #eceae4;
  --text-2: #a9adb6;
  --muted: #6f7580;
  --accent: #5865f2;
  --hazard: #f5b301;
  --join: #199e70;
  --leave: #d95926;
  --series: #3987e5;
  --good: #0ca30c;
  --critical: #e66767;
  --cut: 14px;
  --radius: 6px;
  --display: "Exo 2", "Poppins", sans-serif;
  --body: "Poppins", "Exo 2", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(245, 179, 1, .05), transparent 60%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 22px),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
.eyebrow { font: 600 11px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--hazard); margin: 0 0 8px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ---------- Boot & Zugang ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-mark span { font: 800 28px/1 var(--display); letter-spacing: .4em; color: var(--muted); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card {
  position: relative; width: min(460px, 100%); padding: 44px 40px 36px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.gate-stripes { position: absolute; inset: 0 0 auto; height: 8px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, #111 12px 24px); }
.wordmark { font-weight: 800; font-size: 46px; line-height: .95; letter-spacing: .02em; margin: 6px 0 18px; }
.wordmark em { font-style: normal; color: var(--accent); }
.wordmark small { display: block; font-size: 13px; letter-spacing: .5em; color: var(--text-2); margin-top: 10px; font-weight: 600; }
.gate-text { color: var(--text-2); margin: 0 0 26px; }
.gate-card .btn { width: 100%; justify-content: center; }
.gate-card .btn + .btn { margin-top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent;
  border-radius: var(--radius); font: 700 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .nav-btn:focus-visible, .seg button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .switch input:focus-visible + span {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.1); }
.btn-accent:disabled { opacity: .5; cursor: progress; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn-sm { padding: 7px 12px; font-size: 11px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 12px; }
.link-btn:hover { color: var(--text); text-decoration: underline; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px; background: rgba(13, 15, 19, .82); border-right: 1px solid var(--line); backdrop-filter: blur(8px);
}
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 20px; border-bottom: 1px solid var(--line); position: relative; }
.rail-brand::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 3px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 6px, transparent 6px 12px); }
.rail-brand strong { display: block; font: 800 17px/1 var(--display); letter-spacing: .12em; }
.rail-brand span { font: 600 10px/1 var(--display); letter-spacing: .4em; color: var(--muted); text-transform: uppercase; }
.rail-icon { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--text-2); cursor: pointer; text-align: left; font: 600 14px/1 var(--display); letter-spacing: .04em;
}
.nav-btn:hover { background: var(--panel); color: var(--text); }
.nav-btn[aria-current="page"] { background: var(--panel-2); color: var(--text); }
.nav-btn[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; background: var(--accent); border-radius: 0 3px 3px 0; }
.rail-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.rail-user-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rail-user-text strong { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--panel-3); object-fit: cover; flex: none; }
.avatar-sm { width: 26px; height: 26px; }

.main { min-width: 0; padding: 30px clamp(18px, 3vw, 44px) 120px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.view-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: .01em; line-height: 1; }
.status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 12px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(12, 163, 12, .18); display: inline-block; margin-right: 6px; }
.status b { color: var(--text); font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ---------- Panels & Reveal ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.panel-head .sub { color: var(--muted); font-size: 12px; }
.reveal { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Übersicht ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi {
  position: relative; padding: 18px 20px 16px; background: linear-gradient(160deg, var(--panel-3), var(--panel));
  border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  overflow: hidden;
}
.kpi::after { content: ""; position: absolute; right: 0; top: 0; width: var(--cut); height: var(--cut); background: var(--kpi-color, var(--accent)); clip-path: polygon(0 0, 100% 100%, 100% 0); }
.kpi-label { font: 600 11px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.kpi-value { font: 800 40px/1.1 var(--display); font-variant-numeric: tabular-nums; margin: 10px 0 6px; letter-spacing: -.01em; }
.kpi-sub { color: var(--muted); font-size: 12px; }
.kpi-sub b { color: var(--text-2); font-weight: 700; }
.kpi-warn { --kpi-color: var(--hazard); }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.stack { display: grid; gap: 14px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .l-join { background: var(--join); }
.legend .l-leave { background: var(--leave); }

.chart { display: block; max-width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--text-2); stroke-width: 1; }
.chart text { fill: var(--muted); font: 11px var(--body); }
.chart .bar-join { fill: var(--join); }
.chart .bar-leave { fill: var(--leave); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover { fill: rgba(255, 255, 255, .04); }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: color-mix(in srgb, var(--series) 18%, transparent); }
.chart .cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker { fill: var(--series); stroke: var(--panel); stroke-width: 2; }
.chart .direct { fill: var(--text-2); font-weight: 700; }

.totals { display: flex; gap: 22px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.totals div { display: flex; flex-direction: column; gap: 2px; }
.totals span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-family: var(--display); }
.totals b { font: 800 22px/1 var(--display); font-variant-numeric: tabular-nums; }

.hbars { display: grid; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.hbar-row .lbl { color: var(--text); font-size: 13px; }
.hbar-row .val { font: 700 14px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--text); }
.hbar-track { grid-column: 1 / -1; height: 8px; background: var(--panel-3); border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--series); border-radius: 0 4px 4px 0; transform-origin: left; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleX(0); } }

.empty { color: var(--muted); font-size: 13px; padding: 10px 0; }

.facts { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 14px; background: var(--panel); }
.facts div { flex: 1 1 130px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts span { display: block; color: var(--muted); font: 600 10px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 8px; }
.facts b { font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; }

.list { display: grid; gap: 8px; }
.give { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; background: var(--panel-3); border-radius: var(--radius); border-left: 3px solid var(--hazard); }
.give strong { display: block; }
.give small { color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: 12px; }
table.data th, table.data td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: var(--muted); font-weight: 600; }
.table-wrap { max-height: 280px; overflow: auto; }

/* ---------- Tickets ---------- */
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 5px; cursor: pointer; color: var(--text-2); font: 600 13px/1 var(--display); letter-spacing: .04em; }
.seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--text); }
.seg .count { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rows { display: grid; gap: 8px; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.row:hover { border-color: var(--panel-3); transform: translateX(2px); }
.row .who { min-width: 0; }
.row .who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who code { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel-3); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.row time, .row .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.row .meta b { color: var(--hazard); font-weight: 700; }

/* ---------- Einstellungen ---------- */
.settings { columns: 2 440px; column-gap: 14px; }
.settings .panel { break-inside: avoid; margin-bottom: 14px; display: block; }
.field { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.field:first-of-type { border-top: 0; padding-top: 0; }
.field label { font-weight: 700; font-size: 13px; }
.field .help { color: var(--muted); font-size: 12px; }
.field.dirty label::after { content: " ●"; color: var(--hazard); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--critical); }
input[type="text"], input[type="url"], input[type="number"], select, textarea {
  width: 100%; padding: 9px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius); font: 13px/1.5 var(--body); transition: border-color .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--panel-3); }
.with-unit { display: flex; align-items: center; gap: 8px; }
.with-unit input { max-width: 160px; }
.with-unit span { color: var(--muted); font-size: 12px; }
.color-input { display: flex; gap: 8px; align-items: center; }
.color-input input[type="color"] { width: 42px; height: 38px; padding: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.color-input input[type="text"] { max-width: 120px; font-family: var(--display); text-transform: uppercase; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; width: fit-content; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { position: relative; width: 42px; height: 24px; border-radius: 12px; background: var(--panel-3); border: 1px solid var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .2s, background .2s; }
.switch input:checked + span { background: color-mix(in srgb, var(--accent) 70%, #000); }
.switch input:checked + span::after { transform: translateX(18px); background: #fff; }
.switch em { font-style: normal; color: var(--text-2); font-size: 12px; }
.banner-preview { width: 100%; aspect-ratio: 900 / 260; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); display: block; object-fit: cover; transition: opacity .2s; }
.banner-preview.loading { opacity: .5; }

.savebar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 22px; padding: 12px 14px 12px 22px; width: min(640px, calc(100% - 32px));
  justify-content: space-between; background: var(--panel-3); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55); animation: rise .3s both;
}
.savebar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 10px 0 0 10px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 6px, #111 6px 12px); }
.savebar-actions { display: flex; gap: 8px; }

/* ---------- Tooltip & Toasts ---------- */
.tooltip {
  position: fixed; z-index: 50; pointer-events: none; padding: 9px 12px; background: #0f1216; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); min-width: 140px;
}
.tooltip strong { display: block; margin-bottom: 6px; font-family: var(--display); letter-spacing: .04em; }
.tooltip div { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); }
.tooltip div b { color: var(--text); font-variant-numeric: tabular-nums; }
.tooltip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.toasts { position: fixed; right: 20px; top: 20px; z-index: 60; display: grid; gap: 8px; width: min(380px, calc(100% - 40px)); }
.toast { padding: 14px 16px; background: var(--panel-3); border: 1px solid var(--line); border-left: 4px solid var(--good); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); animation: rise .3s both; }
.toast.error { border-left-color: var(--critical); }
.toast strong { display: block; margin-bottom: 4px; font-family: var(--display); }
.toast ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 12px; }

/* ---------- Icons (reines CSS) ---------- */
.ico { width: 16px; height: 16px; display: inline-block; position: relative; flex: none; }
.ico-grid { background: linear-gradient(currentColor 0 0) 0 0 / 7px 7px no-repeat, linear-gradient(currentColor 0 0) 9px 0 / 7px 7px no-repeat, linear-gradient(currentColor 0 0) 0 9px / 7px 7px no-repeat, linear-gradient(currentColor 0 0) 9px 9px / 7px 7px no-repeat; opacity: .9; }
.ico-ticket { border: 2px solid currentColor; border-radius: 3px; height: 12px; margin-top: 2px; }
.ico-ticket::after { content: ""; position: absolute; left: 5px; top: -2px; bottom: -2px; border-left: 2px dashed currentColor; }
.ico-gear { border: 2px solid currentColor; border-radius: 50%; }
.ico-gear::after { content: ""; position: absolute; inset: 3px; background: currentColor; border-radius: 50%; }

.ico-user::before { content: ""; position: absolute; left: 4px; top: 0; width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 50%; box-sizing: border-box; }
.ico-user::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: 0; height: 6px; border: 2px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0; box-sizing: border-box; }
.ico-shield { border: 2px solid currentColor; border-radius: 3px 3px 8px 8px; height: 15px; }
.ico-shield::after { content: ""; position: absolute; left: 5px; top: 2px; bottom: 3px; border-left: 2px solid currentColor; }
.ico-mega { border: 2px solid currentColor; border-left-width: 5px; border-radius: 2px 8px 8px 2px; height: 12px; margin-top: 2px; }

/* ---------- gemeinsame Bausteine ---------- */
.muted { color: var(--muted); }
.block { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip.status-open { background: rgba(245, 179, 1, .14); color: var(--hazard); }
.chip.status-ban { background: rgba(230, 103, 103, .14); color: var(--critical); }
.chip.status-kick { background: rgba(236, 131, 90, .14); color: #ec835a; }
.chip.status-ok { background: rgba(12, 163, 12, .16); color: #4fd14f; }
.btn-warn { background: transparent; border-color: #ec835a; color: #ec835a; }
.btn-warn:hover { background: rgba(236, 131, 90, .12); }
.btn-danger { background: var(--critical); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form > select, .inline-form > input { flex: 1 1 160px; width: auto; }
.notice { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: rgba(245, 179, 1, .1); color: var(--hazard); font-size: 13px; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel-3); border-radius: var(--radius); text-decoration: none; }
.history-row > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.history-row small { color: var(--muted); white-space: nowrap; }
a.history-row:hover { outline: 1px solid var(--line); }
.list-hint { margin: 4px 2px 8px; color: var(--muted); font-size: 12px; }
.member-names { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.member-names strong, .member-names small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-names small { color: var(--muted); font-size: 12px; }
.sub-head { margin: 22px 0 6px; padding-top: 16px; border-top: 1px dashed var(--line); }

/* ---------- Mitglieder ---------- */
.members { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 14px; align-items: start; }
.member-side { position: sticky; top: 20px; display: grid; gap: 10px; }
.search { width: 100%; padding: 11px 14px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); font: 14px var(--body); }
.member-list { display: grid; gap: 4px; max-height: calc(100vh - 220px); overflow: auto; padding-right: 2px; }
.member-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; cursor: pointer; text-align: left; }
.member-row:hover { background: var(--panel); }
.member-row[aria-pressed="true"] { background: var(--panel-2); border-color: var(--line); }
.member-profile { display: grid; gap: 14px; min-width: 0; }
.profile-head > div { min-width: 0; }
.profile-head p { overflow-wrap: anywhere; }
.profile-head { display: flex; gap: 18px; align-items: center; padding: 20px; background: linear-gradient(120deg, var(--panel-3), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; }
.profile-head::after { content: ""; position: absolute; right: -40px; top: 0; bottom: 0; width: 160px; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .03) 0 10px, transparent 10px 20px); }
.profile-head h2 { font-size: 24px; font-weight: 800; }
.profile-head p { margin: 4px 0 0; font-size: 13px; }
.profile-head code { font-size: 12px; }
.avatar-lg { width: 72px; height: 72px; box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--accent); }
.facts-compact { margin-top: 0; }
.facts-compact small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.role-chip { padding: 5px 8px 5px 10px; }
.dot-role { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.chip-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.chip-x:hover { color: var(--critical); }
.role-chip + .inline-form, .panel > .inline-form { margin-top: 14px; }
.mod-grid { display: grid; gap: 10px; }
.mod-grid > input { width: 100%; }

/* ---------- Sicherheit ---------- */
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sec-card { padding: 14px; background: var(--panel-3); border-radius: var(--radius); display: grid; gap: 10px; border-left: 3px solid var(--line); }
.sec-open { border-left-color: var(--hazard); }
.sec-top { display: flex; align-items: center; gap: 10px; }
.sec-reason { margin: 0; font-weight: 700; }
.sec-content { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: var(--radius); color: var(--text-2); font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; word-break: break-word; max-height: 120px; overflow: auto; }

/* ---------- Ankündigungen ---------- */
.announce { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); gap: 14px; align-items: start; }
.sticky { position: sticky; top: 20px; }
.radio { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); cursor: pointer; }
.when input[type="datetime-local"] { flex: 1 1 200px; width: auto; padding: 8px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); font: 13px var(--body); color-scheme: dark; }
.when input:disabled { opacity: .4; }
.submit-row { display: flex; justify-content: flex-end; margin-top: 18px; }
.dc-preview { display: flex; gap: 14px; padding: 16px; background: #313338; border-radius: var(--radius); font-family: "Poppins", sans-serif; color: #dbdee1; }
.dc-avatar { width: 40px; height: 40px; }
.dc-body { min-width: 0; flex: 1; }
.dc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dc-head strong { color: #f2f3f5; font-size: 15px; }
.dc-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.dc-head time { color: #949ba4; font-size: 12px; margin-left: 4px; }
.dc-content { font-size: 14px; line-height: 1.4; margin-bottom: 6px; word-wrap: break-word; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; padding: 0 2px; border-radius: 3px; font-weight: 600; }
.dc-embed { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; max-width: 520px; padding: 10px 14px 14px 12px; background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 4px; }
.dc-embed-main { min-width: 0; }
.dc-title { color: #f2f3f5; font-weight: 700; font-size: 15px; margin: 4px 0 6px; }
.dc-desc { font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.dc-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; grid-column: 2; grid-row: 1; }
.dc-image { grid-column: 1 / -1; max-width: 100%; border-radius: 4px; margin-top: 4px; }
.dc-footer { grid-column: 1 / -1; color: #949ba4; font-size: 12px; margin-top: 4px; }
.dc-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-btn { background: #4e5058; color: #fff; padding: 6px 14px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.dc-preview a { color: #00a8fc; text-decoration: none; }
.dc-preview code { background: #1e1f22; padding: 1px 4px; border-radius: 3px; font-size: 13px; }
.dc-preview blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid #4e5058; }
.dc-preview ul { margin: 2px 0; padding-left: 20px; }
.dc-preview .md-h { margin: 6px 0 2px; color: #f2f3f5; font-family: "Poppins", sans-serif; }
.dc-preview h3.md-h { font-size: 20px; } .dc-preview h4.md-h { font-size: 17px; } .dc-preview h5.md-h { font-size: 15px; }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-main, .announce { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 1180px) {
  .members { grid-template-columns: minmax(0, 1fr); }
  .member-side { position: static; }
  .member-list { max-height: 320px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
  .rail-brand { padding: 0; border: 0; }
  .rail-brand::after { display: none; }
  .rail-nav { flex-direction: row; order: 3; width: 100%; overflow-x: auto; }
  .nav-btn[aria-current="page"]::before { display: none; }
  .rail-user { margin: 0 0 0 auto; border: 0; padding: 0; }
  .main { padding: 20px 16px 120px; }
  .kpi-value { font-size: 32px; }
  .row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .row .chip, .row time.extra { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
