/* PLAXIA Team – Design übernommen von plaxia.net (Farben, Radien, Inter + Lexend) */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/inter-latin.woff2') format('woff2'); 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'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('../assets/fonts/lexend-latin.woff2') format('woff2'); 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: 'Lexend'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('../assets/fonts/lexend-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f4f3ee;
  --surface: #ffffff;
  --surface-soft: #f7f6f2;
  --surface-mute: #eceae4;
  --hover: rgba(17, 19, 20, .05);
  --ink: #111314;
  --muted: #64686d;
  --muted-2: #6b7076;
  --line: rgba(17, 19, 20, .10);
  --line-soft: rgba(17, 19, 20, .06);
  --shadow: 0 24px 70px rgba(20, 24, 34, .10);
  --shadow-md: 0 18px 44px rgba(20, 24, 34, .08);
  --shadow-sm: 0 8px 22px rgba(20, 24, 34, .05);
  --blue: #3848d8;
  --blue-dark: #2532a6;
  --blue-soft: #e9ebff;
  --blue-ink: #39449c;
  --purple: #8d57ff;
  --purple-soft: #efe8ff;
  --danger: #d63c3c;
  --danger-soft: #fdeaea;
  --success: #1f9d61;
  --contrast: #16191d;
  --contrast-ink: #ffffff;
  --backdrop: rgba(17, 19, 20, .32);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --titlebar: 44px;
  --sidebar: 252px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Lexend', 'Inter', system-ui, sans-serif;
  --mono: 'Cascadia Code', Consolas, ui-monospace, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #101115;
  --surface: #181a20;
  --surface-soft: #20232a;
  --surface-mute: #272b33;
  --hover: rgba(255, 255, 255, .07);
  --ink: #f1f0ec;
  --muted: #a4a9b2;
  --muted-2: #8d939d;
  --line: rgba(255, 255, 255, .11);
  --line-soft: rgba(255, 255, 255, .07);
  --shadow: 0 24px 70px rgba(0, 0, 0, .5);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .42);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, .3);
  --blue: #7182ff;
  --blue-dark: #5c6cf5;
  --blue-soft: rgba(113, 130, 255, .16);
  --blue-ink: #b9c2ff;
  --purple: #a97bff;
  --purple-soft: rgba(169, 123, 255, .16);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, .14);
  --success: #3fd08a;
  --contrast: #f1f0ec;
  --contrast-ink: #14161a;
  --backdrop: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  overflow: hidden; user-select: none;
}
input, textarea, select, button { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.selectable, .selectable * , input, textarea, .entry-body, .snippet { user-select: text; }
.hidden { display: none !important; }
::selection { background: var(--blue-soft); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); background-clip: padding-box; border: 2px solid transparent; }

/* ---------- Titelleiste ---------- */
.titlebar {
  position: fixed; inset: 0 0 auto 0; height: var(--titlebar); z-index: 50;
  -webkit-app-region: drag; display: flex; align-items: center; padding-left: 18px; gap: 10px;
  pointer-events: none;
}
.titlebar * { -webkit-app-region: no-drag; pointer-events: auto; }

/* ---------- Buttons & Felder ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--surface-soft); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible, .seg button:focus-visible, .field:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(56, 72, 216, .22); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-dark { background: var(--contrast); border-color: var(--contrast); color: var(--contrast-ink); }
.btn-dark:hover { opacity: .9; background: var(--contrast); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; height: 46px; font-size: 14.5px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }

.field {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--radius-xs);
  border: 1px solid var(--line); background: var(--surface-soft); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea.field { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; line-height: 1.55; }
.field:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); background: var(--surface); outline: none; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.form-row { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); margin: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.hint svg, .notice svg { width: 13px; height: 13px; vertical-align: -2px; }
.file-card .thumb .ext svg { width: 24px; height: 24px; }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 0; }

.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-mute); border-radius: 999px; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.seg button svg { width: 15px; height: 15px; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-mute); color: var(--muted); }
.badge.blue { background: var(--blue-soft); color: var(--blue-ink); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; font-family: var(--display); }
.avatar { background-size: cover; background-position: center; }
.avatar.has-img { box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.avatar-edit .btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); cursor: pointer; padding: 0; position: relative; }
.swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }
.swatch-custom { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; border: 1px dashed var(--muted-2); position: relative; display: grid; place-items: center; color: var(--muted); }
.swatch-custom input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
.swatch-custom svg { width: 14px; height: 14px; pointer-events: none; }

/* ---------- Login ---------- */
.auth {
  position: fixed; inset: 0; display: grid; grid-template-columns: 1.05fr 1fr;
}
.auth-art {
  position: relative; overflow: hidden; padding: 64px 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(circle at 18% 20%, rgba(141, 87, 255, .35), transparent 42%), radial-gradient(circle at 85% 85%, rgba(56, 72, 216, .55), transparent 48%), #14172b;
  color: #fff;
}
.auth-art::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 75%); pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .02em; position: relative; z-index: 1; }
.auth-brand img { width: 34px; height: auto; }
.auth-claim { position: relative; z-index: 1; max-width: 520px; }
.auth-claim h1 { font-size: 46px; line-height: 1.08; font-weight: 700; letter-spacing: -.025em; margin-bottom: 18px; }
.auth-claim h1 span { background: linear-gradient(90deg, #9fa9ff, #c9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-claim p { color: rgba(255,255,255,.72); font-size: 16px; margin: 0; max-width: 440px; }
.auth-features { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.auth-features span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.85); }
.auth-features svg { width: 15px; height: 15px; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: var(--paper); overflow: auto; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 28px; }
.auth-card .field { height: 48px; background: var(--surface); }
.auth-footer { margin-top: 26px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; }
.server-pill { display: inline-flex; align-items: center; gap: 7px; }
.server-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(31,157,97,.15); }
.server-pill.off i { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.notice { padding: 12px 14px; border-radius: var(--radius-xs); background: var(--blue-soft); color: var(--blue-ink); font-size: 13px; margin-bottom: 18px; }
.notice.danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- App-Rahmen ---------- */
.shell { position: fixed; inset: 0; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; padding: calc(var(--titlebar) + 4px) 14px 14px;
  -webkit-app-region: drag;
}
.sidebar > * { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 22px; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.brand img { width: 26px; height: auto; }
.brand small { display: block; font-family: var(--font); font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: -2px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 14px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 12px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; text-align: left;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.active { background: var(--blue-soft); color: var(--blue-ink); }
.nav-item .count { margin-left: auto; font-size: 11.5px; color: var(--muted-2); }
.sidebar-spacer { flex: 1; }
.me-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-soft); border: 1px solid var(--line-soft); }
.me-card .who { min-width: 0; flex: 1; }
.me-card .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .who span { font-size: 12px; color: var(--muted); }

.main { position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: calc(var(--titlebar) + 40px); padding: var(--titlebar) 160px 0 32px; flex: none;
  display: flex; align-items: center; gap: 16px; -webkit-app-region: drag; margin-top: -6px;
}
.topbar > * { -webkit-app-region: no-drag; }
.topbar h1 { font-size: 24px; }
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.view { flex: 1; min-height: 0; padding: 14px 32px 28px; overflow: auto; }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty svg { width: 40px; height: 40px; color: var(--muted-2); opacity: .7; margin-bottom: 10px; }
.empty h3 { color: var(--ink); font-size: 17px; margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; max-width: 360px; }

/* ---------- Kalender ---------- */
.cal-layout { display: grid; grid-template-columns: 1fr 310px; gap: 20px; height: 100%; min-height: 560px; }
.cal-card { display: flex; flex-direction: column; overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.cal-head h2 { font-size: 20px; min-width: 190px; }
.cal-head .spacer { flex: 1; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line-soft); }
.cal-weekdays div { padding: 10px 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.cal-grid { flex: 1; display: grid; grid-template-rows: repeat(6, 1fr); min-height: 0; }
.cal-week { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line-soft); min-height: 92px; }
.cal-week:last-child { border-bottom: 0; }
.cal-day { border-right: 1px solid var(--line-soft); padding: 6px 8px; cursor: pointer; transition: background .12s; position: relative; }
.cal-day:nth-child(7) { border-right: 0; }
.cal-day:hover { background: var(--surface-soft); }
.cal-day.other { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--line-soft) 8px 9px); }
.cal-day.other .num { color: var(--muted-2); opacity: .6; }
.cal-day.weekend { background-color: color-mix(in srgb, var(--surface-soft) 60%, transparent); }
.cal-day.selecting { background: var(--blue-soft) !important; }
.cal-day .num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.cal-day.today .num { background: var(--blue); color: #fff; }
.cal-day .more { position: absolute; left: 8px; bottom: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cal-day .more:hover { color: var(--blue); }
.cal-bars { position: absolute; inset: 34px 0 22px 0; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 24px; row-gap: 3px; pointer-events: none; overflow: hidden; }
.cal-bar {
  pointer-events: auto; margin: 0 4px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 72%, var(--ink));
  border-left: 3px solid var(--c); transition: filter .12s, transform .08s;
}
:root[data-theme="dark"] .cal-bar { background: color-mix(in srgb, var(--c) 26%, var(--surface)); color: color-mix(in srgb, var(--c) 30%, #fff); }
.cal-bar:hover { filter: brightness(.96) saturate(1.1); }
.cal-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; border-left-width: 0; }
.cal-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.cal-bar span { overflow: hidden; text-overflow: ellipsis; }
.cal-bar .avatar { width: 16px; height: 16px; font-size: 8px; }

.cal-side { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.cal-side .card { padding: 18px; }
.cal-side h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.agenda { overflow: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.agenda-list { overflow: auto; margin: 0 -8px; }
.agenda-item { display: flex; gap: 12px; padding: 10px 8px; border-radius: 12px; cursor: pointer; }
.agenda-item:hover { background: var(--surface-soft); }
.agenda-item .stripe { width: 4px; border-radius: 4px; background: var(--c); flex: none; }
.agenda-item b { display: block; font-size: 13.5px; }
.agenda-item small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.agenda-item small svg { width: 13px; height: 13px; flex: none; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stats div { padding: 12px; border-radius: 14px; background: var(--surface-soft); }
.mini-stats b { display: block; font-family: var(--display); font-size: 22px; }
.mini-stats span { font-size: 12px; color: var(--muted); }

/* ---------- Wissensbank ---------- */
.kb-layout { display: grid; grid-template-columns: 290px 1fr; gap: 20px; height: 100%; min-height: 0; }
.kb-tree { display: flex; flex-direction: column; overflow: hidden; }
.kb-tree-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px 18px; }
.kb-tree-head h3 { font-size: 15px; }
.tree { overflow: auto; padding: 0 8px 14px; flex: 1; }
.tree-row {
  display: flex; align-items: center; gap: 4px; height: 34px; padding-right: 6px; border-radius: 10px; cursor: pointer;
  color: var(--muted); font-weight: 500; font-size: 13.5px; position: relative;
}
.tree-row:hover { background: var(--hover); color: var(--ink); }
.tree-row.active { background: var(--blue-soft); color: var(--blue-ink); font-weight: 600; }
.tree-row.drop-inside { box-shadow: inset 0 0 0 2px var(--blue); background: var(--blue-soft); }
.tree-row.drop-before::before, .tree-row.drop-after::after {
  content: ''; position: absolute; left: 8px; right: 6px; height: 3px; border-radius: 3px; background: var(--blue); pointer-events: none;
}
.tree-row.drop-before::before { top: -2px; }
.tree-row.drop-after::after { bottom: -2px; }
.tree-row.dragging { opacity: .4; }
.tree-root-drop {
  display: none; align-items: center; gap: 8px; margin: 8px 4px 0; padding: 12px; border-radius: 10px;
  border: 2px dashed var(--line); color: var(--muted); font-size: 12.5px; font-weight: 600;
}
.tree-root-drop svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.tree.is-dragging .tree-root-drop { display: flex; }
.tree-root-drop.over { border-color: var(--blue); color: var(--blue-ink); background: var(--blue-soft); }

/* Emoji-Auswahl für Threads */
.icon-pick {
  width: 100%; height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface-soft); color: var(--muted);
}
.icon-pick:hover, .icon-pick[aria-expanded="true"] { border-color: var(--blue); }
.icon-pick svg { width: 18px; height: 18px; }
.icon-pick .caret { width: 12px; height: 12px; transform: rotate(90deg); opacity: .6; }
.icon-pick .emoji { font-size: 20px; line-height: 1; }
.emoji-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; padding: 10px;
  margin: -4px 0 14px; max-height: 220px; overflow: auto; background: var(--surface-soft);
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.emoji-grid button { height: 38px; border: 0; background: none; border-radius: 9px; font-size: 20px; line-height: 1; display: grid; place-items: center; color: var(--muted); }
.emoji-grid button:hover { background: var(--hover); }
.emoji-grid button.active { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }
.emoji-grid button svg { width: 18px; height: 18px; }
.tree-row .tw { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; flex: none; color: var(--muted-2); border: 0; background: none; padding: 0; }
.tree-row .tw svg { width: 14px; height: 14px; transition: transform .15s; }
.tree-row .tw.open svg { transform: rotate(90deg); }
.tree-row .tw:hover { background: var(--hover); }
.tree-row .ico { width: 20px; text-align: center; flex: none; font-size: 14px; }
.tree-row .ico svg { width: 16px; height: 16px; vertical-align: -3px; }
.tree-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row .n { font-size: 11px; color: var(--muted-2); }

.kb-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.search {
  position: relative; display: flex; align-items: center; height: 50px; padding: 0 16px 0 46px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 999px; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s;
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.search > svg { position: absolute; left: 17px; width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; font-size: 14.5px; }
.search kbd { font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.kb-content { flex: 1; min-height: 0; overflow: auto; padding: 2px 2px 20px; }

.thread-head { padding: 24px 26px; margin-bottom: 18px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.crumbs a:hover { background: var(--hover); color: var(--ink); }
.crumbs svg { width: 12px; height: 12px; opacity: .6; }
.thread-title { display: flex; align-items: flex-start; gap: 14px; }
.thread-title .big-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--blue-soft); color: var(--blue-ink); display: grid; place-items: center; font-size: 24px; flex: none; }
.thread-title .big-ico svg { width: 24px; height: 24px; }
.thread-title h2 { font-size: 26px; line-height: 1.2; }
.thread-title p { margin: 6px 0 0; color: var(--muted); white-space: pre-wrap; }
.thread-meta { display: flex; gap: 14px; align-items: center; margin-top: 16px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.thread-meta span { display: inline-flex; align-items: center; gap: 6px; }
.thread-meta svg { width: 14px; height: 14px; }
/* Inter hat oben mehr Luft als unten: kleine Icons neben Text optisch mittig setzen */
.thread-meta span > svg, .agenda-item small > svg, .hint > svg, .crumbs > svg { position: relative; top: -1.5px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 4px 12px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.section-title .badge { text-transform: none; letter-spacing: 0; }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sub-card { padding: 16px; cursor: pointer; transition: transform .12s, box-shadow .15s, border-color .15s; display: flex; gap: 12px; align-items: flex-start; }
.sub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line); }
.sub-card .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-mute); display: grid; place-items: center; font-size: 18px; flex: none; color: var(--muted); }
.sub-card .ico svg { width: 18px; height: 18px; }
.sub-card b { display: block; font-size: 14px; }
.sub-card small { color: var(--muted); font-size: 12px; }

.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.entry { padding: 18px 18px 16px; position: relative; transition: box-shadow .15s; }
.entry.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--blue); } 100% { box-shadow: var(--shadow-sm); } }
.entry-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.entry-head .type-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.entry-head .type-ico svg { width: 16px; height: 16px; }
.type-note .type-ico { background: var(--surface-mute); color: var(--muted); }
.type-credential .type-ico { background: #fff3e0; color: #c26a00; }
:root[data-theme="dark"] .type-credential .type-ico { background: rgba(255,170,60,.14); color: #ffb85c; }
.type-color .type-ico { background: var(--purple-soft); color: var(--purple); }
.type-message .type-ico { background: var(--blue-soft); color: var(--blue-ink); }
.entry-head h4 { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.entry:hover .entry-actions, .file-card:hover .entry-actions { opacity: 1; }
.entry-body { white-space: pre-wrap; word-wrap: break-word; color: var(--ink); font-size: 13.5px; line-height: 1.6; }
.entry-body a { text-decoration: underline; text-underline-offset: 2px; }
.entry-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.kv { display: grid; grid-template-columns: 92px 1fr auto; gap: 4px 8px; align-items: center; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.kv:last-of-type { border-bottom: 0; }
.kv label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kv .v { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; }
.kv .v.masked { letter-spacing: .12em; }
.kv .tools { display: flex; gap: 2px; }
.color-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.color-chip { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-soft); cursor: pointer; transition: transform .1s; background: var(--surface-soft); }
.color-chip:hover { transform: translateY(-2px); }
.color-chip .sw { height: 58px; }
.color-chip .meta { padding: 8px 10px; }
.color-chip b { display: block; font-size: 12.5px; }
.color-chip code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.message { display: flex; gap: 12px; }
.message .bubble { flex: 1; background: var(--surface-soft); border-radius: 4px 16px 16px 16px; padding: 10px 14px; }
.message .bubble .who { font-size: 12.5px; font-weight: 700; margin-bottom: 2px; display: flex; gap: 8px; align-items: baseline; }
.message .bubble .who small { font-weight: 500; color: var(--muted); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.file-card { overflow: hidden; position: relative; cursor: pointer; transition: transform .12s, box-shadow .15s; }
.file-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.file-card .thumb { height: 120px; display: grid; place-items: center; background: repeating-conic-gradient(var(--surface-mute) 0 25%, var(--surface-soft) 0 50%) 50% / 18px 18px; border-bottom: 1px solid var(--line-soft); }
.file-card .thumb img { max-width: 86%; max-height: 96px; object-fit: contain; }
.file-card .thumb .ext { width: 52px; height: 62px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm); display: grid; place-items: center; font: 700 12px var(--display); color: var(--blue-ink); text-transform: uppercase; border: 1px solid var(--line-soft); }
.file-card .meta { padding: 10px 12px; }
.file-card b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card small { color: var(--muted); font-size: 11.5px; }
.file-card .entry-actions { position: absolute; top: 8px; right: 8px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 2px; }
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius-md); padding: 22px; text-align: center; color: var(--muted);
  transition: border-color .15s, background .15s; cursor: pointer; font-size: 13.5px;
}
.dropzone:hover { border-color: var(--blue); color: var(--blue-ink); }
.dropzone svg { width: 22px; height: 22px; vertical-align: -6px; margin-right: 6px; }
.drop-overlay { position: absolute; inset: 0; z-index: 30; background: color-mix(in srgb, var(--blue) 10%, transparent); border: 3px dashed var(--blue); border-radius: var(--radius-md); display: grid; place-items: center; pointer-events: none; backdrop-filter: blur(2px); }
.drop-overlay div { background: var(--surface); padding: 18px 26px; border-radius: 999px; font-weight: 700; color: var(--blue-ink); box-shadow: var(--shadow-md); display: flex; gap: 10px; align-items: center; }
.drop-overlay svg { width: 20px; height: 20px; }
.upload-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.upload-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.upload-item .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-mute); overflow: hidden; }
.upload-item .bar i { display: block; height: 100%; background: var(--blue); width: 0; transition: width .15s; }

/* Suchergebnisse */
.results-head { display: flex; align-items: baseline; gap: 10px; margin: 4px 4px 14px; color: var(--muted); }
.results-head b { color: var(--ink); font-family: var(--display); font-size: 18px; }
.tier-title { display: flex; align-items: center; gap: 10px; margin: 20px 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.tier-title::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.tier-title:first-of-type { margin-top: 6px; }
.result { display: flex; gap: 14px; padding: 14px 16px; margin-bottom: 8px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.result:hover { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.result .r-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-mute); color: var(--muted); flex: none; }
.result .r-ico svg { width: 18px; height: 18px; }
.result.tier-1 .r-ico, .result.tier-2 .r-ico { background: var(--blue-soft); color: var(--blue-ink); }
.result b { display: block; font-size: 14px; }
.result .r-path { font-size: 12px; color: var(--muted); }
.result .snippet { font-size: 13px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: color-mix(in srgb, var(--blue) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.loader { display: flex; justify-content: center; padding: 18px; color: var(--muted); font-size: 13px; gap: 10px; align-items: center; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Benutzer & Einstellungen ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.inactive td { opacity: .55; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell b { display: block; }
.user-cell small { color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; max-width: 1180px; align-items: start; }
.settings-grid .card { padding: 24px; }
.settings-grid h3 { font-size: 17px; margin-bottom: 4px; }
.settings-grid .desc { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.radio-cards { display: grid; gap: 10px; margin-bottom: 14px; }
.radio-card { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--blue); }
.radio-card b { display: block; font-size: 13.5px; }
.radio-card span { color: var(--muted); font-size: 12.5px; }
.cmd-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--surface-mute); }
.cmd-box code { flex: 1; font: 12.5px var(--mono); word-break: break-all; user-select: text; }
.via-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, #d97757 16%, transparent); color: #d97757; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-mute); padding: 2px 7px; border-radius: 6px; user-select: text; }

/* ---------- Ränge ---------- */
.rank-ico { width: 20px; height: 20px; border-radius: 6px; background: #1d2027; display: inline-grid; place-items: center; flex: none; }
.rank-ico i {
  display: block; width: 12px; height: 14px;
  -webkit-mask: url('../assets/img/plaxia-logo-blue.png') center / contain no-repeat;
  mask: url('../assets/img/plaxia-logo-blue.png') center / contain no-repeat;
}
.rank-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.me-card .who .rank-badge { font-size: 12px; font-weight: 500; color: var(--muted); gap: 5px; }
.me-card .who .rank-ico { width: 16px; height: 16px; border-radius: 5px; }
.me-card .who .rank-ico i { width: 9px; height: 11px; }
.rank-select { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.rank-option { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-soft); font-weight: 600; font-size: 13px; text-align: left; }
.rank-option:hover { border-color: var(--muted-2); }
.rank-option.active { border-color: var(--rc, var(--blue)); box-shadow: inset 0 0 0 1px var(--rc, var(--blue)); background: color-mix(in srgb, var(--rc, var(--blue)) 10%, var(--surface)); }

/* ---------- Plugins & Releases ---------- */
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; max-width: 1400px; }
.plugin-card { padding: 20px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: transform .12s, box-shadow .15s, border-color .15s; }
.plugin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line); }
.plugin-card-head { display: flex; gap: 14px; align-items: center; }
.plugin-card-head b { display: block; font-family: var(--display); font-size: 17px; font-weight: 600; }
.plugin-card-head small { color: var(--muted); font-size: 12px; }
.plugin-desc { margin: 0; color: var(--ink); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.plugin-desc.muted, .muted { color: var(--muted-2); }
.plugin-match { font-size: 12.5px; color: var(--muted); padding: 8px 10px; border-radius: 10px; background: var(--surface-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plugin-match svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.plugin-match b { color: var(--ink); font-family: var(--mono); font-weight: 600; font-size: 12px; }
.plugin-card-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.plugin-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--purple-soft); color: var(--purple); font-size: 22px; }
.plugin-ico svg { width: 22px; height: 22px; }
.plugin-ico.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 30px; }
.plugin-ico.lg svg { width: 28px; height: 28px; }
.plugin-ico .emoji { line-height: 1; }
.ver-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--contrast); color: var(--contrast-ink); font: 600 12px var(--mono); }
.ver-pill.lg { height: 32px; padding: 0 14px; font-size: 14px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-size: 12px; font-weight: 700; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 8%, transparent); } }
.plugin-head { display: flex; gap: 18px; align-items: flex-start; padding: 24px 26px; max-width: 1180px; }
.plugin-head h2 { font-size: 26px; }
.plugin-head p { margin: 6px 0 0; color: var(--muted); white-space: pre-wrap; }
.plugin-head .thread-meta { margin-top: 14px; }
.release-list { display: flex; flex-direction: column; gap: 14px; max-width: 1180px; padding-bottom: 20px; }
.release { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 22px 24px; transition: box-shadow .15s, border-color .15s; }
.release.is-live { border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.release.drop-over { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.release-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.release-main { min-width: 0; }
.release-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.release-head h3 { font-size: 17px; }
.release-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.release-meta svg { width: 13px; height: 13px; position: relative; top: -1px; }
.release-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); margin: 0 3px; }
.changelog { font-size: 13.5px; line-height: 1.6; }
.changelog p { margin: 0 0 8px; }
.changelog ul { margin: 0 0 12px; padding-left: 20px; }
.changelog li { margin: 2px 0; }
.changelog li::marker { color: var(--muted-2); }
.changelog li > ul { margin: 2px 0 4px; }
.changelog code { font: 12.5px var(--mono); background: var(--surface-mute); padding: 1px 6px; border-radius: 5px; }
.changelog .cl-head:not(:first-child) { margin-top: 6px; }
.cl-head { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 2px 0 6px; background: var(--surface-mute); color: var(--muted); }
.cl-new { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.cl-improved { background: var(--blue-soft); color: var(--blue-ink); }
.cl-fixed { background: #fff3e0; color: #c26a00; }
:root[data-theme="dark"] .cl-fixed { background: rgba(255,170,60,.14); color: #ffb85c; }
.cl-removed { background: var(--danger-soft); color: var(--danger); }
.release-files { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.release-file { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--surface-soft); }
.release-file b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-file small { color: var(--muted); font-size: 11.5px; }
.rf-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--purple); flex: none; }
.rf-ico svg { width: 17px; height: 17px; }
.release-drop { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 12px; border: 2px dashed var(--line); background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.release-drop:hover { border-color: var(--blue); color: var(--blue-ink); }
.release-drop svg { width: 16px; height: 16px; }
.ver-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface-soft); }
.ver-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.ver-input span { padding-left: 12px; font: 600 14px var(--mono); color: var(--muted); }
.ver-input .field { border: 0; background: transparent; box-shadow: none !important; padding-left: 2px; }
.picked-files { display: flex; gap: 6px; flex-wrap: wrap; }
.picked-files .badge { gap: 4px; padding-right: 3px; }
.picked-files .x { border: 0; background: none; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); padding: 0; }
.picked-files .x:hover { background: var(--hover); }
.picked-files .x svg { width: 11px; height: 11px; }

/* ---------- Strafen (csBanSystem) ---------- */
.ban-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 0.9fr); gap: 20px; height: 100%; min-height: 0; }
.ban-list-col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ban-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ban-filters .seg button { height: 34px; padding: 0 12px; font-size: 12.5px; }
.ban-list { flex: 1; min-height: 0; overflow: auto; padding: 6px; }
.ban-row { display: flex; gap: 12px; padding: 12px; border-radius: 14px; cursor: pointer; align-items: flex-start; }
.ban-row:hover { background: var(--surface-soft); }
.ban-row.active { background: var(--blue-soft); }
.ban-row-main { min-width: 0; flex: 1; }
.ban-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ban-row-top b { font-size: 14px; }
.ban-row-reason { font-size: 13px; margin: 3px 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ban-row-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.ban-count { display: inline-flex; align-items: center; gap: 4px; }
.ban-count svg { width: 13px; height: 13px; }
.ban-staff { display: inline-flex; align-items: center; gap: 6px; }
.mc-head { border-radius: 8px; image-rendering: pixelated; flex: none; background: var(--surface-mute); }
.mc-head.fallback { display: inline-grid; place-items: center; font: 700 14px var(--display); color: var(--muted); }
.ban-type { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.t-ban { background: var(--danger-soft); color: var(--danger); }
.t-mute { background: #fff3e0; color: #c26a00; }
.t-kick { background: var(--blue-soft); color: var(--blue-ink); }
.t-warn { background: #fff8d6; color: #9a7b00; }
:root[data-theme="dark"] .t-mute { background: rgba(255,170,60,.14); color: #ffb85c; }
:root[data-theme="dark"] .t-warn { background: rgba(245,200,40,.14); color: #f2cd4a; }
.ban-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ban-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.ban-state.s-active { color: var(--danger); } .ban-state.s-active i { background: var(--danger); }
.ban-state.s-revoked { color: var(--success); } .ban-state.s-revoked i { background: var(--success); }
.ban-detail-col { min-height: 0; display: flex; flex-direction: column; }
.ban-detail-scroll { overflow: auto; min-height: 0; height: 100%; padding: 2px; }
.ban-detail { padding: 24px; transition: box-shadow .15s, border-color .15s; }
.ban-detail.drop-over { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.ban-detail-head { display: flex; gap: 16px; align-items: flex-start; }
.ban-detail-head h2 { font-size: 24px; }
.ban-uuid { display: flex; align-items: center; gap: 4px; }
.ban-uuid code { font: 12px var(--mono); color: var(--muted); }
.ban-reason { margin: 18px 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-soft); font-size: 15px; font-weight: 500; white-space: pre-wrap; }
.ban-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-bottom: 14px; }
.ban-fact label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.ban-fact div { font-size: 13.5px; }
.ban-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ban-files .thumb { height: 96px; }
.ban-files .thumb img { max-height: 80px; }
.ban-notes { display: flex; flex-direction: column; gap: 10px; }
.ban-history { display: flex; flex-direction: column; gap: 4px; }
.ban-hist-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 13px; }
.ban-hist-row:hover { background: var(--surface-soft); }
.ban-hist-row .r { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ban-hist-row small { color: var(--muted); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
@media (max-width: 1240px) { .ban-layout { grid-template-columns: 1fr; } .ban-detail-col { display: none; } .ban-layout:has(.ban-row.active) .ban-detail-col { display: flex; } }

/* ---------- Bewerbungen ---------- */
.nav-badge.blue { background: var(--blue); }
.app-status-seg { flex-wrap: wrap; border-radius: 16px; }
.app-status-seg button { height: 32px; padding: 0 11px; font-size: 12.5px; }
.app-status { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--surface-mute); color: var(--muted); }
.app-status.s-new { background: var(--blue-soft); color: var(--blue-ink); }
.app-status.s-review { background: #fff8d6; color: #9a7b00; }
.app-status.s-interview { background: var(--purple-soft); color: var(--purple); }
.app-status.s-accepted { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.app-status.s-rejected { background: var(--danger-soft); color: var(--danger); }
:root[data-theme="dark"] .app-status.s-review { background: rgba(245,200,40,.14); color: #f2cd4a; }
.app-status-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.app-status-pick .btn.is-on { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.app-status-pick .btn.is-on.s-new { color: var(--blue-ink); background: var(--blue-soft); }
.app-status-pick .btn.is-on.s-review { color: #9a7b00; background: #fff8d6; }
.app-status-pick .btn.is-on.s-interview { color: var(--purple); background: var(--purple-soft); }
.app-status-pick .btn.is-on.s-accepted { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.app-status-pick .btn.is-on.s-rejected { color: var(--danger); background: var(--danger-soft); }
.app-vote { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.app-vote-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-soft); font-weight: 600; font-size: 13.5px; }
.app-vote-btn svg { width: 16px; height: 16px; }
.app-vote-btn b { min-width: 22px; height: 22px; border-radius: 999px; background: var(--surface); display: inline-grid; place-items: center; font-size: 12px; }
.app-vote-btn.v-yes.on { border-color: var(--success); color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.app-vote-btn.v-no.on { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.app-vote-btn.v-maybe.on { border-color: #c79a00; color: #c79a00; background: rgba(245,200,40,.12); }
.app-voters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.app-voter { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border-radius: 999px; font-size: 12.5px; background: var(--surface-soft); border: 1px solid transparent; }
.app-voter.v-yes { border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.app-voter.v-no { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.app-voter.v-maybe { border-color: rgba(199,154,0,.45); }
.app-votes-mini { display: inline-flex; gap: 6px; font-family: var(--mono); }
.app-votes-mini .y { color: var(--success); } .app-votes-mini .n { color: var(--danger); }
.app-block { margin-bottom: 14px; }
.app-block label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.app-block .entry-body { padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); }

/* ---------- Übersicht (Dashboard) ---------- */
.dash { max-width: 1400px; display: flex; flex-direction: column; gap: 18px; padding-bottom: 20px; }
.dash-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 28px; border-radius: var(--radius-md); color: #fff;
  background: radial-gradient(circle at 12% 0%, rgba(141, 87, 255, .45), transparent 45%), radial-gradient(circle at 90% 120%, rgba(56, 72, 216, .9), transparent 55%), #1b1f3d; }
.dash-hero h2 { font-size: 28px; }
.dash-hero p { margin: 6px 0 0; color: rgba(255,255,255,.7); }
.dash-backup { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); font-size: 12.5px; font-weight: 600; }
.dash-backup svg { width: 15px; height: 15px; }
.dash-backup.warn { background: rgba(255, 107, 107, .2); border-color: rgba(255, 107, 107, .45); color: #fff; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.dash-stat { text-align: left; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .15s; }
.dash-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dash-stat b { display: block; font: 600 28px var(--display); }
.dash-stat span { color: var(--muted); font-size: 12.5px; }
.dash-stat.accent b { color: var(--blue); }
.dash-stat.warn b { color: var(--danger); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.dash-card { padding: 18px 18px 12px; }
.dash-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dash-card-head h3 { font-size: 15px; }
.dash-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); }
.dash-ico svg { width: 16px; height: 16px; }
.dash-list { display: flex; flex-direction: column; }
.dash-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border: 0; border-radius: 12px; background: none; text-align: left; min-width: 0; }
.dash-row:hover { background: var(--surface-soft); }
.dash-row-main { min-width: 0; flex: 1; }
.dash-row-main b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.dash-row-main small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-stripe { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.dash-plugin-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-mute); font-size: 15px; flex: none; color: var(--muted); }
.dash-plugin-ico svg { width: 15px; height: 15px; }
.dash-empty { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.backup-list { margin-top: 12px; }

/* ---------- Werkzeuge (GUI-/Prefix-Generator von plaxia.net) ---------- */
/* Die Styles der Website (css/tools.css) erwarten diese Variablen und Bausteine aus dem Admin-Panel. */
.tool-view {
  --accent: var(--blue); --accent-soft: var(--blue-soft); --surface-2: var(--surface-soft); --text: var(--ink); --font-title: var(--display); --blue-solid: var(--blue);
  max-width: 1440px; padding-bottom: 30px; user-select: text;
}
.tool-intro { margin: 0 0 18px; color: var(--muted); max-width: 760px; }
.tool-view .admin-field { display: grid; gap: 8px; }
.tool-view .admin-field > span { color: var(--muted-2); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.tool-view input:not([type=checkbox]):not([type=radio]):not([type=color]), .tool-view select, .tool-view textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--ink); outline: none; transition: .18s ease;
}
.tool-view input:not([type=checkbox]):not([type=radio]):not([type=color]), .tool-view select { height: 44px; padding: 0 14px; }
.tool-view textarea { padding: 12px 14px; resize: vertical; line-height: 1.55; }
.tool-view input:focus, .tool-view select:focus, .tool-view textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.tool-view .btn { height: auto; min-height: 42px; }
.tool-view .btn--dark { background: var(--contrast); border-color: var(--contrast); color: var(--contrast-ink); }
.tool-view .btn--dark:hover { opacity: .9; background: var(--contrast); }
.tool-view .btn--dark[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Update-Hinweis ---------- */
.update-banner {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-md); animation: pop .2s ease; max-width: 420px;
}
.update-banner .u-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-ink); display: grid; place-items: center; flex: none; }
.update-banner .u-ico svg { width: 18px; height: 18px; }
.update-banner b { display: block; font-size: 13.5px; }
.update-banner small { color: var(--muted); font-size: 12px; }
.update-banner .bar { height: 5px; border-radius: 5px; background: var(--surface-mute); overflow: hidden; margin-top: 6px; }
.update-banner .bar i { display: block; height: 100%; background: var(--blue); transition: width .3s; }

/* ---------- Modal, Menü, Toast ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--backdrop); display: grid; place-items: center; padding: 40px; animation: fade .15s ease; backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); animation: pop .18s cubic-bezier(.2,.9,.3,1.2); border: 1px solid var(--line-soft); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 22px 24px 8px; }
.modal-head h3 { font-size: 19px; flex: 1; }
.modal-body { padding: 12px 24px 6px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 24px 22px; align-items: center; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.menu { position: fixed; z-index: 120; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); padding: 6px; animation: fade .1s ease; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 12px; border: 0; background: none; border-radius: 9px; font-size: 13.5px; text-align: left; }
.menu button:hover { background: var(--hover); }
.menu button svg { width: 16px; height: 16px; color: var(--muted); }
.menu button.danger { color: var(--danger); }
.menu button.danger svg { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 5px 4px; }

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--contrast); color: var(--contrast-ink); padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-md); animation: pop .18s ease; display: flex; align-items: center; gap: 9px; }
.toast svg { width: 16px; height: 16px; }
.toast.error { background: var(--danger); color: #fff; }

.color-rows { display: flex; flex-direction: column; gap: 8px; }
.color-row { display: grid; grid-template-columns: 44px 1fr 120px 34px; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface-soft); cursor: pointer; }
.pw-wrap { position: relative; }
.pw-wrap .field { padding-right: 84px; }
.pw-wrap .tools { position: absolute; right: 4px; top: 4px; display: flex; gap: 2px; }

@media (max-width: 1240px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-side { display: none; }
}
