/* Lunaria Admin-Panel – schlichtes dunkles Theme (gleiche Farben wie die Website) */

:root {
  --bg: #131416;
  --bg-2: #0f1012;
  --surface: #1b1c1f;
  --surface-2: #222327;
  --surface-3: #2a2b30;
  --border: #2d2f34;
  --border-strong: #42454c;
  --text: #ecebe8;
  --text-2: #c2c2bd;
  --muted: #94958f;

  --accent: #82c35b;
  --accent-hover: #95d16f;
  --accent-ink: #0f1d0a;
  --accent-soft: rgba(130, 195, 91, .13);

  --purple: #a78bfa;
  --blue: #60a5fa;
  --pink: #f472b6;
  --success: #4ade80;
  --error: #f87171;
  --warn: #fbbf24;

  --purple-soft: rgba(167, 139, 250, .14);
  --blue-soft: rgba(96, 165, 250, .14);
  --pink-soft: rgba(244, 114, 182, .14);
  --success-soft: rgba(74, 222, 128, .13);
  --error-soft: rgba(248, 113, 113, .14);
  --warn-soft: rgba(251, 191, 36, .14);

  --grad: var(--accent);
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(130, 195, 91, .35); }
.icon { flex: none; display: inline-block; vertical-align: middle; }

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

/* ---------------------------------------------------------------- Utility */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.big { font-size: 17px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-danger { color: var(--error); }
.text-warn { color: var(--warn); }
.spacer { flex: 1 1 auto; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap, .toolbar.wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.mt { margin-top: 20px; }
.mb { margin-bottom: 14px; }
.placeholder { color: var(--muted); font-style: italic; }
.link { font-size: 13px; color: var(--accent); font-weight: 500; }
.link-btn {
  background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
.link-btn:hover, .link-btn.active { color: var(--accent); text-decoration: underline; }
.badge-btn { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------------------------------------------------------------- Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink);
}
.brand-logo.big { width: 52px; height: 52px; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: .3px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 6px;
  color: var(--text-2); font-weight: 500; position: relative; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--surface-2); color: var(--text); }
.nav-link.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
}
.nav-link.active .icon { color: var(--accent); }
.nav-link.subtle { font-size: 13px; color: var(--muted); }
.nav-label { flex: 1; }
.nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pink); color: #1a0b14;
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center;
}
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 600; font-size: 15px; color: var(--text-2); }
.menu-btn { display: none !important; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.user-chip .head { border-radius: 50%; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-name { font-weight: 600; font-size: 13px; }
.user-meta .rank-badge { font-size: 10.5px; padding: 0 6px; margin-top: 2px; align-self: flex-start; }
/* Seitenwechsel ohne Neuladen: neue Seite wird verdeckt im selben Gitterfeld gerendert und erst dann getauscht */
.view { padding: 28px; max-width: 1400px; width: 100%; margin: 0 auto; outline: none; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.view > * { grid-area: 1 / 1; min-width: 0; }
.page-staged { visibility: hidden; pointer-events: none; }
.page-leaving { opacity: 1; transition: opacity .15s ease .15s; }
.topbar.is-loading ~ .view .page-leaving { opacity: .55; }
.route-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); opacity: 0; pointer-events: none; }
.topbar.is-loading .route-progress { opacity: 1; width: 70%; transition: width 2s cubic-bezier(.1, .7, .2, 1) .1s, opacity 0s .1s; }
.backdrop { display: none; }

.page-header { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-header > div:first-child { flex: 1; min-width: 220px; }
.page-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.2px; }
.page-sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 14px; font-size: 13px;
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* ----------------------------------------------------------------- Grids */
.grid { display: grid; gap: 20px; }
.grid.gap-sm { gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); align-items: start; }
.grid-editor { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.sticky-card { position: sticky; top: calc(var(--topbar-h) + 16px); }

/* ----------------------------------------------------------------- Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 0;
}
.card-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.card-title .icon { color: var(--accent); }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 18px 20px; }
.card > .table-wrap, .card > .state, .card > .report-list, .card > .app-list { border-radius: inherit; }
.card > .card-header + .table-wrap { border-top: 0; }
.card.filters { padding: 16px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.filter-grid { display: grid; grid-template-columns: 2fr repeat(5, minmax(120px, 1fr)); gap: 12px; }

/* Stat-Karten */
.stat { display: flex; align-items: center; gap: 16px; padding: 18px 20px; color: var(--text); transition: border-color .15s, transform .15s; }
.stat-link:hover { border-color: var(--border-strong); text-decoration: none; background: var(--surface-2); }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); color: var(--text-2); flex: none; }
.stat-purple { background: var(--purple-soft); color: var(--purple); }
.stat-blue { background: var(--blue-soft); color: var(--blue); }
.stat-pink { background: var(--pink-soft); color: var(--pink); }
.stat-green { background: var(--success-soft); color: var(--success); }
.stat-danger { background: var(--error-soft); color: var(--error); }
.stat-main { min-width: 0; flex: 1; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.3px; line-height: 1.25; }
.stat-sub { color: var(--muted); font-size: 12.5px; }
.stat-meter .meter-wrap { margin-top: 8px; }
.skeleton { display: block; height: 26px; width: 90px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: 500 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; position: relative;
  transition: background .15s, border-color .15s, color .15s, opacity .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--error-soft); border-color: rgba(248, 113, 113, .45); color: var(--error); }
.btn-danger:hover:not(:disabled) { background: var(--error); color: #1b0909; }
.btn-success { background: var(--success-soft); border-color: rgba(74, 222, 128, .45); color: var(--success); }
.btn-success:hover:not(:disabled) { background: var(--success); color: #07170d; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn.danger-hover:hover:not(:disabled) { color: var(--error); background: var(--error-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; height: 42px; font-size: 14.5px; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--text-2); border-top-color: transparent; animation: spin .7s linear infinite;
}
.btn-primary.is-busy::after { border-color: #0d0b1f; border-top-color: transparent; }
.btn-row { display: inline-flex; gap: 2px; align-items: center; }

/* ---------------------------------------------------------------- Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.badge-muted { background: var(--surface-3); color: var(--text-2); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--error-soft); color: var(--error); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info, .badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-pink { background: var(--pink-soft); color: var(--pink); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.rank-badge {
  --rank: var(--purple);
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
  color: var(--rank);
  background: color-mix(in srgb, var(--rank) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--rank) 35%, transparent);
}
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; }
.status-dot.online { color: var(--success); }
.status-dot.online::before { background: var(--success); opacity: 1; box-shadow: 0 0 0 3px var(--success-soft); }

/* ----------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.field-hint { font-size: 12px; color: var(--muted); }
.field-error, .field-hint.field-error { font-size: 12.5px; color: var(--error); }
.input, .textarea, .select {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font: 14px/1.4 var(--font); padding: 0 12px; height: 38px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.textarea.mono { font: 13px/1.55 var(--mono); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: #626891; }
.input-lg { height: 44px; font-size: 16px; font-weight: 600; }
.input-narrow { width: auto; min-width: 90px; }
.select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="date"].input { color-scheme: dark; }
.search { position: relative; display: flex; align-items: center; min-width: 220px; flex: 0 1 340px; }
.search > .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 36px; }
.toolbar > .search:only-child, .page > .toolbar > .search { flex: 1 1 auto; max-width: 560px; }
.field .search { flex: 1 1 auto; min-width: 0; }

.segmented { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-2); font: 500 13px var(--font); cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 38px; height: 22px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .2s, background .2s; }
.switch-input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(16px); background: #fff; }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-label { font-size: 13px; color: var(--text-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-2);
  font: 500 12.5px var(--font); cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip.static { cursor: default; }
.chip-permanent.active { background: var(--error-soft); border-color: var(--error); }
.chip-x { display: grid; place-items: center; width: 18px; height: 18px; margin-right: -6px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.chip-x:hover { background: rgba(255, 255, 255, .12); }
.duration-picker { display: flex; flex-direction: column; gap: 8px; }
.custom-duration { flex-wrap: wrap; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 42px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); border-radius: 6px; cursor: pointer; }
.pw-toggle:hover, .pw-toggle.active { color: var(--text); background: var(--surface-2); }

/* ---------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: rgba(0, 0, 0, .12);
}
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.table .row-click { cursor: pointer; }
.table .row-click:hover td { background: var(--accent-soft); }
.table .row-selected td { background: var(--accent-soft); }
.table .row-muted td { color: var(--text-2); }
.table .row-active td:first-child { box-shadow: inset 3px 0 0 var(--error); }
.table td.wrap { white-space: normal; word-break: break-word; min-width: 180px; }
.table td.details { font-size: 12.5px; color: var(--text-2); max-width: 480px; }
.col-actions { text-align: right; width: 1%; white-space: nowrap; }
.cell-stack { display: flex; flex-direction: column; }
.player-cell { display: flex; align-items: center; gap: 10px; }
.player-name { font-weight: 600; }
.player-link { color: var(--text); font-weight: 600; }
.player-link:hover { color: var(--accent); }
.load-more { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--border); }

/* ----------------------------------------------------------------- Heads */
.head { border-radius: 6px; image-rendering: pixelated; background: var(--surface-3); flex: none; }
.head-fallback { background: var(--surface-3); }

/* ----------------------------------------------------------------- Lists */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; }
.list-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.bar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bar-head { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 13px; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--grad); min-width: 2px; transition: width .4s; }
.kv { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.kv-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.kv-item:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }

/* ---------------------------------------------------------------- Diagramme (js/charts.js) */
.chart { position: relative; width: 100%; min-width: 0; }
.chart-svg { display: block; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis { stroke: var(--border-strong); stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-label-strong { fill: var(--text-2); font-size: 12.5px; }
.chart-empty { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.chart-stroke { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dashed { stroke-dasharray: 5 4; stroke-width: 1.6; }
.chart-guide { stroke: var(--border-strong); stroke-width: 1; }
.chart-hover-dot { stroke: var(--bg); stroke-width: 2; }
.chart-track { fill: var(--surface-3); }
.chart-bar { transition: opacity .15s; opacity: .85; }
.chart-bar.hover { opacity: 1; }
.chart-tip {
  position: absolute; z-index: 2; pointer-events: none; min-width: 140px; max-width: 260px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 8px 10px; font-size: 12.5px;
}
.chart-tip-title { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.chart-tip-row { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.chart-tip-label { flex: 1; }
.chart-tip-row strong { color: var(--text); font-weight: 600; }
.chart-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.chart-dot.dashed { border-radius: 2px; height: 3px; width: 14px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-head .kv { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.chart-head .kv-item { padding: 0; border: 0; gap: 6px; }
.chart-subtitle { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 18px 0 10px; }
.card-body > div > .chart-subtitle:first-child, .grid > div > .chart-subtitle:first-child { margin-top: 0; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); min-width: 0; }
.mini-stat strong { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-s { margin-top: 10px; }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.top-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.top-place { width: 24px; color: var(--muted); font-variant-numeric: tabular-nums; }
.top-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-item img { border-radius: 5px; }

/* ---------------------------------------------------------------- Meter */
.meter-wrap { display: flex; flex-direction: column; gap: 6px; }
.meter-label { display: flex; justify-content: space-between; font-size: 12.5px; gap: 8px; }
.meter { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 5px; transition: width .5s; }
.meter-ok { background: var(--grad); }
.meter-warn { background: linear-gradient(90deg, var(--warn), #f59e0b); }
.meter-danger { background: linear-gradient(90deg, var(--error), var(--pink)); }

/* ---------------------------------------------------------------- States */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 44px 20px; text-align: center; color: var(--muted); }
.state.compact { padding: 18px; }
.state-loading { flex-direction: row; gap: 12px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 8px; background: var(--surface-2); color: var(--accent); margin-bottom: 4px; }
.empty-title { color: var(--text); font-weight: 600; font-size: 15px; }
.empty-text { max-width: 420px; }
.state .btn { margin-top: 10px; }
.error-state .empty-icon { color: var(--error); background: var(--error-soft); }
.error-state.forbidden .empty-icon { color: var(--warn); background: var(--warn-soft); }
.boot { min-height: 100vh; display: grid; place-items: center; }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13.5px; margin-bottom: 14px; }
.alert .icon { margin-top: 2px; }
.alert-danger { background: var(--error-soft); border-color: rgba(248, 113, 113, .4); color: #fecaca; }
.alert-warn { background: var(--warn-soft); border-color: rgba(251, 191, 36, .4); color: #fde68a; }
.alert-info { background: var(--blue-soft); border-color: rgba(96, 165, 250, .4); color: #bfdbfe; }

/* ---------------------------------------------------------------- Tabs */
.tabs { display: inline-flex; gap: 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; max-width: 100%; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; background: none;
  color: var(--muted); font: 500 13.5px var(--font); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab.active .icon { color: var(--accent); }
.tab-count { background: var(--surface-3); border-radius: 10px; padding: 0 7px; font-size: 11px; }

/* ---------------------------------------------------------------- Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 10px 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-error .toast-icon { color: var(--error); }
.toast-warn { border-left-color: var(--warn); }
.toast-warn .toast-icon { color: var(--warn); }
.toast-info .toast-icon { color: var(--blue); }
.toast-icon { margin-top: 1px; }
.toast-body { flex: 1; min-width: 0; }
.toast-msg { font-weight: 500; word-break: break-word; }
.toast-details { margin: 6px 0 0; max-height: 140px; overflow: auto; font: 11.5px/1.5 var(--mono); color: var(--text-2); background: var(--bg-2); padding: 6px 8px; border-radius: 6px; white-space: pre-wrap; }

/* ---------------------------------------------------------------- Modals */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .18s;
}
.modal-overlay.show { opacity: 1; }
.modal {
  width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  transform: translateY(10px) scale(.98); transition: transform .18s; outline: none;
}
.modal-overlay.show .modal { transform: none; }
.modal-sm { max-width: 440px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 1100px; }
.modal-header { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 22px; border-bottom: 1px solid var(--border); }
.modal-title { flex: 1; font-size: 16.5px; font-weight: 650; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.confirm { display: flex; gap: 14px; align-items: flex-start; }
.confirm-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--error-soft); color: var(--error); flex: none; }
.confirm-text { flex: 1; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); min-width: 0; }
.confirm-summary { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; color: var(--text); font-weight: 500; margin-top: 8px; }
.player-inline { display: flex; align-items: center; gap: 12px; }
.player-inline .head { border-radius: 8px; }
.output { background: var(--bg-2); padding: 10px; border-radius: 8px; font: 12px/1.5 var(--mono); white-space: pre-wrap; margin: 0; }

/* Strafen-Vorlagen */
.reason-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; padding: 2px; }
.reason-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 10px 12px;
  background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text); cursor: pointer; font: inherit;
}
.reason-option:hover { border-color: var(--accent); }
.reason-option.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.reason-name { font-weight: 600; }
.reason-meta { display: flex; align-items: center; gap: 8px; }
.punish-pane { min-height: 80px; }

/* Autocomplete */
.autocomplete { position: relative; }
.autocomplete .search { flex: 1 1 auto; max-width: none; }
.ac-list {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); padding: 4px;
}
.ac-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.ac-item:hover, .ac-item.active { background: var(--accent-soft); }
.ac-hint { padding: 10px; color: var(--muted); font-size: 13px; }
.ac-hint.error { color: var(--error); }
.ac-selected { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); }
.ac-selected strong { flex: 1; }

/* ---------------------------------------------------------------- Login */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; position: relative; overflow: hidden; }
.login-card {
  position: relative; width: 100%; max-width: 400px; padding: 34px 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.login-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.login-title { text-align: center; font-size: 26px; font-weight: 800; color: var(--text); }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 24px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .alert { margin: 0; }
.login-hint { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12.5px; text-align: center; }
.login-footer { position: relative; margin-top: 18px; font-size: 13px; }
.login-footer a { color: var(--muted); }

/* ---------------------------------------------------------------- Profil */
.profile { display: flex; align-items: center; gap: 20px; padding: 22px; flex-wrap: wrap;
  background: var(--surface); }
.profile-head .head { border-radius: 4px; }
.profile-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.profile-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-title h1 { font-size: 24px; }
.profile-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------------- Reports */
.report-list, .app-list { display: flex; flex-direction: column; }
.report-item, .app-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.report-item:last-child, .app-item:last-child { border-bottom: 0; }
.report-item.is-open { box-shadow: inset 3px 0 0 var(--pink); }
.report-item.is-urgent { box-shadow: inset 3px 0 0 var(--error); background: var(--error-soft); }
.report-reporters { margin-top: 4px; }
.report-reporters summary { cursor: pointer; color: var(--text-2); }
.report-reporters ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.report-main, .app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.report-title, .app-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-reason { color: var(--text); word-break: break-word; }
.report-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.app-item { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; color: var(--text); font: inherit; cursor: pointer; align-items: center; }
.app-item:hover { background: rgba(255, 255, 255, .02); }
.app-item.is-open { box-shadow: inset 3px 0 0 var(--blue); }
.app-item > .icon { color: var(--muted); }
.app-excerpt { color: var(--text-2); word-break: break-word; }
.app-text { white-space: pre-wrap; word-break: break-word; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; max-height: 320px; overflow-y: auto; margin-top: 6px; }

/* ----------------------------------------------------------------- Cloud */
.live { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 2s infinite; }
.live-dot.paused { background: var(--muted); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .5); } 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.log-view {
  height: min(60vh, 560px); overflow: auto; background: #070811; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font: 12px/1.55 var(--mono); color: #cfd3f0;
}
.log-line { white-space: pre-wrap; word-break: break-all; }
.log-line:hover { background: rgba(255, 255, 255, .03); }
.log-warn { color: var(--warn); }
.log-error { color: var(--error); }
.log-empty { color: var(--muted); padding: 20px; text-align: center; font-family: var(--font); }

/* ---------------------------------------------------------------- Wartung */
.maint-status { display: flex; align-items: center; gap: 18px; padding: 22px; }
.maint-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 8px; flex: none; }
.maint-status.is-active { border-color: rgba(251, 191, 36, .45); border-left: 3px solid var(--warn); background: var(--surface); }
.maint-status.is-active .maint-icon { background: var(--warn-soft); color: var(--warn); }
.maint-status.is-inactive .maint-icon { background: var(--success-soft); color: var(--success); }
.maint-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.maint-title { font-size: 18px; font-weight: 700; }
.countdown { color: var(--warn); font-weight: 500; }

/* ----------------------------------------------------------------- Ränge */
.swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--muted); flex: none; }
.team { display: flex; flex-direction: column; gap: 18px; }
.team-rank-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.team-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); min-width: 0; }
.member > a, .member > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-actions { display: flex; opacity: .55; transition: opacity .15s; }
.member:hover .member-actions, .member:focus-within .member-actions { opacity: 1; }

/* --------------------------------------------------------------- Inhalte */
.savebar {
  position: sticky; bottom: 16px; z-index: 20; margin-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow);
}
.savebar-status { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 13px; font-weight: 500; }
.savebar.dirty { border-color: rgba(251, 191, 36, .5); }
.savebar.dirty .savebar-status { color: var(--warn); }
.news-list { display: grid; gap: 12px; }
.news-card { padding: 16px 20px; }
.news-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.news-title { font-size: 16px; font-weight: 650; word-break: break-word; }
.news-excerpt { color: var(--text-2); margin-top: 8px; word-break: break-word; }
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 8px 4px 4px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.editor .textarea { border: 0; border-radius: 0; box-shadow: none !important; min-height: 280px; }
.news-preview { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.preview-body { white-space: pre-wrap; word-break: break-word; color: var(--text-2); margin-top: 8px; line-height: 1.65; }
.sections { display: flex; flex-direction: column; gap: 12px; }
.section-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); }
.section-head { display: flex; align-items: center; gap: 4px; }
.section-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12.5px; }
.rules-preview { display: flex; flex-direction: column; gap: 16px; padding: 4px; }
.rule-pv h3 { font-size: 15.5px; color: var(--accent); }
.rule-pv .preview-body { margin-top: 4px; }

.json-editor { display: flex; flex-direction: column; gap: 14px; }
.je-object { display: flex; flex-direction: column; gap: 14px; }
.je-object.nested { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, .12); }
.je-field { display: flex; flex-direction: column; gap: 6px; }
.je-key { font-size: 11px; color: var(--muted); background: transparent; padding: 0; }
.je-string { display: flex; flex-direction: column; gap: 6px; }
.mc-preview {
  font-family: var(--mono); font-size: 13px; padding: 8px 12px; border-radius: 8px; background: #1b1b1b; color: #aaaaaa;
  border: 1px solid #2c2c2c; white-space: pre-wrap; word-break: break-word; text-shadow: 1px 1px 0 rgba(0, 0, 0, .6);
}
.mc-obf { filter: blur(2px); }
.je-array { display: flex; flex-direction: column; gap: 8px; }
.je-items { display: flex; flex-direction: column; gap: 8px; }
.je-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; }
.je-item.simple { flex-direction: row; align-items: flex-start; padding: 6px 6px 6px 10px; }
.je-item-body { flex: 1; min-width: 0; }
.je-item-head { display: flex; align-items: center; }
.je-index { color: var(--muted); font: 600 12px var(--mono); min-width: 22px; padding-top: 10px; }
.je-item-head .je-index { padding-top: 0; }
.je-item-actions { display: flex; gap: 2px; }
.je-item.simple .je-item-actions { padding-top: 3px; }
.je-array-foot { display: flex; align-items: center; gap: 10px; }
.je-empty { padding: 6px 0; }
.raw-json { min-height: 320px; }

.word-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 420px; overflow-y: auto; padding: 2px; }
.word-chip { cursor: default; font-family: var(--mono); font-size: 12px; height: 28px; }
.chip-danger { background: var(--error-soft); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.chip-success { background: var(--success-soft); border-color: rgba(74, 222, 128, .35); color: #bbf7d0; }
.word-chip.removing { opacity: .4; }
.word-chips .state { width: 100%; padding: 24px; }

/* ---------------------------------------------------------------- Mobile */
@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-editor, .grid-sidebar { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex !important; }
  .topbar { padding: 0 12px; gap: 8px; }
  .view { padding: 18px 16px 28px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-h1 { font-size: 22px; }
  .user-meta { display: none; }
  .user-chip { padding: 2px; }
  .logout-btn span { display: none; }
  .logout-btn { width: 36px; padding: 0; }
  .toolbar { flex-wrap: wrap; }
  .search { flex: 1 1 100%; min-width: 0; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid > .field:first-child { grid-column: 1 / -1; }

  /* Tabellen als Karten */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 4px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  .table td[data-label=""]::before { content: none; }
  .table td:first-child { text-align: left; }
  .table td.wrap { min-width: 0; }
  .table .col-actions { width: 100%; justify-content: flex-end; }
  .table .row-active td:first-child { box-shadow: none; }
  .table .row-active { box-shadow: inset 3px 0 0 var(--error); }

  .report-item { flex-wrap: wrap; }
  .report-actions { width: 100%; justify-content: flex-start; padding-left: 54px; }
  .profile { padding: 18px; }
  .profile-actions { width: 100%; }
  .maint-status { flex-wrap: wrap; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: none !important; max-height: 92vh; border-radius: 10px 10px 0 0; }
  .modal-footer .btn { flex: 1 1 auto; }
  .toasts { right: 16px; left: 16px; width: auto; bottom: 16px; }
  .news-head { flex-direction: column; }
}

/* Netzwerk-Reset */
.reset-cat { border-left: 3px solid var(--cat, var(--purple)); }
.reset-cat-title { display: flex; align-items: center; gap: 8px; }
.reset-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cat, var(--purple)); flex: none; }
.reset-all { background: var(--error-soft); }
.reset-log { margin: 8px 0 0; padding-left: 18px; max-height: 260px; overflow: auto; }

/* TryJump-Module */
.table .mod-mismatch td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.mod-offset { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .table .mod-mismatch td:first-child { box-shadow: none; }
  .table .mod-mismatch { box-shadow: inset 3px 0 0 var(--warn); }
}

/* Bugreports */
.bug-status { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.app-item.bug-item.is-open { box-shadow: inset 3px 0 0 var(--c, var(--blue)); }
.bug-statusbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.btn.bug-status-btn { border-color: var(--border-strong); }
.btn.bug-status-btn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.btn.bug-status-btn.active { background: color-mix(in srgb, var(--c) 18%, transparent); border-color: var(--c); color: var(--text); font-weight: 600; cursor: default; }
.bug-h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.bug-h3 .icon { color: var(--accent); }
.bug-h3-lg { font-size: 15.5px; }
.bug-h3-sub { font-weight: 400; }
.bug-section { min-width: 0; }
.bug-mini { margin-bottom: 0; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.bug-mini .mini-stat strong { white-space: normal; font-size: 15.5px; }
.tps-good { color: var(--success); }
.tps-mid { color: var(--warn); }
.tps-bad { color: var(--error); }
.bug-fold summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.bug-fold[open] summary { margin-bottom: 8px; }
.bug-items { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.bug-items li { display: flex; gap: 8px; word-break: break-word; }
.bug-slot { color: var(--muted); min-width: 24px; text-align: right; flex: none; }
.bug-notes { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.bug-note { padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.bug-note-author { color: var(--text-2); }
.bug-note-text { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.log-view.bug-log { height: auto; max-height: min(50vh, 420px); }
.bug-lines { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; font-size: 13px; }
.bug-line { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.bug-line:last-child { border-bottom: 0; }
.bug-line-time { color: var(--muted); flex: none; }
.bug-line-text { flex: 1; min-width: 0; word-break: break-word; }
@media (max-width: 860px) {
  .bug-statusbar .btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .bug-detail .kv-item { flex-wrap: wrap; }
  .bug-detail .kv dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Shop · Rechtstexte */
.legal-grid { align-items: start; }
.legal-editor { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; min-height: 360px; resize: vertical; }
.legal-preview { max-height: 520px; overflow: auto; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.legal-preview > :first-child { margin-top: 0; }
.legal-preview h2 { font-size: 17px; margin: 1.2em 0 .4em; }
.legal-preview h3, .legal-preview h4, .legal-preview h5, .legal-preview h6 { font-size: 14.5px; margin: 1em 0 .35em; }
.legal-preview p, .legal-preview ul, .legal-preview ol { margin: 0 0 .8em; }
.legal-preview ul, .legal-preview ol { padding-left: 1.3em; }
@media (max-width: 900px) { .legal-grid { grid-template-columns: 1fr; } }
