/* ============================================================
   VortexMC Panel – eckiges "Control-Room"-Design
   Tokens oben, Komponenten darunter. Keine Rundungen, Akzente über
   Eck-Markierungen, Verläufe und Glow.
   ============================================================ */
:root {
  --bg: #07090e; --bg-2: #0b0e15; --panel: #0f131b; --panel-2: #151a24; --panel-3: #1b2130;
  --border: #1f2635; --border-strong: #2d3649; --line: rgba(255,255,255,.06);
  --text: #eaedf5; --text-dim: #c3c9d8; --muted: #7f889d;
  --accent: #7c8cff; --accent-2: #38bdf8; --accent-strong: #5b6dff;
  --accent-bg: rgba(124,140,255,.12); --accent-line: rgba(124,140,255,.45);
  --grad: linear-gradient(135deg, #6a7bff 0%, #38bdf8 100%);
  --good: #34d399; --warn: #fbbf24; --bad: #f87171;
  --good-bg: rgba(52,211,153,.12); --warn-bg: rgba(251,191,36,.12); --bad-bg: rgba(248,113,113,.12);
  --radius: 0;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); font: 14px/1.55 var(--font); font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 420px at 85% -120px, rgba(91,109,255,.14), transparent 70%),
    radial-gradient(700px 380px at -10% 110%, rgba(56,189,248,.07), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 100%,
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #a9b4ff; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 26px; letter-spacing: -.025em; } h2 { font-size: 15px; } h3 { font-size: 13.5px; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--panel-3); padding: 1px 6px; border: 1px solid var(--border); color: var(--text-dim); }
::selection { background: rgba(124,140,255,.35); }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border: 2px solid var(--bg-2); } ::-webkit-scrollbar-thumb:hover { background: #3c475f; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.sidebar {
  background: linear-gradient(180deg, rgba(15,19,27,.96), rgba(9,11,17,.98)); border-right: 1px solid var(--border);
  padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.brand .logo { flex: none; filter: drop-shadow(0 0 14px rgba(91,109,255,.55)); }
.brand b { display: block; font-size: 16px; letter-spacing: .02em; line-height: 1.1; }
.brand span { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; margin-top: 3px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: var(--muted); font-weight: 500;
  border-left: 2px solid transparent; transition: background .12s, color .12s, border-color .12s;
}
.nav a svg { flex: none; opacity: .85; }
.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(124,140,255,.16), rgba(124,140,255,0) 90%); color: #fff; border-left-color: var(--accent); }
.nav a.active svg { color: var(--accent); opacity: 1; }
.nav .sep { margin: 18px 12px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: #556078; display: flex; align-items: center; gap: 10px; }
.nav .sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sidebar .me { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.sidebar .me .who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; background: var(--grad); display: grid; place-items: center; font-weight: 700; color: #07090e; font-size: 14px; text-transform: uppercase; flex: none; }
.main { padding: 30px 36px 64px; min-width: 0; max-width: 1480px; width: 100%; animation: page .22s ease-out; }
@keyframes page { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 2px; background: var(--grad); }
.page-head .sub { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.topbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 40; transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
  .main { padding: 20px 16px 48px; }
  h1 { font-size: 22px; }
}

/* ---------- Karten ---------- */
.card {
  position: relative; background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 60%), var(--panel);
  border: 1px solid var(--border); padding: 18px; box-shadow: var(--shadow); transition: border-color .15s;
}
/* HUD-Eckmarkierungen */
.card::before, .card::after { content: ""; position: absolute; width: 11px; height: 11px; pointer-events: none; transition: border-color .15s, width .15s, height .15s; }
.card::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.card::after { right: -1px; bottom: -1px; border-right: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); opacity: .7; }
.card:hover { border-color: var(--border-strong); }
.card:hover::before, .card:hover::after { width: 18px; height: 18px; }
.card > h2, .card > .card-head { margin-bottom: 14px; }
.card h2, .section h2 { text-transform: uppercase; letter-spacing: .09em; font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.card h2::before, .section h2::before { content: ""; width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.stat { overflow: hidden; }
.stat .label { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; font-weight: 600; }
.stat .value { font-size: 34px; font-weight: 700; letter-spacing: -.035em; margin-top: 8px; line-height: 1.05; background: linear-gradient(180deg, #fff 30%, #aab4d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
.stat::selection { background: var(--accent); }

.bar { height: 8px; background: #0a0d14; border: 1px solid var(--border); margin-top: 10px; position: relative; overflow: hidden; }
.bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(7,9,14,.65) 9px 10px); pointer-events: none; }
.bar > i { display: block; height: 100%; background: var(--grad); box-shadow: 0 0 12px rgba(91,109,255,.6); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar.warn > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); box-shadow: 0 0 12px rgba(251,191,36,.5); }
.bar.bad > i { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 12px rgba(248,113,113,.55); }

/* ---------- Buttons & Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; border: 1px solid var(--border-strong);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: border-color .12s, background .12s, box-shadow .12s, transform .06s;
}
.btn:hover:not(:disabled) { border-color: var(--accent-line); background: var(--panel-3); text-decoration: none; color: #fff; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: #07090e; font-weight: 700; box-shadow: 0 6px 22px -8px rgba(91,109,255,.8); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); color: #07090e; border-color: transparent; box-shadow: 0 8px 28px -6px rgba(91,109,255,.95); }
.btn.danger { color: var(--bad); border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.05); }
.btn.danger:hover:not(:disabled) { background: var(--bad-bg); border-color: var(--bad); color: #ffb4b4; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: var(--panel-2); border-color: var(--border); }
.btn.ghost.danger:hover:not(:disabled) { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn svg { width: 15px; height: 15px; }
input, select, textarea {
  font: inherit; color: var(--text); background: #090c12; border: 1px solid var(--border-strong); padding: 8px 11px; width: 100%; min-width: 0;
  transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover, textarea:hover { border-color: #3a4560; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px -4px rgba(124,140,255,.55); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent-strong); padding: 0; }
input[readonly], input:disabled, select:disabled { color: var(--muted); background: var(--panel-2); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: #4e586e; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
textarea { font-family: var(--mono); font-size: 12.5px; resize: vertical; line-height: 1.55; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
label.field input, label.field select, label.field textarea { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
label.field .small { text-transform: none; letter-spacing: 0; font-weight: 400; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--text); cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.search { max-width: 340px; }
input[type=search] { background-image: radial-gradient(circle at 8px 8px, transparent 4px, var(--muted) 4.5px, var(--muted) 5.5px, transparent 6px); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; background: rgba(255,255,255,.015); }
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background .1s; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr:hover td { background: rgba(124,140,255,.05); }
tbody tr.click:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.empty { padding: 44px 16px; text-align: center; color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255,255,255,.012) 10px 20px); border: 1px dashed var(--border); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 2px 9px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; background: var(--panel-3); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
.badge.good { background: var(--good-bg); color: var(--good); border-color: rgba(52,211,153,.3); }
.badge.good::before { box-shadow: 0 0 8px var(--good); animation: pulse 2.2s ease-in-out infinite; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(251,191,36,.3); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(248,113,113,.3); }
.badge.accent { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }
@keyframes pulse { 50% { opacity: .35; } }
.tag { display: inline-block; padding: 1px 8px; background: var(--panel-3); border: 1px solid var(--border-strong); color: var(--text-dim); font-size: 12px; margin: 0 4px 2px 0; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs a { position: relative; padding: 11px 18px; color: var(--muted); font-weight: 550; white-space: nowrap; transition: color .12s, background .12s; }
.tabs a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.tabs a.active { color: #fff; background: linear-gradient(180deg, rgba(124,140,255,.12), transparent); }
.tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); box-shadow: 0 0 12px rgba(91,109,255,.8); }

/* ---------- Konsole ---------- */
.term { border: 1px solid var(--border-strong); background: #05070a; box-shadow: var(--shadow); }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); border-bottom: 1px solid var(--border-strong); font-size: 12px; color: var(--muted); }
.term-bar i { width: 9px; height: 9px; background: #2d3649; display: inline-block; }
.term-bar i:first-child { background: var(--bad); } .term-bar i:nth-child(2) { background: var(--warn); } .term-bar i:nth-child(3) { background: var(--good); }
.term-bar .mono { color: var(--text-dim); margin-left: 4px; }
.console { background: transparent; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; height: 470px; overflow-y: auto; padding: 12px 16px; white-space: pre-wrap; word-break: break-all; color: #c9d1e3; }
.console .ln { padding: 0 6px; margin: 0 -6px; border-left: 2px solid transparent; }
.console .ln:hover { background: rgba(255,255,255,.03); }
.console .ln.err { color: #ff8b8b; border-left-color: var(--bad); background: rgba(248,113,113,.06); }
.console .ln.warn { color: #fcd34d; border-left-color: var(--warn); }
.console .ln.sys { color: var(--accent-2); border-left-color: var(--accent-2); }
.console-input { display: flex; gap: 0; margin-top: 12px; }
.console-input::before { content: "›"; display: grid; place-items: center; width: 40px; background: var(--panel-2); border: 1px solid var(--border-strong); border-right: 0; color: var(--accent); font: 700 18px var(--mono); }
.console-input input { font-family: var(--mono); border-right: 0; }
.console-input .btn { margin-left: 0; }

/* ---------- Dialoge & Toasts ---------- */
.overlay { position: fixed; inset: 0; background: rgba(3,4,8,.78); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; z-index: 100; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 120px), var(--panel); border: 1px solid var(--border-strong); width: 100%; max-width: 540px; box-shadow: 0 40px 100px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(124,140,255,.08); animation: pop .18s cubic-bezier(.2,.9,.3,1.1); }
.modal::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--grad); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal.wide { max-width: 880px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 16px; text-transform: none; letter-spacing: -.01em; color: var(--text); }
.modal-head h2::before { display: none; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: rgba(0,0,0,.18); }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(440px, calc(100vw - 36px)); }
.toast { background: var(--panel-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent); padding: 11px 16px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); animation: in .2s cubic-bezier(.2,.9,.3,1.1); }
.toast.error { border-left-color: var(--bad); background: linear-gradient(90deg, var(--bad-bg), var(--panel-2) 40%); }
.toast.success { border-left-color: var(--good); background: linear-gradient(90deg, var(--good-bg), var(--panel-2) 40%); }
@keyframes in { from { opacity: 0; transform: translateX(16px); } }
.secret { font-family: var(--mono); font-size: 14px; white-space: pre-wrap; padding: 14px 16px; background: #05070a; border: 1px dashed var(--accent); color: #dfe4ff; user-select: all; word-break: break-all; box-shadow: 0 0 24px -10px var(--accent) inset; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr; } }
.col { background: rgba(255,255,255,.015); border: 1px solid var(--border); padding: 14px; min-height: 140px; }
.col-head { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-weight: 650; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--text-dim); }
.col-head .muted { background: var(--panel-3); padding: 1px 9px; border: 1px solid var(--border-strong); font-size: 11.5px; }
.note { background: var(--panel-2); border: 1px solid var(--border); padding: 13px 14px; margin-bottom: 10px; transition: border-color .12s, transform .12s; }
.note:hover { border-color: var(--border-strong); transform: translateX(2px); }
.note.prio-high { box-shadow: inset 3px 0 0 var(--bad); } .note.prio-low { box-shadow: inset 3px 0 0 var(--border-strong); } .note.prio-normal { box-shadow: inset 3px 0 0 var(--accent); }
.note .title { font-weight: 650; } .note .meta { color: var(--muted); font-size: 12px; margin-top: 5px; }

/* ---------- Plugins ---------- */
.plugin { display: flex; gap: 14px; align-items: flex-start; }
.plugin img, .plugin .ph { width: 52px; height: 52px; background: var(--panel-3); flex: none; object-fit: cover; border: 1px solid var(--border-strong); }
.plugin .body { min-width: 0; flex: 1; }
.plugin p { margin: 3px 0 10px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid line { stroke: var(--border); stroke-dasharray: 2 5; }
.chart path.line { filter: drop-shadow(0 0 5px currentColor); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: -1px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.login .hero { position: relative; padding: 64px; display: flex; flex-direction: column; justify-content: center; gap: 28px; overflow: hidden; border-right: 1px solid var(--border);
  background: radial-gradient(700px 500px at 20% 20%, rgba(91,109,255,.28), transparent 70%), radial-gradient(600px 400px at 90% 90%, rgba(56,189,248,.16), transparent 70%); }
.login .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 44px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 100%; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.login .hero > * { position: relative; }
.login .hero h1 { font-size: 46px; line-height: 1.05; letter-spacing: -.04em; max-width: 14ch; }
.login .hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .hero p { color: var(--text-dim); max-width: 46ch; margin: 0; font-size: 15px; }
.login .hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); }
.login .hero li { display: flex; gap: 12px; align-items: center; }
.login .hero li::before { content: ""; width: 8px; height: 8px; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); flex: none; }
.login .panel { display: grid; place-items: center; padding: 32px; }
.login form.card { width: 100%; max-width: 400px; padding: 34px; }
.login form h1 { font-size: 22px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .hero { display: none; } }

.breadcrumb { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a, .breadcrumb span { padding: 2px 4px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; word-break: break-word; }

/* Node-Karten: bei wenigen Nodes volle Breite, Metriken nebeneinander */
.grid.nodes { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px 32px; }
@media (max-width: 520px) { .grid.nodes { grid-template-columns: 1fr; } }

/* ---------- Gruppen & Rechte ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.perm-cat { border: 1px solid var(--border); background: rgba(255,255,255,.015); padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.perm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.perm-head h3 { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--accent); }
label.check.perm { font-size: 13px; align-items: flex-start; line-height: 1.35; }
label.check.perm input { margin-top: 2px; }
label.check.perm input:disabled + span { color: var(--muted); opacity: .55; text-decoration: line-through; text-decoration-color: transparent; }
.scope-mark { color: var(--accent-2); font-size: 9px; vertical-align: 1px; }
.inst-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; max-height: 240px; overflow-y: auto; padding: 4px 2px; }
.inst-list.disabled { opacity: .4; pointer-events: none; }
input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent-strong); padding: 0; }


/* ---------- Listen statt Kacheln ---------- */
/* Kennzahlen-Leiste */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.022), transparent 70%), var(--panel); box-shadow: var(--shadow); }
.strip .stat { padding: 16px 22px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: -1px -1px 0 0; }
/* Bereiche ohne Kasten (Einstellungen, Konfiguration) */
.section { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.section > h2, .section > .card-head { margin-bottom: 16px; }
.section.danger-zone h2 { color: var(--bad); } .section.danger-zone h2::before { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
/* Listen-Zeilen */
.list { border-top: 1px solid var(--border); }
.list-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; margin-top: 18px; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 650; color: var(--text-dim); background: rgba(255,255,255,.025); border: 1px solid var(--border); border-bottom-color: var(--border-strong); }
section:first-child > .list-head { margin-top: 0; }
.list-head + .list { border-top: 0; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .1s; }
.li:hover { background: rgba(124,140,255,.05); }
.li-main { min-width: 0; flex: 1; }
.li .title { font-weight: 650; } .li .meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.li.prio-high { box-shadow: inset 3px 0 0 var(--bad); } .li.prio-normal { box-shadow: inset 3px 0 0 var(--accent); } .li.prio-low { box-shadow: inset 3px 0 0 var(--border-strong); }
.li.plugin { justify-content: flex-start; } .li.plugin img, .li.plugin .ph { width: 40px; height: 40px; flex: none; background: var(--panel-3); border: 1px solid var(--border-strong); object-fit: cover; }
.li.plugin .btn { margin-left: auto; flex: none; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ---------- Kontextmenü (Rechtsklick) ---------- */
.has-menu { cursor: context-menu; }
.has-menu:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ctx { position: fixed; z-index: 150; min-width: 230px; padding: 6px 0; background: var(--panel-2); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px -10px rgba(0,0,0,.85), 0 0 0 1px rgba(124,140,255,.12); animation: fade .08s; }
.ctx::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--grad); }
.ctx-title { padding: 7px 16px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-sep { height: 1px; margin: 5px 0; background: var(--border); }
.ctx-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 16px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ctx-item:hover:not(:disabled), .ctx-item:focus-visible { background: var(--accent-bg); color: #fff; outline: none; }
.ctx-item.danger { color: var(--bad); } .ctx-item.danger:hover:not(:disabled), .ctx-item.danger:focus-visible { background: var(--bad-bg); color: #ffb4b4; }
.ctx-item:disabled { opacity: .4; cursor: not-allowed; }
.ctx-hint { color: var(--muted); font-size: 11.5px; }
/* Lange Werte (URL, SHA-1) vollständig zeigen, nötigenfalls umbrechen (Doppelklick markiert den ganzen Wert) */
.full-line { word-break: break-all; line-height: 1.5; margin-top: 2px; }

/* Liste wird gerade neu geladen: alte Inhalte bleiben sichtbar (Scroll-Position bleibt), nur abgedunkelt */
.loading { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* Dateimanager: Auswahl, Drag & Drop */
tbody tr.sel td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
tbody tr.drop td, .fm.drop { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.fm.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.fm-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border: 1px solid var(--accent); border-radius: 8px; }
.fm td.chk, .fm th.chk { width: 32px; padding-right: 0; }
.fm tr[draggable="true"] { cursor: grab; }
.picker { display: flex; flex-direction: column; gap: 2px; max-height: 40vh; overflow: auto; margin-top: 10px; }
.picker button { text-align: left; }
.breadcrumb a.drop { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 4px; }
