/* Monkey – Designsystem. Dunkel, warm, Bananengelb als einzige Akzentfarbe. Twitch-Lila nur für Twitch-Bezüge. */

@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #0c0e0b;
  --bg-2: #10130f;
  --surface: #151914;
  --surface-2: #1b2019;
  --surface-3: #232921;
  --line: #242a22;
  --line-2: #323a2f;
  --text: #eceee6;
  --text-2: #b3baab;
  --muted: #7d8676;
  --faint: #5a6254;

  --accent: #f4c430;
  --accent-2: #ffd75e;
  --accent-ink: #1b1604;
  --accent-soft: rgba(244, 196, 48, 0.12);
  --accent-line: rgba(244, 196, 48, 0.35);

  --ok: #6fcf7f;
  --ok-soft: rgba(111, 207, 127, 0.12);
  --danger: #f26b5b;
  --danger-soft: rgba(242, 107, 91, 0.12);
  --info: #6ab7ff;
  --info-soft: rgba(106, 183, 255, 0.12);
  --warn: #ffa94d;
  --warn-soft: rgba(255, 169, 77, 0.12);
  --twitch: #a970ff;
  --twitch-soft: rgba(169, 112, 255, 0.14);
  --live: #ff4d4d;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --sidebar: 248px;
  --topbar: 60px;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.mono, code, kbd { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--accent-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ---------------- App-Rahmen ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; line-height: 1; }
.brand-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 4px; }
.nav-label { font-size: 11.5px; color: var(--faint); padding: 0 10px 6px; font-weight: 500; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 10px; margin: 1px 0;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: 500;
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.nav-item:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-item:hover svg { color: var(--text-2); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active svg { color: var(--accent); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.nav-badge.live { background: var(--live); color: #fff; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 10px; display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who b { display: block; font-weight: 600; font-size: 13px; }
.sidebar-foot .who span { font-size: 11.5px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: rgba(12, 14, 11, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.topbar-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-title svg { width: 18px; height: 18px; color: var(--muted); }
.topbar-spacer { flex: 1; }
.topbar-status { display: flex; align-items: center; gap: 8px; }
.search-btn {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 11px; min-width: 220px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.search-btn:hover { border-color: var(--faint); color: var(--text-2); }
.search-btn svg { width: 15px; height: 15px; }
.search-btn kbd { margin-left: auto; }
.content { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }
.content.wide { max-width: none; }

/* Status-Pillen oben */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 11px;
  border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
  white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.pill.live { border-color: rgba(255, 77, 77, 0.45); color: #fff; background: rgba(255, 77, 77, 0.12); }
.pill.live .dot { background: var(--live); box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.25); }
.pill.ok .dot { background: var(--ok); }
.pill.warn .dot { background: var(--warn); }
.pill.bad .dot { background: var(--danger); }
.pill.twitch { color: var(--twitch); border-color: rgba(169, 112, 255, 0.35); }

/* ---------------- Seitenkopf ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 260px; }
.page-head h1 { font-family: var(--display); font-size: 30px; line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2 { font-family: var(--display); font-size: 19px; letter-spacing: -0.015em; font-weight: 650; margin: 0 0 12px; }
h3 { font-size: 14.5px; font-weight: 600; margin: 0 0 8px; }

/* ---------------- Raster ---------------- */
.grid, .grid-2, .grid-3, .grid-4, .grid-auto { display: grid; gap: 16px; }
.grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-auto > *, li { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.stack.loose { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; }
.mt-sm { margin-top: 8px; }
.mb { margin-bottom: 16px; }

/* ---------------- Karten ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  min-width: 0;
}
.card.flush { padding: 0; }
.card.inset { background: var(--bg-2); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.card.flush .card-head { padding: 14px 16px 0; }
.card-foot { border-top: 1px solid var(--line); margin: 16px -18px -18px; padding: 12px 18px; display: flex; gap: 8px; justify-content: flex-end; }
.card.accent { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(244, 196, 48, 0.06), transparent 60%), var(--surface); }
.card.clickable { cursor: pointer; transition: border-color .15s, background .15s; }
.card.clickable:hover { border-color: var(--line-2); background: var(--surface-2); }

/* Kennzahlen */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat .label svg { width: 14px; height: 14px; }
.stat .value { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: 12px; color: var(--muted); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 550; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
  text-decoration: none !important;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: var(--surface-3); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--danger-soft); border-color: rgba(242, 107, 91, 0.35); color: #ffb3a9; }
.btn.danger:hover { background: rgba(242, 107, 91, 0.22); }
.btn.ok { background: var(--ok-soft); border-color: rgba(111, 207, 127, 0.35); color: #b6efbf; }
.btn.twitch { background: #9146ff; border-color: #9146ff; color: #fff; }
.btn.twitch:hover { background: #a970ff; border-color: #a970ff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.sm svg { width: 14px; height: 14px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.btn-group .btn + .btn { margin-left: -1px; }

/* ---------------- Formulare ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--danger); }
.input, .select, .textarea {
  width: 100%;
  height: 36px; padding: 0 11px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text);
  transition: border-color .12s, background .12s;
}
.textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.mono { font-family: var(--mono); font-size: 13px; }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8676' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 0; }
.input-group > :first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group > :last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group > * + * { margin-left: -1px; }
.input-group .addon { display: flex; align-items: center; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
input[type='color'].input { padding: 3px; width: 46px; cursor: pointer; }
input[type='range'] { accent-color: var(--accent); width: 100%; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--accent); width: 16px; height: 16px; }

/* Schalter */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track { width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background .15s; }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(16px); background: var(--accent-ink); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle input:disabled + .track { opacity: .5; }
.toggle .label { font-size: 13.5px; }

/* Segment-Auswahl */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; flex-wrap: wrap; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 550; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button svg { width: 14px; height: 14px; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { position: relative; height: 40px; padding: 0 14px; border: 0; background: none; color: var(--muted); font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tabs button svg { width: 15px; height: 15px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tabs .count { font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }

/* ---------------- Abzeichen ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.twitch { background: var(--twitch-soft); color: var(--twitch); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.badge.live { background: var(--live); color: #fff; }
/* Rollen-Abzeichen im Chat */
.role-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; flex: none; }
.role-badge svg { width: 12px; height: 12px; }
.role-badge.broadcaster { background: #e91916; color: #fff; }
.role-badge.mod { background: #00ad03; color: #fff; }
.role-badge.vip { background: #e005b9; color: #fff; }
.role-badge.sub { background: #8205b4; color: #fff; }
.role-badge.bot { background: var(--accent); color: var(--accent-ink); }

/* ---------------- Listen & Tabellen ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
.table tr.clickable { cursor: pointer; }
.table tr.selected td { background: var(--accent-soft) !important; }
.table td.right, .table th.right { text-align: right; }
.table .actions { text-align: right; white-space: nowrap; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--surface-2); }
.list-item.selected { background: var(--accent-soft); }
.list-item .title { font-weight: 550; }
.list-item .meta { font-size: 12.5px; color: var(--muted); }

/* Liste links, Details rechts */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.split.wide-detail { grid-template-columns: minmax(0, 1fr) 520px; }
.split .detail { position: sticky; top: calc(var(--topbar) + 16px); max-height: calc(100vh - var(--topbar) - 32px); overflow-y: auto; }

/* Leerer Zustand */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 20px; color: var(--muted); }
.empty .icon-wrap { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); margin-bottom: 4px; }
.empty .icon-wrap svg { width: 24px; height: 24px; }
.empty h3 { color: var(--text); margin: 0; }
.empty p { margin: 0; max-width: 46ch; }

/* Hinweis-Boxen */
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); }
.callout > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout.accent { border-color: var(--accent-line); background: var(--accent-soft); }
.callout.accent > svg { color: var(--accent); }
.callout.info { border-color: rgba(106, 183, 255, 0.3); background: var(--info-soft); }
.callout.info > svg { color: var(--info); }
.callout.warn { border-color: rgba(255, 169, 77, 0.3); background: var(--warn-soft); }
.callout.warn > svg { color: var(--warn); }
.callout.danger { border-color: rgba(242, 107, 91, 0.3); background: var(--danger-soft); }
.callout.danger > svg { color: var(--danger); }
.callout.twitch { border-color: rgba(169, 112, 255, 0.3); background: var(--twitch-soft); }
.callout.twitch > svg { color: var(--twitch); }
.callout b { display: block; margin-bottom: 2px; }

/* Avatare */
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent-ink); background: var(--accent); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }

/* Fortschritt */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }

/* Tasten */
kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font-size: 11px; }

/* ---------------- Chat ---------------- */
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 4px 8px 12px; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.chat-msg { display: flex; gap: 6px; padding: 4px 8px; border-radius: 6px; line-height: 1.45; word-break: break-word; position: relative; }
.chat-msg:hover { background: var(--surface-2); }
.chat-msg .time { color: var(--faint); font-size: 11px; flex: none; width: 36px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.chat-msg .body { flex: 1; min-width: 0; }
.chat-msg .badges { display: inline-flex; gap: 3px; vertical-align: -3px; margin-right: 4px; }
.chat-msg .name { font-weight: 650; cursor: pointer; }
.chat-msg .name:hover { text-decoration: underline; }
.chat-msg.deleted .text { color: var(--faint); text-decoration: line-through; }
.chat-msg.bot { background: rgba(244, 196, 48, 0.04); }
.chat-msg.announce { border-left: 3px solid var(--accent); background: var(--surface-2); }
.chat-msg.sim .name::after { content: 'Test'; margin-left: 6px; font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: var(--surface-3); color: var(--muted); vertical-align: 1px; }
.chat-msg .mod-actions { position: absolute; right: 6px; top: 2px; display: none; gap: 2px; background: var(--surface-3); border-radius: 6px; padding: 2px; }
.chat-msg:hover .mod-actions { display: flex; }
.chat-msg .mod-actions button { width: 24px; height: 22px; border: 0; background: none; color: var(--text-2); border-radius: 4px; cursor: pointer; display: grid; place-items: center; }
.chat-msg .mod-actions button:hover { background: var(--line-2); color: var(--text); }
.chat-msg .mod-actions svg { width: 13px; height: 13px; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.emote { height: 22px; vertical-align: -6px; }

/* Ereignis-Feed */
.feed-item { display: flex; gap: 11px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.feed-item:last-child { border-bottom: 0; }
.feed-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.feed-icon svg { width: 15px; height: 15px; }
.feed-icon.follow { background: var(--info-soft); color: var(--info); }
.feed-icon.sub, .feed-icon.resub, .feed-icon.gift { background: var(--twitch-soft); color: var(--twitch); }
.feed-icon.cheer { background: var(--warn-soft); color: var(--warn); }
.feed-icon.raid { background: var(--danger-soft); color: var(--danger); }
.feed-icon.giveaway, .feed-icon.game, .feed-icon.shop, .feed-icon.points { background: var(--accent-soft); color: var(--accent); }
.feed-item .what { flex: 1; min-width: 0; }
.feed-item .what b { font-weight: 600; }
.feed-item .when { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

/* ---------------- Overlays: Toasts, Dialoge, Palette ---------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 11px 14px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast svg { width: 17px; height: 17px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.error svg { color: var(--danger); }
.toast.info svg { color: var(--info); }
.toast.out { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(5, 6, 5, 0.66); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: pop .16s ease-out; }
.modal.wide { width: min(860px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head > svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.modal-head .btn { margin-left: auto; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }

.palette { position: fixed; inset: 0; z-index: 950; background: rgba(5, 6, 5, 0.6); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette-box { width: min(620px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; animation: pop .14s ease-out; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 18px; height: 18px; color: var(--muted); }
.palette-input input { flex: 1; height: 52px; border: 0; background: none; outline: none; font-size: 16px; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; }
.palette-item svg { width: 16px; height: 16px; color: var(--muted); }
.palette-item .hint { margin-left: auto; font-size: 12px; color: var(--faint); }
.palette-item.active { background: var(--surface-3); }
.palette-item.active svg { color: var(--accent); }
.palette-group { font-size: 11.5px; color: var(--faint); padding: 8px 12px 4px; }

/* Menü */
.menu { position: fixed; z-index: 960; min-width: 200px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); padding: 5px; animation: pop .12s ease-out; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; color: var(--text); font-size: 13.5px; }
.menu button:hover { background: var(--surface-3); }
.menu button svg { width: 15px; height: 15px; color: var(--muted); }
.menu button.danger { color: #ffb3a9; }
.menu hr { margin: 5px 0; }

/* Overlay-Vorschau */
.preview-frame { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background:
  repeating-conic-gradient(#191d18 0% 25%, #141713 0% 50%) 50% / 24px 24px; position: relative; }
.preview-frame iframe { position: absolute; color-scheme: normal; top: 0; left: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }

/* Laden */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Kachel-Auswahl (Spiele, Giveaway-Arten) */
.tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .1s; min-width: 0; }
.tile:hover { border-color: var(--line-2); background: var(--surface-2); }
.tile.active { border-color: var(--accent); background: var(--accent-soft); }
.tile .tile-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }
.tile .tile-icon svg { width: 20px; height: 20px; }
.tile h3 { margin: 0; }
.tile p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* Code-Zeile mit Kopieren */
.copy-line { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); font-family: var(--mono); font-size: 12.5px; min-width: 0; }
.copy-line > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.copy-line.blur > span { filter: blur(5px); transition: filter .15s; }
.copy-line.blur:hover > span { filter: none; }

/* Schritt-Assistent */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ''; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line-2); }
.step.done .n { background: var(--ok); color: #0b1a0e; border-color: var(--ok); }
.step.current .n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step.done::before { background: var(--ok); }
.step .n svg { width: 16px; height: 16px; }
.step h3 { margin: 6px 0 4px; }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
.login-art .claim { font-family: var(--display); font-size: clamp(34px, 4vw, 54px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 750; max-width: 12ch; }
.login-art .claim em { font-style: normal; color: var(--accent); }
.login-art .features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; color: var(--text-2); max-width: 520px; }
.login-art .features div { display: flex; gap: 9px; align-items: center; font-size: 13.5px; }
.login-art .features svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.login-art .leaves { position: absolute; right: -80px; top: -60px; width: 420px; opacity: .9; pointer-events: none; }
.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-form h1 { font-family: var(--display); font-size: 28px; letter-spacing: -0.02em; margin: 0; }
.login-form p { margin: -8px 0 6px; color: var(--muted); }

/* ---------------- Responsiv ---------------- */
@media (max-width: 1200px) {
  .split, .split.wide-detail { grid-template-columns: 1fr; }
  .split .detail { position: static; max-height: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); z-index: 800; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .app.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 790; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .search-btn { min-width: 0; }
  .search-btn .label, .search-btn kbd { display: none; }
  .topbar-status .pill.optional { display: none; }
  .content { padding: 20px 16px 50px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .page-head h1 { font-size: 25px; }
  .topbar-status .pill:not(.keep) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Auswahl-Chips (Filter, Schnellbefehle) */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13px; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--faint); color: var(--text); }
.chip.active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.chip svg { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card-head > svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.list-item > svg, .row > svg { width: 15px; height: 15px; flex: none; }
.list-item > svg { color: var(--faint); }
