/* ==========================================================================
   Stadtleben Nordhain – Transcript-Website
   Ein Designsystem für Login, Übersicht, Administration (und die Transcript-Leiste).
   ========================================================================== */

:root {
  --bg: #050c09;
  --panel: rgba(14, 26, 21, 0.78);
  --panel-solid: #0f1b16;
  --panel-2: #14231d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #eceef3;
  --muted: #8ba79b;

  --accent: #10b981;
  --accent-2: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --grad: linear-gradient(135deg, #10b981 0%, #34d399 52%, #2dd4bf 100%);

  --ok: #3ccf7a;
  --warn: #ffb84d;
  --danger: #ff5c63;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }

svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.muted { color: var(--muted); }
.gradient { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Hintergrund ---------------------------------------------------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; animation: drift 22s ease-in-out infinite alternate; }
.orb.o1 { width: 620px; height: 620px; left: -160px; top: -200px; background: #10b981; }
.orb.o3 { width: 420px; height: 420px; left: 55%; top: -180px; background: #34d399; opacity: 0.16; animation-duration: 34s; }
.orb.o2 { width: 560px; height: 560px; right: -180px; bottom: -220px; background: #0d9488; opacity: 0.32; animation-duration: 28s; }
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
}
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* ---- Logo ----------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 19px; color: #fff;
  background: var(--grad); box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ---- Karten / Panels ------------------------------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.btn.primary { background: var(--grad); color: #04130d; box-shadow: 0 8px 22px rgba(16, 185, 129, 0.35); }
.btn.primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5); }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn.danger { background: rgba(255, 92, 99, 0.1); border-color: rgba(255, 92, 99, 0.35); color: var(--danger); }
.btn.danger:hover { background: rgba(255, 92, 99, 0.2); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; padding: 14px 20px; font-size: 15px; }
.btn svg { font-size: 1.1em; }

/* ---- Hinweise -------------------------------------------------------- */
.notice {
  display: flex; gap: 10px; align-items: center;
  background: rgba(255, 184, 77, 0.1); border: 1px solid rgba(255, 184, 77, 0.28); color: var(--warn);
  border-radius: 12px; padding: 11px 15px; margin: 0 0 16px; font-size: 14px;
}
.notice.ok { background: rgba(60, 207, 122, 0.1); border-color: rgba(60, 207, 122, 0.28); color: var(--ok); }
.hint { color: var(--muted); font-size: 12.5px; }

/* ==========================================================================
   Öffentlich: Login / Fehlerseite
   ========================================================================== */
.hero {
  flex: 1; width: 100%;
  min-height: calc(100vh - 90px); max-width: 1120px; margin: 0 auto; padding: 48px 28px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center;
}
.hero.single { grid-template-columns: minmax(0, 440px); justify-content: center; }

.hero-copy .logo { margin-bottom: 40px; }
.hero-copy h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; }
.lead { margin-top: 20px; font-size: 17px; color: #b4b9c6; max-width: 46ch; }

.points { list-style: none; padding: 0; margin: 38px 0 0; display: grid; gap: 18px; }
.points li { display: flex; gap: 14px; align-items: flex-start; }
.points strong { display: block; font-weight: 650; }
.points span:not(.ico) { color: var(--muted); font-size: 14px; }
.ico {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 20px; flex: 0 0 40px;
  color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(16, 185, 129, 0.25);
}

.login-card { padding: 38px 34px; }
.login-card h2 { font-size: 26px; font-weight: 750; margin-bottom: 8px; }
.login-card .muted { margin-bottom: 26px; }
.login-card .btn.block { margin-top: 6px; }
.login-card .hint { margin-top: 18px; text-align: center; }
.login-card.center { text-align: center; }

/* ==========================================================================
   Angemeldeter Bereich
   ========================================================================== */
.topbar { position: sticky; top: 0; z-index: 20; padding: 14px 20px 0; }
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 14px 10px 16px;
  display: flex; align-items: center; gap: 22px;
  background: rgba(7, 17, 13, 0.74); border: 1px solid var(--line); border-radius: 18px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 10px; transition: color 0.15s, background 0.15s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav a.active { color: var(--text); background: var(--accent-soft); }

.user { display: flex; align-items: center; gap: 12px; }
.user img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08); }
.user form { margin: 0; }
.user-text { display: flex; flex-direction: column; line-height: 1.25; }
.user-name { font-weight: 650; font-size: 14px; }

.badge {
  align-self: flex-start; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: #04130d; background: var(--grad);
}
.badge.soft { background: var(--accent-soft); color: #6ee7b7; }

.wrap { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 20px 50px; }
.wrap .footer { text-align: center; margin-top: 34px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.page-head .muted { margin-top: 6px; }

.stat { text-align: right; }
.stat-num { display: block; font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ---- Suche ----------------------------------------------------------- */
.search { position: relative; z-index: 20; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 16px 18px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.grow { flex: 1 1 220px; }
.field > span { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }

select, input[type="text"], input[type="date"] {
  width: 100%; background: rgba(0, 0, 0, 0.3); color: var(--text); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 14px; font: inherit; color-scheme: dark; transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus, input[type="text"]:focus, input[type="date"]:focus { outline: none; border-color: rgba(16, 185, 129, 0.7); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
select { appearance: none; -webkit-appearance: none; min-width: 220px; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ba79b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select option, select optgroup { background: #0f1b16; color: var(--text); }
/* ---- Auswahl mit Suche ---- */
.picker-field { flex: 1 1 240px; }
.picker { position: relative; }
.picker-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: rgba(0, 0, 0, 0.3); color: var(--text); border: 1px solid var(--line); border-radius: 11px;
  padding: 9px 12px; font: inherit; cursor: pointer; min-height: 44px; transition: border-color 0.15s, box-shadow 0.15s;
}
.picker-btn:hover { border-color: var(--line-strong); }
.picker-btn[aria-expanded="true"], .picker-btn:focus-visible { outline: none; border-color: rgba(16, 185, 129, 0.7); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
.picker-btn > svg { margin-left: auto; color: var(--muted); font-size: 16px; transition: transform 0.2s; }
.picker-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
.picker-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 24px; background: #0c0d0e; }
.picker-av[hidden] { display: none; }

.picker-pop {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); min-width: 260px;
  background: #0d1813; border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(16, 185, 129, 0.08);
}
.picker-pop[hidden], .picker-empty[hidden], .picker-list li[hidden] { display: none; }
.picker-search-wrap { position: relative; margin-bottom: 6px; }
.picker-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
.picker-search { padding: 9px 12px 9px 36px !important; font-size: 14px; }
.picker-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(16, 185, 129, 0.35) transparent; }
.picker-list::-webkit-scrollbar { width: 8px; }
.picker-list::-webkit-scrollbar-track { background: transparent; }
.picker-list::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.28); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.picker-list::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.55); background-clip: padding-box; }

/* Seiten-Scrollbar im gleichen Stil */
html { scrollbar-color: rgba(16, 185, 129, 0.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.28); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.55); background-clip: padding-box; }
.picker-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.picker-list li.hl { background: rgba(255, 255, 255, 0.06); }
.picker-list li.sel { background: var(--accent-soft); color: #a7f3d0; font-weight: 600; }
.picker-list li.sel.hl { background: rgba(16, 185, 129, 0.24); }
.picker-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }

.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; }
.input-icon input { padding-left: 40px; }
.search .actions { display: flex; gap: 8px; }

/* Alle Eingaben der Suchleiste gleich hoch, damit Beschriftungen und Ränder fluchten */
.search input[type="text"], .search input[type="date"], .picker-btn, .search .actions .btn { height: 46px; min-height: 46px; }
.search .actions .btn { padding-top: 0; padding-bottom: 0; }
.search .picker-pop .picker-search { height: 40px; min-height: 40px; }

/* ---- Tabelle --------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 20px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
tbody tr { transition: background 0.15s; }
tbody tr + tr td { border-top: 1px solid rgba(255, 255, 255, 0.045); }
tbody tr:hover td { background: rgba(16, 185, 129, 0.06); }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.case { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-weight: 700; color: #a7f3d0; }

.chip {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650;
  background: rgba(255, 255, 255, 0.07); color: #cfd3de; border: 1px solid var(--line);
}
.chip.state-open, .chip.state-closed { display: inline-flex; align-items: center; gap: 7px; }
.chip.state-open i, .chip.state-closed i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip.state-open { background: rgba(255, 184, 77, 0.12); color: #ffc56e; border-color: rgba(255, 184, 77, 0.3); }
.chip.state-closed { background: rgba(255, 92, 99, 0.1); color: #ff8a90; border-color: rgba(255, 92, 99, 0.28); }
.chip.cat-SUPPORT { background: rgba(96, 165, 250, 0.13); color: #8cbcff; border-color: rgba(96, 165, 250, 0.3); }
.chip.cat-BEWERBUNG { background: rgba(163, 230, 53, 0.12); color: #bef264; border-color: rgba(163, 230, 53, 0.3); }
.chip.cat-BESCHWERDE { background: rgba(255, 184, 77, 0.12); color: #ffc56e; border-color: rgba(255, 184, 77, 0.28); }
.chip.cat-HIGHTEAM { background: rgba(176, 124, 255, 0.14); color: #c6a1ff; border-color: rgba(176, 124, 255, 0.3); }
.chip.cat-ENTBANNUNG { background: rgba(255, 92, 99, 0.12); color: #ff8a90; border-color: rgba(255, 92, 99, 0.28); }

.row-actions { text-align: right; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline-block; vertical-align: middle; margin: 0 0 0 6px; }
.row-actions .btn { vertical-align: middle; }
.btn.danger.icon svg { font-size: 15px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 24px; text-align: center; }
.empty-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; font-size: 28px; margin-bottom: 8px; color: var(--accent-2); background: var(--accent-soft); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pager div { display: flex; gap: 8px; }

/* ---- Administration -------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.info-card { display: flex; gap: 14px; padding: 18px 20px; align-items: flex-start; }
.info-card strong { display: block; margin-bottom: 2px; }
.info-card span:not(.ico) { color: var(--muted); font-size: 14px; }

.perm-table th.check, .perm-table td.check { text-align: center; width: 150px; }
.role-name { font-weight: 600; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.12); transition: background 0.2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.2s;
}
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.save-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; flex-wrap: wrap; }

/* ==========================================================================
   Mobil
   ========================================================================== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 32px 20px; min-height: 0; }
  .hero-copy .logo { margin-bottom: 28px; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { padding: 10px 12px 0; }
  .topbar-inner { flex-wrap: wrap; gap: 10px 14px; }
  .nav { order: 3; width: 100%; margin: 0; }
  .user { margin-left: auto; }
  .user-text { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .stat { text-align: left; }
  .page-head h1 { font-size: 28px; }

  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 12px 6px; }
  tbody tr + tr { border-top: 1px solid var(--line); }
  tbody tr + tr td { border-top: 0; }
  td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 6px 14px; white-space: normal; text-align: right; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; }
  td.row-actions { justify-content: flex-end; padding-top: 12px; }
  td.row-actions::before { content: none; }
  tbody tr:hover td:first-child { box-shadow: none; }
  .perm-table td.check { width: 100%; }
}

/* ---- Footer ---- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: rgba(5, 12, 9, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-footer-inner { max-width: 1180px; margin: 0 auto; padding: 22px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; }
.foot-brand img { border-radius: 6px; }
.foot-links { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 600; transition: color 0.15s; }
.foot-links a:hover { color: var(--accent-2); }
@media (max-width: 720px) { .site-footer-inner { flex-direction: column; text-align: center; } }

/* ---- Administration: eine Rolle auf einmal ---- */
.role-select { padding: 16px 18px; margin-bottom: 18px; position: relative; z-index: 20; max-width: 520px; }
.role-select .picker-field { width: 100%; }
.picker-list li .picker-tags { margin-left: auto; padding-left: 12px; color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.picker-list li.sel .picker-tags { color: #6ee7b7; }

.editor { padding: 22px 24px; margin-bottom: 18px; }
.editor-head { margin-bottom: 14px; }
.editor-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; overflow-wrap: anywhere; }
.perm-rows { display: grid; gap: 10px; }
.perm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; cursor: pointer;
  border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); transition: background 0.15s, border-color 0.15s;
}
.perm-row:hover { background: rgba(255, 255, 255, 0.055); border-color: var(--line-strong); }
.perm-text strong { display: block; }
.perm-text span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.perm-row .switch { flex: 0 0 44px; }

.overview { padding: 20px 22px; }
.overview h3 { margin: 0 0 12px; font-size: 16px; }
.given { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.given a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 10px; text-decoration: none; transition: background 0.15s; }
.given a:hover { background: rgba(255, 255, 255, 0.05); }
.given a.current { background: var(--accent-soft); }
.given .role-name { font-weight: 600; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: #cfd3de; }
.tag.t-admin { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }
.tag.t-view { background: rgba(96, 165, 250, 0.13); color: #8cbcff; border-color: rgba(96, 165, 250, 0.3); }
.tag.t-group { background: rgba(176, 124, 255, 0.14); color: #c6a1ff; border-color: rgba(176, 124, 255, 0.3); }
.badge.rank { border: 1px solid transparent; }
@media (max-width: 720px) { .given a { flex-direction: column; align-items: flex-start; } .tags { justify-content: flex-start; } .perm-row { gap: 12px; } }

/* ---- Gefahrenbereich (nur Owner) ---- */
.danger-zone { padding: 22px 24px; margin-top: 18px; border-color: rgba(255, 92, 99, 0.3); background: linear-gradient(180deg, rgba(60, 18, 22, 0.35), var(--panel)); }
.danger-head h3 { margin: 0; font-size: 18px; color: #ff8a90; }
.danger-head .muted { margin-top: 4px; font-size: 13.5px; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 16px 0; }
.danger-row + .danger-row { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.danger-row .perm-text { flex: 1 1 320px; }
.danger-input { display: flex; gap: 8px; flex: 0 1 auto; }
.danger-input input[type="text"] { width: 200px; height: 40px; }
.danger-input .btn { height: 40px; }
@media (max-width: 720px) { .danger-input { width: 100%; } .danger-input input[type="text"] { flex: 1; width: auto; } }