/* ═══════════════════════════════════════════════════════════════
   OberAttack – Oberüberhausen · Dashboard Design
   Schwarz · Dunkelrot · Orange
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #050506;
  --bg-2: #0a0a0c;
  --panel: #0f0f12;
  --panel-2: #141418;
  --panel-3: #1b1b21;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.1);
  --text: #f3f1ef;
  --text-2: #c9c5c1;
  --muted: #8a8580;
  --red: #c4161c;
  --red-2: #e3261f;
  --red-dark: #6e0a0a;
  --orange: #ff6b00;
  --orange-2: #ff8a1a;
  --amber: #ffb020;
  --green: #3ddc84;
  --grad: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
  --grad-soft: linear-gradient(135deg, rgba(196, 22, 28, 0.18), rgba(255, 107, 0, 0.12));
  --glow: 0 0 0 1px rgba(255, 107, 0, 0.25), 0 10px 40px -10px rgba(255, 80, 0, 0.45);
  --radius: 14px;
  --radius-sm: 9px;
  --font-head: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --sidebar: 268px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(196, 22, 28, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 107, 0, 0.08), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
  background-attachment: fixed;
}

::selection {
  background: rgba(255, 107, 0, 0.35);
}

a {
  color: var(--orange-2);
  text-decoration: none;
}
a:hover {
  color: var(--amber);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.15;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #26262c;
  border-radius: 10px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #3a2a26;
}

/* ── Layout ───────────────────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 10, 10, 0.96), rgba(6, 6, 7, 0.98));
  border-right: 1px solid var(--line);
  padding: 22px 16px 16px;
  z-index: 40;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 40%;
  background: linear-gradient(180deg, var(--red), transparent);
  opacity: 0.6;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.brand img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 4px 14px rgba(255, 80, 0, 0.45));
  animation: logoFloat 6s ease-in-out infinite;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}
.brand-name .o {
  color: var(--red-2);
}
.brand-name .a {
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 5px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.nav-label {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: #5d5853;
  text-transform: uppercase;
  padding: 10px 12px 6px;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-2);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s, transform 0.25s var(--ease);
}
.nav a svg {
  width: 19px;
  height: 19px;
  flex: none;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.3s var(--ease);
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  transform: translateX(2px);
}
.nav a:hover svg {
  opacity: 1;
}
.nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(196, 22, 28, 0.28), rgba(255, 107, 0, 0.06) 70%, transparent);
}
.nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 14px var(--orange);
}
.nav a.active svg {
  opacity: 1;
  color: var(--orange);
  transform: scale(1.08);
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bot-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-2);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}
.user-card img,
.user-card .avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  object-fit: cover;
}
.avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--grad);
  font-family: var(--font-head);
  font-weight: 700;
}
.user-card .who {
  flex: 1;
  min-width: 0;
}
.user-card .who b {
  display: block;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card .who span {
  font-size: 11.5px;
  color: var(--muted);
}

.scrim {
  display: none;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 34px;
  background: rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .titles {
  flex: 1;
  min-width: 0;
}
.crumb {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
}
.page-title {
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn.menu-toggle {
  display: none;
}

.view {
  padding: 28px 34px 60px;
  animation: viewIn 0.5s var(--ease) both;
}

/* ── Karten ───────────────────────────────────────────────────── */

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 18, 20, 0.92), rgba(11, 11, 13, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.35;
  transition: opacity 0.3s;
}
.card.hover:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 0, 0.22);
  box-shadow: 0 18px 50px -24px rgba(255, 80, 0, 0.5);
}
.card.hover:hover::before {
  opacity: 1;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title svg {
  width: 18px;
  height: 18px;
  color: var(--orange);
}
.card-sub {
  color: var(--muted);
  font-size: 12.5px;
}

.grid {
  display: grid;
  gap: 18px;
}
.grid-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 1560px) {
  .grid-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.grid-2 {
  grid-template-columns: 1.35fr 1fr;
}
.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mt {
  margin-top: 18px;
}
.mt-lg {
  margin-top: 26px;
}

.stat {
  padding: 20px 22px 18px;
  animation: cardIn 0.6s var(--ease) both;
}
.stat:nth-child(2) {
  animation-delay: 0.05s;
}
.stat:nth-child(3) {
  animation-delay: 0.1s;
}
.stat:nth-child(4) {
  animation-delay: 0.15s;
}
.stat:nth-child(5) {
  animation-delay: 0.2s;
}
.stat:nth-child(6) {
  animation-delay: 0.25s;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  border: 1px solid rgba(255, 107, 0, 0.18);
  color: var(--orange);
}
.stat-icon svg {
  width: 19px;
  height: 19px;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  margin-top: 10px;
  background: linear-gradient(180deg, #fff 30%, #ffc9a8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-foot {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 107, 0, 0.16);
  background:
    linear-gradient(110deg, rgba(196, 22, 28, 0.22), rgba(255, 107, 0, 0.07) 55%, transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 14px),
    var(--panel);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -60px;
  width: 260px;
  height: 260px;
  background: url('/img/logo.svg') center / contain no-repeat;
  opacity: 0.07;
  transform: rotate(-12deg);
}
.hero h2 {
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero p {
  margin: 4px 0 0;
  color: var(--text-2);
}

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  --b: var(--panel-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--b);
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
  position: relative;
  user-select: none;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:hover {
  border-color: rgba(255, 107, 0, 0.4);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 8px 24px -10px rgba(255, 80, 0, 0.7);
}
.btn-primary:hover {
  box-shadow: var(--glow);
  border-color: transparent;
}
.btn-ghost {
  background: transparent;
}
.btn-danger {
  background: rgba(196, 22, 28, 0.14);
  border-color: rgba(196, 22, 28, 0.45);
  color: #ff8d86;
}
.btn-danger:hover {
  background: rgba(196, 22, 28, 0.28);
  border-color: var(--red-2);
}
.btn-sm {
  padding: 7px 11px;
  font-size: 13px;
  border-radius: 8px;
}
.btn-icon {
  padding: 8px;
}
.btn[disabled],
.btn.loading {
  opacity: 0.55;
  pointer-events: none;
}
.btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

/* ── Badges & Status ──────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  white-space: nowrap;
}
.badge-role {
  --role: var(--orange);
  border-color: color-mix(in srgb, var(--role) 55%, transparent);
  background: color-mix(in srgb, var(--role) 13%, transparent);
  color: #fff;
}
.badge-role::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--role);
  box-shadow: 0 0 8px var(--role);
}
.badge-manual {
  border-color: rgba(227, 38, 31, 0.5);
  background: rgba(196, 22, 28, 0.16);
  color: #ffb3ad;
}
.badge-grace {
  border-color: rgba(255, 176, 32, 0.5);
  background: rgba(255, 176, 32, 0.12);
  color: var(--amber);
}
.badge-muted {
  color: var(--muted);
}
.badge-ok {
  border-color: rgba(61, 220, 132, 0.4);
  background: rgba(61, 220, 132, 0.1);
  color: #8ff0b8;
}
.badge-off {
  border-color: rgba(196, 22, 28, 0.45);
  background: rgba(196, 22, 28, 0.12);
  color: #ff9a93;
}
.badge-type {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11.5px;
  border-color: rgba(255, 107, 0, 0.35);
  color: var(--orange-2);
  background: rgba(255, 107, 0, 0.08);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4a4a50;
  flex: none;
  position: relative;
}
.dot.on {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.dot.on::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: ping 2s var(--ease) infinite;
}
.dot.off {
  background: var(--red-2);
  box-shadow: 0 0 10px var(--red);
}
.dot.warn {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

/* ── Listen / Tabellen ────────────────────────────────────────── */

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row .grow {
  flex: 1;
  min-width: 0;
}
.list-row b {
  font-weight: 600;
}
.list-row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  font-size: 13.5px;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.85);
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-family: var(--font-head);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.015);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tbody tr {
  transition: background 0.2s;
}
.table tbody tr:hover {
  background: rgba(255, 107, 0, 0.045);
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table .clickable {
  cursor: pointer;
}
.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  image-rendering: pixelated;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  flex: none;
}
.mc-avatar.lg {
  width: 68px;
  height: 68px;
  border-radius: 12px;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.copy {
  cursor: pointer;
  color: var(--text-2);
  border-bottom: 1px dashed transparent;
  transition: color 0.2s, border-color 0.2s;
}
.copy:hover {
  color: var(--orange-2);
  border-bottom-color: currentColor;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}
.nowrap {
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.danger-text {
  color: #ff8d86;
}
.warn-text {
  color: var(--amber);
}

/* ── Toolbar / Formulare ──────────────────────────────────────── */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.toolbar .spacer {
  flex: 1;
}
.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
}
.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
}
.search input[type='search'] {
  padding-left: 38px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: var(--font-body);
}
.chip:hover {
  border-color: rgba(255, 107, 0, 0.45);
  color: #fff;
}
.chip.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(255, 80, 0, 0.8);
}

input[type='text'],
input[type='number'],
input[type='password'],
input[type='search'],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #0b0b0e;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
textarea {
  min-height: 90px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--orange) 50%), linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(255, 107, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.14);
  background: #0e0d10;
}
input::placeholder,
textarea::placeholder {
  color: #5c5752;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.field label,
.field .label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 7px;
}
.field .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.switch-row .txt b {
  display: block;
  font-size: 13.5px;
}
.switch-row .txt span {
  font-size: 12px;
  color: var(--muted);
}
.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: none;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch .slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #24242a;
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: background 0.3s var(--ease);
}
.switch .slider::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8a8580;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.switch input:checked + .slider {
  background: var(--grad);
  border-color: transparent;
}
.switch input:checked + .slider::after {
  transform: translateX(20px);
  background: #fff;
}
.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.35);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 2px;
}
.check {
  --role: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}
.check:hover {
  border-color: rgba(255, 107, 0, 0.35);
}
.check input {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
  margin: 0;
}
.check:has(input:checked) {
  border-color: rgba(255, 107, 0, 0.55);
  background: rgba(255, 107, 0, 0.08);
}
.check .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--role);
  flex: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 16px;
  border-radius: 11px;
  border: 1px solid rgba(255, 176, 32, 0.35);
  background: rgba(255, 176, 32, 0.07);
  color: #ffd79a;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.notice.danger {
  border-color: rgba(227, 38, 31, 0.45);
  background: rgba(196, 22, 28, 0.1);
  color: #ffb3ad;
}
.notice.info {
  border-color: rgba(255, 107, 0, 0.3);
  background: rgba(255, 107, 0, 0.06);
  color: var(--text-2);
}
.notice svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
}

.codebox {
  position: relative;
  padding: 14px 16px;
  border-radius: 10px;
  background: #070708;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-all;
  color: #ffd2b0;
}
.codebox .btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* ── Server- & Mapping-Karten ─────────────────────────────────── */

.entity-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.entity-head .title {
  flex: 1;
  min-width: 0;
}
.entity-head h3 {
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.entity-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  border: 1px solid rgba(255, 107, 0, 0.22);
  color: var(--orange);
  flex: none;
}
.entity-icon svg {
  width: 22px;
  height: 22px;
}
.role-orb {
  --role: var(--orange);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex: none;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--role) 85%, #fff), var(--role) 45%, color-mix(in srgb, var(--role) 40%, #000));
  box-shadow: 0 0 24px -4px var(--role);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.metric {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
}
.metric b {
  display: block;
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.1;
}
.metric span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.test-result {
  margin-top: 12px;
  font-size: 13px;
}

/* ── Timeline (Aktivitäten) ───────────────────────────────────── */

.timeline {
  position: relative;
  padding-left: 22px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--red), rgba(255, 107, 0, 0.1));
}
.tl-item {
  position: relative;
  padding: 0 0 15px;
  animation: cardIn 0.5s var(--ease) both;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--orange);
}
.tl-item.warn::before {
  border-color: var(--amber);
}
.tl-item.error::before {
  border-color: var(--red-2);
  background: var(--red);
}
.tl-item .msg {
  font-size: 13.5px;
}
.tl-item .meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lvl {
  display: inline-block;
  min-width: 62px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.lvl-info {
  color: var(--orange-2);
  background: rgba(255, 107, 0, 0.1);
}
.lvl-warn {
  color: var(--amber);
  background: rgba(255, 176, 32, 0.1);
}
.lvl-error {
  color: #ff8d86;
  background: rgba(196, 22, 28, 0.18);
}
.details-row td {
  background: #080809;
}
.details-row pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ffd2b0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Modal ────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease both;
}
.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: linear-gradient(180deg, #131216, #0a0a0c);
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-radius: 18px;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(196, 22, 28, 0.12);
  animation: modalIn 0.35s var(--ease) both;
  position: relative;
}
.modal.wide {
  width: min(900px, 100%);
}
.modal::before {
  content: '';
  position: sticky;
  display: block;
  top: 0;
  height: 3px;
  background: var(--grad);
  z-index: 2;
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 6px;
}
.modal-head h3 {
  flex: 1;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.modal-body {
  padding: 14px 24px 24px;
}

/* ── Toasts ───────────────────────────────────────────────────── */

.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 44px));
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: #121115;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--orange);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  font-size: 13.5px;
  animation: toastIn 0.4s var(--ease) both;
}
.toast.error {
  border-left-color: var(--red-2);
}
.toast.out {
  animation: toastOut 0.3s ease both;
}
.toast b {
  display: block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Leere Zustände / Laden ───────────────────────────────────── */

.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--muted);
}
.empty svg {
  width: 46px;
  height: 46px;
  color: var(--red);
  opacity: 0.7;
  margin-bottom: 10px;
}
.empty h3 {
  color: var(--text);
  font-size: 20px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.skeleton {
  border-radius: var(--radius);
  min-height: 120px;
  background: linear-gradient(90deg, #0f0f12 0%, #1a1519 40%, #0f0f12 80%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
  border: 1px solid var(--line);
}
.loader {
  display: grid;
  place-items: center;
  padding: 80px 0;
}
.loader img {
  width: 64px;
  animation: pulse 1.2s ease-in-out infinite;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.section-title {
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

.server-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.015);
}
.server-block .head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.server-block .head b {
  flex: 1;
}
.reason-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  border-top: 1px dashed var(--line);
}
.reason-line:first-of-type {
  border-top: 0;
}
.reason-line .grow {
  flex: 1;
  min-width: 0;
}

.save-bar {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  z-index: 5;
}

/* ── Login ────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.embers span {
  position: absolute;
  bottom: -20px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  opacity: 0;
  animation: ember linear infinite;
}
.embers span:nth-child(odd) {
  background: var(--red-2);
  box-shadow: 0 0 10px var(--red);
}
.embers span:nth-child(1) { left: 8%; animation-duration: 9s; animation-delay: 0s; }
.embers span:nth-child(2) { left: 17%; animation-duration: 12s; animation-delay: 2s; }
.embers span:nth-child(3) { left: 26%; animation-duration: 10s; animation-delay: 4s; }
.embers span:nth-child(4) { left: 38%; animation-duration: 14s; animation-delay: 1s; }
.embers span:nth-child(5) { left: 49%; animation-duration: 11s; animation-delay: 3s; }
.embers span:nth-child(6) { left: 58%; animation-duration: 13s; animation-delay: 5s; }
.embers span:nth-child(7) { left: 67%; animation-duration: 9s; animation-delay: 6s; }
.embers span:nth-child(8) { left: 76%; animation-duration: 12s; animation-delay: 2.5s; }
.embers span:nth-child(9) { left: 85%; animation-duration: 10s; animation-delay: 4.5s; }
.embers span:nth-child(10) { left: 93%; animation-duration: 15s; animation-delay: 0.5s; }

.login-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 40px 34px 30px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(22, 16, 16, 0.92), rgba(8, 8, 9, 0.96));
  border: 1px solid rgba(255, 107, 0, 0.2);
  box-shadow: 0 40px 120px -30px rgba(196, 22, 28, 0.55);
  position: relative;
  animation: modalIn 0.7s var(--ease) both;
}
.login-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 22px 22px 0 0;
  background: var(--grad);
}
.login-logo {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 10px 30px rgba(255, 80, 0, 0.55));
  animation: logoFloat 5s ease-in-out infinite;
}
.login-title {
  font-size: 44px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 14px;
}
.login-title .o {
  color: var(--red-2);
}
.login-title .a {
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-sub {
  color: var(--muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 6px 0 28px;
}
.btn-discord {
  width: 100%;
  padding: 15px 18px;
  font-size: 16px;
}
.btn-discord svg {
  width: 22px;
  height: 22px;
}
.login-foot {
  margin-top: 22px;
  font-size: 12px;
  color: #5d5853;
}

/* ── Animationen ──────────────────────────────────────────────── */

@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(30px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.6; }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes ember {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(-105vh) rotate(540deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar);
    transform: translateX(-102%);
    transition: transform 0.4s var(--ease);
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.7);
  }
  body.nav-open .sidebar {
    transform: none;
  }
  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  body.nav-open .scrim {
    opacity: 1;
    pointer-events: auto;
  }
  .btn.menu-toggle {
    display: inline-flex;
  }
  .topbar {
    padding: 14px 20px;
  }
  .view {
    padding: 22px 20px 50px;
  }
}

@media (max-width: 720px) {
  .page-title {
    font-size: 23px;
  }
  .topbar-actions .btn span {
    display: none;
  }
  .grid-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat {
    padding: 16px;
  }
  .stat-value {
    font-size: 34px;
  }
  .stat-icon {
    display: none;
  }
  .grid-cards {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-head,
  .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }
  /* Tabellen werden zu Karten */
  .table-wrap.responsive {
    border: 0;
    background: transparent;
  }
  .responsive table,
  .responsive thead,
  .responsive tbody,
  .responsive tr,
  .responsive td {
    display: block;
    width: 100%;
  }
  .responsive thead {
    display: none;
  }
  .responsive tbody tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(12, 12, 14, 0.9);
    padding: 6px 4px;
  }
  .responsive td {
    border: 0;
    padding: 7px 12px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
  }
  .responsive td[data-label]::before {
    content: attr(data-label);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    flex: none;
  }
  .responsive .details-row td {
    display: block;
  }
}

/* Stilles Aktualisieren ohne erneute Einblend-Animation */
.view.quiet .stat,
.view.quiet .tl-item {
  animation: none;
}
