@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

/* ------------------------------------------------------------------ Farben */
:root {
  --accent: #f47b20;
  --bg: #0b0b0e;
  --bg-soft: #101014;
  --panel: #141418;
  --panel-2: #1b1b21;
  --panel-3: #23232b;
  --border: #26262e;
  --border-strong: #34343e;
  --text: #ededf0;
  --text-2: #c4c4cc;
  --muted: #8b8b97;
  --ok: #22c55e;
  --warn: #eab308;
  --bad: #ef4444;
  --info: #6366f1;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-ink: #1a1203;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -12px rgba(0,0,0,.6);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6f8; --bg-soft: #f1f1f4; --panel: #ffffff; --panel-2: #f6f6f8; --panel-3: #ececf0;
  --border: #e6e6eb; --border-strong: #d6d6de; --text: #17171c; --text-2: #3c3c45; --muted: #70707c;
  --shadow: 0 1px 2px rgba(16,16,24,.04), 0 8px 24px -16px rgba(16,16,24,.18);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f6f8; --bg-soft: #f1f1f4; --panel: #ffffff; --panel-2: #f6f6f8; --panel-3: #ececf0;
    --border: #e6e6eb; --border-strong: #d6d6de; --text: #17171c; --text-2: #3c3c45; --muted: #70707c;
    --shadow: 0 1px 2px rgba(16,16,24,.04), 0 8px 24px -16px rgba(16,16,24,.18);
    color-scheme: light;
  }
}

/* ------------------------------------------------------------------ Grundlagen */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14.5px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; margin: 0 0 1.25rem; line-height: 1.25; }
h2 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .9rem; }
h3 { font-size: .92rem; font-weight: 600; margin: 0 0 .5rem; }
p { margin: 0 0 .8rem; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; }
code { background: var(--panel-3); padding: .1rem .35rem; border-radius: 5px; }
pre { white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--border); padding: .8rem 1rem; border-radius: var(--radius-sm); }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.i.sm { width: 15px; height: 15px; vertical-align: -2px; }
.i.lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ Layout */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--bg-soft); border-right: 1px solid var(--border);
  padding: 1.1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: .25rem;
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 650; letter-spacing: -.01em; padding: .2rem .55rem 1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img, .logo-img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.logo-img.lg { width: 72px; height: 72px; border-radius: 18px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: var(--accent-ink); font-weight: 800; font-size: .95rem; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent);
}
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; letter-spacing: 0; }
.nav-group { margin-top: .6rem; }
.nav-label { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: .4rem .7rem .3rem; opacity: .85; }
.nav a {
  display: flex; gap: .7rem; align-items: center; padding: .48rem .7rem; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; position: relative; transition: background .12s, color .12s;
}
.nav a .i { color: var(--muted); transition: color .12s; }
.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav a:hover .i { color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav a.active .i { color: var(--accent); }
.nav a.active::before { content: ""; position: absolute; left: -.8rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 1rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: .9rem; padding: .7rem 2rem; min-height: 60px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(12px);
}
.topbar .spacer { flex: 1; }
.topbar .crumb { color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: .4rem; }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.user { display: flex; align-items: center; gap: .6rem; padding: .25rem .3rem .25rem .25rem; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); }
.user img, .user .ph { width: 28px; height: 28px; border-radius: 50%; }
.user .ph { background: var(--panel-3); display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted); }
.user .name { font-size: .85rem; font-weight: 550; padding-right: .2rem; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.content { padding: 2rem 2.25rem 3rem; width: 100%; max-width: 1360px; margin-inline: auto; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; width: 272px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
  .menu-btn { display: inline-grid; }
  .content { padding: 1.1rem 1rem 2rem; }
  .topbar { padding: .6rem 1rem; }
  .topbar .crumb, .user .name { display: none; }
  h1 { font-size: 1.35rem; }
}

/* ------------------------------------------------------------------ Seitenkopf */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .35rem 0 0; color: var(--muted); max-width: 70ch; }
.back { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .86rem; font-weight: 500; margin-bottom: .8rem; }
.back:hover { color: var(--text); text-decoration: none; }

/* ------------------------------------------------------------------ Karten */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 1rem; }
.grid > .card, .kanban > .col { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 1rem 1.25rem 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (min-width: 1200px) { .grid-stats:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1199px) {
  .grid-stats:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid-stats:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
  .grid-stats:has(> :nth-child(5):last-child) > :nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 639px) {
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .grid-stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.mt { margin-top: 1rem; }
.stat { display: flex; flex-direction: column; gap: .5rem; color: inherit; transition: border-color .15s, transform .15s; }
a.stat:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.stat .top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stat .ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.stat .value { font-size: 2rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.tight { gap: .4rem; }
.stack > * + * { margin-top: .75rem; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1060px) { .split { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .9rem; margin: 0 0 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }

/* ------------------------------------------------------------------ Badges & Hinweise */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .14rem .55rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; background: var(--panel-3); color: var(--text-2); white-space: nowrap; line-height: 1.5;
}
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: color-mix(in srgb, var(--ok) 85%, var(--text)); }
.badge.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: color-mix(in srgb, var(--warn) 80%, var(--text)); }
.badge.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: color-mix(in srgb, var(--bad) 80%, var(--text)); }
.badge.info { background: color-mix(in srgb, var(--info) 18%, transparent); color: color-mix(in srgb, var(--info) 65%, var(--text)); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dot:not(.badge) { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok:not(.badge) { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.bad:not(.badge) { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 20%, transparent); }
.dot.warn:not(.badge) { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 20%, transparent); }

.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.1rem; border: 1px solid; font-size: .92rem; }
.alert .i { margin-top: 1px; }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 9%, var(--panel)); }
.alert.ok .i { color: var(--ok); }
.alert.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 9%, var(--panel)); }
.alert.bad .i { color: var(--bad); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.alert.warn .i { color: var(--warn); }

/* ------------------------------------------------------------------ Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 550; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; background: var(--panel-2); }
thead th:first-child { border-top-left-radius: 8px; }
thead th:last-child { border-top-right-radius: 8px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
tr[data-href] { cursor: pointer; }
td .sub { color: var(--muted); font-size: .82rem; }
.card.flush table th { background: transparent; border-top: 1px solid var(--border); }
.card.flush th:first-child, .card.flush td:first-child { padding-left: 1.25rem; }
.card.flush th:last-child, .card.flush td:last-child { padding-right: 1.25rem; }

/* ------------------------------------------------------------------ Formulare */
label { display: block; font-weight: 550; margin-bottom: .4rem; font-size: .86rem; color: var(--text-2); }
.field { margin-bottom: 1.1rem; }
.field .help { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: .35rem; }
label .help { display: inline; margin: 0; }
input[type=text], input[type=number], input[type=url], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: .58rem .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: .92rem; transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8b97' stroke-width='2' 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 .6rem center; }
select[multiple] { min-height: 150px; padding-right: .75rem; background-image: none; }
input[type=color] { width: 44px; height: 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-soft); padding: 3px; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type=file] { font: inherit; font-size: .85rem; color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 550; margin-right: .75rem; padding: .45rem .8rem; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text); cursor: pointer; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; color: var(--text); margin: 0; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.checks .check { padding: .4rem .7rem; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .86rem; }
.checks .check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 0 1.1rem; }
.form-section { grid-column: 1 / -1; margin: .6rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 36px; padding: 0 .95rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text);
  font: inherit; font-size: .88rem; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s, box-shadow .12s;
}
.btn:hover { background: var(--panel-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.danger { background: color-mix(in srgb, var(--bad) 14%, var(--panel-2)); color: color-mix(in srgb, var(--bad) 85%, var(--text)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.ok { background: color-mix(in srgb, var(--ok) 14%, var(--panel-2)); color: color-mix(in srgb, var(--ok) 85%, var(--text)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.btn.ok:hover { background: var(--ok); color: #04210f; }
.btn.small { height: 30px; padding: 0 .7rem; font-size: .82rem; border-radius: 8px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.block { width: 100%; }
form.inline { display: inline; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.sticky-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: .5rem; background: linear-gradient(transparent, var(--panel) 35%); padding: 1.4rem 0 .2rem; margin-top: .5rem; }

.tabs { display: inline-flex; gap: .2rem; padding: .25rem; background: var(--panel); border: 1px solid var(--border); border-radius: 11px; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tabs a { padding: .4rem .85rem; color: var(--muted); border-radius: 8px; font-weight: 550; font-size: .86rem; display: inline-flex; align-items: center; gap: .4rem; }
.tabs a:hover { text-decoration: none; color: var(--text); background: var(--panel-2); }
.tabs a.active { color: var(--text); background: var(--panel-3); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tabs .count { font-size: .72rem; color: var(--muted); background: var(--bg-soft); padding: 0 .4rem; border-radius: 999px; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.1rem; }
.search { position: relative; flex: 1; max-width: 420px; min-width: 200px; }
.search .i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 2.2rem; }

/* Schalter */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: .18s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* ------------------------------------------------------------------ Module */
.module-card { display: flex; flex-direction: column; gap: .7rem; transition: border-color .15s; }
.module-card:hover { border-color: var(--border-strong); }
.module-card .head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.module-card .title { font-weight: 600; color: var(--text); }
.module-card .channel { color: var(--muted); font-size: .8rem; font-family: ui-monospace, Menlo, monospace; }
.module-card p { margin: 0; color: var(--muted); font-size: .87rem; flex: 1; }
.module-card .foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.cat-title { margin: 1.8rem 0 .8rem; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: .75rem; }
.cat-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cat-title:first-of-type { margin-top: .2rem; }

/* ------------------------------------------------------------------ Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban .col { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; min-height: 240px; transition: border-color .12s, background .12s; }
.kanban .col h3 { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .1rem .2rem .8rem; }
.kanban .col.drop { border-color: var(--accent); background: var(--accent-soft); }
.kanban .item { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: .75rem .85rem; margin-bottom: .6rem; cursor: grab; display: block; color: var(--text); box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.kanban .item:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.kanban .item.norehire { box-shadow: inset 3px 0 0 var(--bad), var(--shadow); }
.kanban .item .meta { display: flex; gap: .7rem; align-items: center; color: var(--muted); font-size: .8rem; margin-top: .45rem; }
.kanban .item .meta span { display: inline-flex; align-items: center; gap: .25rem; }

/* ------------------------------------------------------------------ Ticketverlauf */
.chat { display: flex; flex-direction: column; gap: 1.05rem; max-height: 70vh; overflow-y: auto; padding-right: .25rem; }
.msg { display: flex; gap: .75rem; }
.msg img.av, .msg .av.ph { width: 38px; height: 38px; border-radius: 50%; flex: none; }
.msg .av.ph { background: var(--panel-3); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: .8rem; }
.msg .body { min-width: 0; flex: 1; }
.msg .meta { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .15rem; }
.msg .meta b { color: var(--text); font-size: .9rem; font-weight: 600; }
.msg.team .meta b { color: var(--accent); }
.msg .text { word-wrap: break-word; color: var(--text-2); }
.msg .qa { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .85rem; }
.msg .qa > div + div { margin-top: .6rem; }
.mention { background: color-mix(in srgb, var(--info) 22%, transparent); color: color-mix(in srgb, var(--info) 60%, var(--text)); border-radius: 4px; padding: 0 .25rem; font-weight: 500; }
.attach { display: inline-flex; margin-top: .4rem; align-items: center; gap: .35rem; }
.attach img { max-width: 300px; max-height: 220px; border-radius: 8px; display: block; border: 1px solid var(--border); }
.closed-note { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .84rem; padding-top: .5rem; border-top: 1px dashed var(--border); }

/* ------------------------------------------------------------------ Discord-Vorschau */
.dc-preview { background: #313338; color: #dbdee1; border-radius: 10px; padding: 1rem 1.1rem; font-size: .93rem; font-family: "gg sans", "Inter", sans-serif; }
.dc-preview .author { display: flex; align-items: center; gap: .6rem; margin-bottom: .2rem; }
.dc-preview .author .av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.dc-preview .author b { color: #f2f3f5; font-weight: 600; }
.dc-preview .author .tag { background: #5865f2; color: #fff; font-size: .62rem; font-weight: 700; border-radius: 3px; padding: .05rem .3rem; }
.dc-preview .ping { color: #c9cdfb; background: rgba(88,101,242,.3); border-radius: 3px; padding: 0 2px; display: inline-block; margin: .2rem 0 0 46px; }
.dc-embed { margin: .4rem 0 0 46px; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 4px; padding: .7rem 1rem; max-width: 520px; }
.dc-embed .t { font-weight: 700; color: #f2f3f5; margin-bottom: .3rem; }
.dc-embed img { max-width: 100%; border-radius: 4px; margin-top: .6rem; }
.dc-embed .f { color: #b5bac1; font-size: .74rem; margin-top: .6rem; }
.dc-embed code { background: #1e1f22; color: #dbdee1; }
@media (max-width: 600px) { .dc-embed, .dc-preview .ping { margin-left: 0; } }

/* ------------------------------------------------------------------ Beweise */
.evidence { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.evidence .ev { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: .45rem; font-size: .78rem; overflow: hidden; display: flex; flex-direction: column; gap: .3rem; }
.evidence .ev img, .evidence .ev video { width: 100%; height: 104px; object-fit: cover; border-radius: 6px; display: block; background: #000; }
.evidence .ev .file { height: 104px; display: grid; place-items: center; color: var(--muted); background: var(--panel-3); border-radius: 6px; }
.evidence .ev .file .i { width: 30px; height: 30px; }
.evidence .ev .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .4rem; border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 1.2rem 1rem; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s; margin: 0; font-weight: 500; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone .i { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ Sonstiges */
.rolemap-row { display: grid; grid-template-columns: 110px 1fr auto; gap: .5rem; margin-bottom: .5rem; }
.empty { color: var(--muted); text-align: center; padding: 2.5rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.empty .i { width: 28px; height: 28px; opacity: .6; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(60rem 30rem at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), var(--bg); }
.login-card { max-width: 400px; width: 100%; text-align: center; padding: 2.2rem 2rem; }
.login-card .brand { justify-content: center; padding: 0 0 1.4rem; }
.login-card .brand .logo { width: 48px; height: 48px; font-size: 1.3rem; border-radius: 14px; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; height: 44px; width: 100%; font-size: .95rem; box-shadow: 0 8px 22px -10px #5865f2; }
.btn.discord:hover { background: #4752c4; }
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: .4rem; bottom: .4rem; width: 2px; background: var(--border); border-radius: 2px; }
.timeline .ev-item { position: relative; padding: .85rem 1rem; border: 1px solid var(--border); background: var(--panel-2); border-radius: 12px; margin-bottom: .75rem; }
.timeline .ev-item::before { content: ""; position: absolute; left: calc(-1.5rem + 1px); top: 1.15rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--panel); }
.timeline .ev-item.inactive::before { background: var(--muted); }
.timeline .ev-item .reason { margin: .35rem 0 .2rem; color: var(--text); }
.profile-head { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.profile-head img, .profile-head .ph { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--panel-3); }
.profile-head .ph { background: var(--panel-3); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; color: var(--muted); font-size: .86rem; margin-top: .5rem; }
.facts b { color: var(--text); font-weight: 600; }
.role-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; padding: .12rem .55rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); margin: 0 .25rem .3rem 0; }
.role-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: .65rem 0; border-bottom: 1px solid var(--border); }
ul.plain > li:last-child { border-bottom: 0; }
.feed li { display: flex; gap: .75rem; align-items: baseline; }
.feed .when { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.list-editor > li { padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); margin-bottom: .6rem; border-bottom: 1px solid var(--border) !important; }
.list-editor summary { padding: .85rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.list-editor summary .grip { color: var(--muted); cursor: grab; }
.list-editor details[open] summary { border-bottom: 1px solid var(--border); }
.list-editor .body { padding: 1rem; }
.list-editor li.new summary { color: var(--accent); font-weight: 600; }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--panel-3); font-weight: 700; font-size: .8rem; color: var(--muted); }
.rank.r1 { background: color-mix(in srgb, #eab308 22%, transparent); color: #eab308; }
.rank.r2 { background: color-mix(in srgb, #a1a1aa 22%, transparent); color: #c4c4cc; }
.rank.r3 { background: color-mix(in srgb, #d97706 22%, transparent); color: #f59e0b; }
.stars { display: inline-flex; gap: 1px; color: var(--warn); vertical-align: -2px; }
.stars .i { width: 14px; height: 14px; }
.stars .i.off { color: var(--border-strong); }

/* ------------------------------------------------------------------ Feinschliff */
.card { background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 100%, #fff 1.5%), var(--panel)); }
.stat { position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent); pointer-events: none; opacity: 0; transition: opacity .2s; }
a.stat:hover::after { opacity: 1; }
.main { background: radial-gradient(70rem 22rem at 30% -8rem, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%); }
.sidebar .brand { border-bottom: 1px solid var(--border); margin: 0 .1rem .2rem; padding-bottom: 1.05rem; }
.mobile-brand { display: none; }
.card-head h2 { display: flex; align-items: center; gap: .5rem; }
th { white-space: nowrap; }
.tabs::-webkit-scrollbar { display: none; }

@media (max-width: 900px) {
  .topbar { gap: .5rem; }
  .mobile-brand { display: flex; padding: 0; gap: .55rem; font-size: .95rem; min-width: 0; }
  .mobile-brand .logo-img { width: 30px; height: 30px; border-radius: 8px; }
  .mobile-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user { padding: .2rem; gap: .3rem; }
  .page-head { margin-bottom: 1.1rem; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs a { white-space: nowrap; flex: none; }
  .toolbar .search { flex: 1 1 100%; max-width: none; min-width: 0; }
  .card { padding: 1.05rem; }
  .card.flush > .card-head { padding: .9rem 1.05rem 0; }
  .card.flush th:first-child, .card.flush td:first-child { padding-left: 1.05rem; }
}
@media (max-width: 639px) {
  .stat .value { font-size: 1.6rem; }
  .stat .ic { width: 28px; height: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sticky-save .btn { flex: 1; }
}
