:root {
  --bg: #0b1114;
  --bg-2: #10181c;
  --card: #131d22;
  --card-2: #182429;
  --line: #22323a;
  --text: #e6f1f2;
  --muted: #8aa1a6;
  --accent: #1fd1c1;
  --accent-ink: #04211e;
  --accent-text: var(--accent);
  --accent-hover: color-mix(in srgb, var(--accent) 78%, white);
  --line-strong: #33505a;
  --btn-hover: #1d2c32;
  --thumb: #fff;
  --topbar-bg: rgba(11, 17, 20, .85);
  --art-glow: .22;
  --zoom: 1;
  --danger: #f0506e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  zoom: var(--zoom);
}
[hidden] { display: none !important; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }

/* ── Inputs & Buttons ── */
input, select, button { font: inherit; color: inherit; }
input[type=text], input[type=search], input[type=password], input[type=url], input:not([type]), select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  outline: none;
  min-width: 0;
  transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--accent); }
select { cursor: pointer; }

.btn {
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--line-strong); background: var(--btn-hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, color .15s;
  flex: none;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.big { width: 52px; height: 52px; background: var(--accent); color: var(--accent-ink); }
.icon-btn.big:hover { background: var(--accent-hover); }
.icon-btn.big svg { width: 24px; height: 24px; }
.icon-btn.active { color: var(--accent-text); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm svg { width: 16px; height: 16px; }
.icon-btn.danger:hover { color: var(--danger); }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  background: transparent; height: 18px; flex: 1; min-width: 0; cursor: pointer;
  --pct: 0%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--pct), var(--line) var(--pct));
}
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--thumb); margin-top: -5px; border: 0;
}
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--thumb); border: 0; }
input[type=range]:disabled { opacity: .4; cursor: default; }

/* ── Layout ── */
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -.01em; }
.brand b { color: var(--accent-text); font-weight: 700; }
.brand-link { color: inherit; text-decoration: none; border-radius: 8px; }
.brand-link:hover { text-decoration: none; }
.brand-link:hover .brand-mark { filter: brightness(1.1); }
.brand-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent);
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M13 22.5a3.5 3.5 0 1 1-2-3.2V9l11-2v12.5a3.5 3.5 0 1 1-2-3.2V10.4l-7 1.3z'/%3E%3C/svg%3E") center/100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M13 22.5a3.5 3.5 0 1 1-2-3.2V9l11-2v12.5a3.5 3.5 0 1 1-2-3.2V10.4l-7 1.3z'/%3E%3C/svg%3E") center/100% no-repeat;
}
.brand-lg { font-size: 24px; justify-content: center; }
.brand-lg .brand-mark { width: 40px; height: 40px; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.guild-picker { margin-left: auto; }
.guild-picker select { min-width: 220px; max-width: 40vw; }
.ws-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px rgba(240, 80, 110, .15); }
.ws-dot.on { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 20px;
  padding: 20px 24px 40px;
  max-width: 1400px; margin: 0 auto;
}
.col-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.card-head h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pill { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--card-2); border-radius: 99px; padding: 2px 8px; }

/* ── Player ── */
.player {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px;
  padding: 22px; position: relative; overflow: hidden;
}
.player::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--art-bg, none) center/cover; filter: blur(60px) saturate(1.3); opacity: var(--art-glow); transform: scale(1.3);
}
.player > * { position: relative; z-index: 1; }
.art {
  width: 200px; aspect-ratio: 1; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 45%, #1b2a55) 55%, #1b2a55 100%);
  background-size: cover; background-position: center;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.art svg { width: 64px; height: 64px; color: rgba(255, 255, 255, .85); }
.art.has-img svg { display: none; }
.np { display: flex; flex-direction: column; min-width: 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.eyebrow .live { background: var(--danger); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 10px; letter-spacing: .06em; }
#npTitle { font-size: 26px; margin: 6px 0 4px; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#npTitle a { color: inherit; text-decoration: none; }
#npTitle a:hover { color: var(--accent-text); }
.sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; min-width: 38px; }
.progress .time:last-child { text-align: right; }
.controls { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.volume { display: flex; align-items: center; gap: 8px; width: 190px; color: var(--muted); }
.vol-icon svg, .voice-icon svg { width: 18px; height: 18px; display: block; }
.voice-bar {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--muted);
}
.voice-bar select { flex: 1; max-width: 360px; }
.player.buffering #toggleBtn { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ── Listen ── */
.list { list-style: none; margin: 0; padding: 0; }
.queue-list { padding: 4px 8px 8px; max-height: 60vh; overflow: auto; }
.item {
  display: grid; grid-template-columns: auto 48px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 10px;
}
.item:hover { background: var(--card-2); }
.item.dragging { opacity: .4; }
.item.drop-target { box-shadow: inset 0 2px 0 var(--accent); }
.item .idx { width: 22px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.thumb { width: 48px; height: 36px; border-radius: 6px; background: var(--bg-2) center/cover; flex: none; display: grid; place-items: center; color: var(--muted); }
.thumb svg { width: 18px; height: 18px; }
.thumb.square { height: 48px; }
.item-main { min-width: 0; }
.item-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.item-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-actions { display: flex; gap: 2px; opacity: .65; transition: opacity .15s; }
.item:hover .item-actions, .item:focus-within .item-actions { opacity: 1; }
.results .item { grid-template-columns: 64px minmax(0, 1fr) auto; }
.results .thumb { width: 64px; height: 36px; }
.empty { color: var(--muted); padding: 18px 12px; text-align: center; }
.history { padding: 0 18px 14px; }
.history summary, .add-station summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.history .item { grid-template-columns: 48px minmax(0, 1fr) auto; }

/* ── Seitenleiste ── */
.side { padding: 0 0 12px; align-self: start; position: sticky; top: 76px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; }
.tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600;
}
.tabs button.active { background: var(--card-2); color: var(--text); }
.tab { padding: 14px 14px 0; overflow: auto; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 2px 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }

.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.station {
  position: relative; text-align: left; border: 1px solid var(--line); background: var(--card-2); border-radius: 12px;
  padding: 12px; cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  transition: border-color .15s, transform .1s;
}
.station:hover { border-color: var(--accent); }
.station.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.station .st-logo { width: 28px; height: 28px; margin-bottom: 8px; border-radius: 6px; background: var(--bg-2) center/cover; display: grid; place-items: center; color: var(--accent-text); flex: none; }
.station .st-logo svg { width: 16px; height: 16px; }
.station .st-name { font-weight: 600; line-height: 1.25; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.station .st-genre { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station .st-del { position: absolute; top: 4px; right: 4px; opacity: 0; }
.station:hover .st-del { opacity: 1; }

.job-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.job-bar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.job-error { color: var(--danger); font-size: 12px; }
.status-done { color: var(--accent-text); }

/* ── Login ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(360px, 100%); padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.form-error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 13px; }

/* ── Toasts ── */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast {
  background: var(--card-2); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: min(520px, 90vw);
  animation: toast-in .2s ease-out;
}
.toast.error { border-color: rgba(240, 80, 110, .6); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .side { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .topbar .brand span:last-child { display: none; }
  .guild-picker { flex: 1; }
  .guild-picker select { width: 100%; min-width: 0; max-width: none; }
  .player { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .art { width: 100%; max-width: 260px; margin: 0 auto; }
  #npTitle { font-size: 21px; }
  .volume { width: 100%; }
  .voice-bar { flex-wrap: wrap; }
  .voice-bar select { max-width: none; flex-basis: 100%; }
  .item { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .item .idx { display: none; }
}

/* ───────────── Themes (pro Browser einstellbar, siehe Design-Panel) ───────────── */
:root[data-theme="black"] {
  --bg: #000; --bg-2: #0a0a0a; --card: #0d0d0d; --card-2: #161616;
  --line: #242424; --line-strong: #3a3a3a; --btn-hover: #1c1c1c;
  --text: #f2f2f2; --muted: #8f8f8f;
  --topbar-bg: rgba(0, 0, 0, .85);
  --shadow: none;
}
:root[data-theme="midnight"] {
  --bg: #0b0f1e; --bg-2: #10152a; --card: #141a33; --card-2: #1a2140;
  --line: #262f55; --line-strong: #37427a; --btn-hover: #1f2850;
  --text: #e8ebff; --muted: #8e96c2;
  --topbar-bg: rgba(11, 15, 30, .85);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5f7; --bg-2: #e9eef1; --card: #fff; --card-2: #f0f4f6;
  --line: #d7e0e4; --line-strong: #b5c4ca; --btn-hover: #e6edf0;
  --text: #11212a; --muted: #5a6d75;
  --thumb: var(--accent);
  --accent-text: color-mix(in srgb, var(--accent) 62%, black);
  --topbar-bg: rgba(242, 245, 247, .85);
  --shadow: 0 6px 20px rgba(17, 33, 42, .07);
  --art-glow: .14;
}
:root[data-theme="light"] .icon-btn.big, :root[data-theme="light"] .btn.primary { box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent); }

:root[data-glow="off"] { --art-glow: 0; }
:root[data-radius="sharp"] { --radius: 4px; }
:root[data-radius="sharp"] :is(.btn, input, select, .item, .station, .art, .thumb, .tabs button, .toast) { border-radius: 4px; }
:root[data-motion="off"] *, :root[data-motion="off"] *::before { animation: none !important; transition: none !important; }

/* Kompakt */
:root[data-density="compact"] .layout { gap: 12px; padding: 12px 16px 24px; }
:root[data-density="compact"] .col-main { gap: 12px; }
:root[data-density="compact"] .player { grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 14px; }
:root[data-density="compact"] .art { width: 140px; }
:root[data-density="compact"] #npTitle { font-size: 20px; }
:root[data-density="compact"] .progress { padding-top: 10px; }
:root[data-density="compact"] .voice-bar { padding-top: 10px; }
:root[data-density="compact"] .item { padding: 4px 8px; gap: 10px; }
:root[data-density="compact"] .thumb { width: 40px; height: 30px; }
:root[data-density="compact"] .item { grid-template-columns: auto 40px minmax(0, 1fr) auto; }
:root[data-density="compact"] .station { padding: 8px 10px; }
:root[data-density="compact"] .station .st-logo { margin-bottom: 4px; }

/* ───────────── Design-Panel ───────────── */
.style-dialog {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text);
  padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.style-dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
.style-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.style-dialog header h2 { font-size: 16px; }
.style-body { padding: 6px 18px 18px; max-height: 70vh; overflow: auto; }
.style-body h3 { margin: 16px 0 8px; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.seg button {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 13px;
}
.seg button:hover { border-color: var(--line-strong); }
.seg button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
  background: var(--c); box-shadow: 0 0 0 1px var(--line) inset;
}
.swatch[aria-pressed="true"] { border-color: var(--text); }
.swatch-custom { position: relative; overflow: hidden; background: conic-gradient(#f87171, #facc15, #4ade80, #22d3ee, #818cf8, #f472b6, #f87171); }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.style-dialog footer { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }

/* ───────────── Login, Konto, Benutzerverwaltung ───────────── */
.login-card h2 { font-size: 18px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.small { font-size: 12px; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; }
.avatar {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.dialog-wide { width: min(760px, calc(100vw - 32px)); }
.style-dialog footer .muted { align-self: center; }
.seg-inline { display: flex; gap: 4px; }
.seg-inline button { flex: none; padding: 6px 12px; }
.search-row.wrap { flex-wrap: wrap; }
.search-row.wrap input { flex: 2 1 180px; }
.search-row select { flex: 1 1 120px; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: 1px;
}
.badge.accent { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge.warn { color: #e0a43a; border-color: rgba(224, 164, 58, .45); }
.badge.danger { color: var(--danger); border-color: rgba(240, 80, 110, .45); }

.user-list { margin-top: 12px; }
.user-list .item { grid-template-columns: 34px minmax(0, 1fr) auto; }
.user-list .avatar { width: 32px; height: 32px; font-size: 13px; }
.user-list .item.disabled { opacity: .55; }
.user-list select { padding: 5px 8px; font-size: 13px; }
.user-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.temp-pw {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.temp-pw code { font: 600 15px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; user-select: all; }
.temp-pw .grow { flex: 1; min-width: 180px; }

.role-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.role-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg-2); }
.role-card header { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; margin-bottom: 8px; }
.role-card header input { flex: 1; font-weight: 600; }
.role-card header .role-name { flex: 1; font-weight: 600; }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.perm-list label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.perm-list input { margin-top: 3px; accent-color: var(--accent); }
.perm-list code { font-size: 11px; color: var(--muted); display: block; }
.role-card .role-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }

/* ── Unterseite Benutzer & Rechte ── */
#app[data-view="admin"] .guild-picker select,
#app[data-view="admin"] .ws-dot { visibility: hidden; }
.admin-page { max-width: 1100px; margin: 0 auto; padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head h1 { font-size: 24px; }
.back-link { color: var(--muted); font-size: 13px; text-decoration: none; width: fit-content; }
.back-link:hover { color: var(--text); }
.page-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.page-tabs a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; margin-bottom: -1px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent;
}
.page-tabs a:hover { color: var(--text); }
.page-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.page-tabs .pill:empty { display: none; }
.admin-card .card-head { flex-wrap: wrap; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-card .card-head form { flex: 1; max-width: 560px; margin: 0; }
.admin-body { padding: 4px 18px 18px; }
.admin-body .hint { margin-top: 12px; }
.admin-card .role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 640px) {
  .admin-page { padding: 16px; }
  .admin-card .role-list { grid-template-columns: 1fr; }
  .user-list .item { grid-template-columns: 34px minmax(0, 1fr); }
  .user-list .user-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ── Auto-Join / Auto-Disconnect ── */
.auto-pill { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent); white-space: nowrap; }
.gs-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; transition: opacity .15s; }
.gs-fields.off { opacity: .45; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.field select { width: 100%; }
#gsDialog .seg { grid-template-columns: repeat(3, 1fr); }
#gsDialog .hint { margin: 8px 2px 12px; }
@media (max-width: 640px) {
  .gs-fields { grid-template-columns: 1fr; }
  #gsDialog .seg { grid-template-columns: 1fr; }
}
