:root {
  --bg: #0b0a1a;
  --bg2: #110f26;
  --panel: rgba(24, 20, 52, 0.72);
  --panel-border: rgba(139, 92, 246, 0.22);
  --text: #f4f2ff;
  --muted: #a7a2c8;
  --accent: #8b5cf6;
  --accent2: #a855f7;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139,92,246,.35), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(168,85,247,.25), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(99,102,241,.18), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.accent { color: var(--accent2); width: 26px; height: 26px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, rgba(17,15,38,.95), rgba(11,10,26,.95));
  border-right: 1px solid var(--panel-border);
  display: flex; flex-direction: column; padding: 22px 16px; gap: 22px;
  position: sticky; top: 0; height: 100vh;
}
.logo { text-align: center; padding: 6px 0 14px; border-bottom: 1px solid var(--panel-border); }
.logo-mark {
  font-size: 46px; font-weight: 800; font-style: italic; letter-spacing: -1px;
  background: linear-gradient(180deg, #fff, #c9c3e6); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(139,92,246,.6));
}
.logo-sub { font-size: 10px; letter-spacing: 3px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  color: #d6d2f0; font-size: 15px; background: none; border: 0; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--accent-soft); }
.nav-item.active { background: linear-gradient(90deg, #7c3aed, #6d28d9); color: #fff; box-shadow: 0 6px 24px rgba(124,58,237,.45); font-weight: 600; }
.chev { margin-left: auto; color: var(--muted); }
.sub { display: flex; flex-direction: column; padding: 2px 0 6px 46px; gap: 2px; }
.sub a { font-size: 13.5px; color: var(--muted); padding: 7px 0; }
.sub a:hover { color: var(--text); }

.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.card-mini { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; padding: 12px 14px; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.status-online { color: var(--green); font-weight: 600; margin: 4px 0 2px; }
.spark { width: 100%; height: 28px; color: #c4b5fd; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.big { width: 18px; height: 18px; }

.user-card {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(24,20,52,.8));
  border: 1px solid var(--panel-border); border-radius: 14px;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: #4c1d95 center/cover; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  position: relative;
}
.avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg2); }
.user-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.user-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge {
  align-self: flex-start; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  --c: var(--accent); color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.logout { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fca5a5; border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; }
.logout:hover { background: rgba(239,68,68,.25); color: #fff; }
.logout svg { width: 18px; height: 18px; }

/* Main */
.main { padding: 22px 26px 30px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.search {
  display: flex; align-items: center; gap: 12px; flex: 0 1 540px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--muted);
}
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; min-width: 0; }
kbd { font: 600 12px Inter, sans-serif; color: var(--text); background: rgba(255,255,255,.06); padding: 4px 8px; border-radius: 6px; }
.bell { margin-left: auto; position: relative; background: none; border: 0; color: var(--muted); padding: 8px; }
.bell svg { width: 26px; height: 26px; }
.bell-count { position: absolute; top: 0; right: 0; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(12, 1fr);
  grid-template-areas:
    "hero hero hero hero hero hero hero hero hero quick quick quick"
    "stats stats stats stats stats stats stats stats stats quick quick quick"
    "abm abm abm abm abm abm abm warn warn warn warn warn"
    "bew bew bew bew bew ing ing ing ing log log log";
}
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px 20px; backdrop-filter: blur(8px); min-width: 0; }
.hero { grid-area: hero; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 30px;
  background:
    linear-gradient(90deg, rgba(17,15,38,.95) 30%, rgba(17,15,38,.4)),
    radial-gradient(600px 200px at 70% 0%, rgba(168,85,247,.55), transparent),
    linear-gradient(135deg, #1e1b4b, #4c1d95);
}
.hero-pre { font-size: 30px; font-weight: 500; }
.hero h1 { margin: 0 0 10px; font-size: 44px; line-height: 1.1; font-weight: 600; color: var(--accent2); }
.hero h1 .b { font-weight: 800; color: #b38cff; }
.hero p { margin: 0; color: #d6d2f0; }
.hero-logo { font-size: 64px; font-weight: 800; font-style: italic; color: #e5e1f5; filter: drop-shadow(0 0 20px rgba(168,85,247,.8)); }
.quick { grid-area: quick; display: flex; flex-direction: column; gap: 12px; }
.quick h2, .panel-head h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.qa { display: flex; align-items: center; gap: 16px; padding: 14px 20px; background: rgba(76,29,149,.25); border: 1px solid var(--panel-border); border-radius: 10px; font-size: 14.5px; text-align: left; }
.qa svg { color: var(--accent2); width: 26px; height: 26px; }
.qa:hover { background: rgba(124,58,237,.35); }

.stats { grid-area: stats; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { display: flex; align-items: center; gap: 16px; }
.stat svg { width: 44px; height: 44px; color: var(--accent2); }
.stat b { font-size: 30px; display: block; }
.stat span { color: var(--muted); font-size: 13px; }
.stat .up { color: var(--green); font-size: 12px; font-weight: 600; margin-left: 6px; }

.abm { grid-area: abm; } .warn { grid-area: warn; } .bew { grid-area: bew; } .ingame { grid-area: ing; } .log { grid-area: log; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.more { font-size: 13px; padding: 7px 12px; border: 1px solid var(--panel-border); border-radius: 10px; white-space: nowrap; }
.more:hover { background: var(--accent-soft); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 6px 4px; }
td { padding: 9px 4px; border-top: 1px solid rgba(255,255,255,.05); }
.who { display: flex; align-items: center; gap: 10px; }
.ini { width: 30px; height: 30px; border-radius: 50%; background: #6d28d9; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.pill { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.pill.wait { background: rgba(245,158,11,.18); color: #fbbf24; }
.pill.ok { background: rgba(34,197,94,.16); color: #4ade80; }
.pill.open { background: rgba(139,92,246,.25); color: #c4b5fd; }
.pill.check { background: rgba(59,130,246,.2); color: #93c5fd; }

.warn-body { display: flex; align-items: center; gap: 30px; padding: 8px 10px 14px; }
.ring { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.ring-inner { width: 106px; height: 106px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; text-align: center; }
.ring-inner b { font-size: 30px; display: block; }
.ring-inner span { font-size: 12px; color: var(--muted); line-height: 1.2; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.legend li { display: flex; align-items: center; gap: 12px; }
.legend li b { margin-left: auto; }
.info-bar { display: flex; justify-content: space-between; background: rgba(76,29,149,.3); border: 1px solid var(--panel-border); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }

.ingame-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: center; }
.ingame-img { aspect-ratio: 4/3; border-radius: 10px; background: linear-gradient(160deg, #6b7280, #1f2937 55%, #4c1d95); }
.muted-accent { color: #4ade80; font-size: 14px; }
.players { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; font-size: 16px; }
.players b { font-size: 24px; }
.muted { color: var(--muted); font-size: 13px; }
.last { margin: 4px 0 12px; }
.btn-primary { background: linear-gradient(90deg, #7c3aed, #6d28d9); border: 0; padding: 10px 14px; border-radius: 8px; font-weight: 600; width: 100%; }

.log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; }
.log-list li { display: flex; gap: 12px; align-items: center; }
.log-list time { color: var(--muted); width: 40px; }
.demo-note { color: var(--muted); font-size: 12px; text-align: center; margin: 22px 0 0; }

/* Responsiv */
@media (max-width: 1280px) {
  .grid { grid-template-areas:
    "hero hero hero hero hero hero hero hero hero hero hero hero"
    "stats stats stats stats stats stats stats stats stats stats stats stats"
    "quick quick quick quick abm abm abm abm abm abm abm abm"
    "warn warn warn warn warn warn bew bew bew bew bew bew"
    "ing ing ing ing ing ing log log log log log log"; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 16px; }
  .grid { grid-template-columns: 1fr; grid-template-areas: "hero" "stats" "quick" "abm" "warn" "bew" "ing" "log"; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-logo { display: none; }
  .hero h1 { font-size: 32px; }
  table { font-size: 13px; }
}

/* Feinschliff */
.stat span { display: block; white-space: nowrap; }
.panel-head h2 { white-space: nowrap; }
.abm, .bew { overflow-x: auto; }
@media (max-width: 860px) {
  .warn-body { flex-direction: column; gap: 16px; }
  .ingame-body { grid-template-columns: 1fr; }
  .stat span { white-space: normal; }
  .panel-head { flex-wrap: wrap; }
  .search kbd { display: none; }
}
