/* MGS Bot – Admin-Panel. Gestaltung angelehnt an mgschat.xyz-development.net */
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #070709;
  --surface-1: #0d0e11;
  --surface-2: #131418;
  --surface-3: #1a1b21;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f4f6;
  --text-2: #a8a9b3;
  --text-3: #6d6e78;
  --red: #e5172f;
  --red-strong: #ff2a42;
  --red-soft: #ff7a88;
  --red-glow: rgba(229, 23, 47, 0.35);
  --green: #34d399;
  --amber: #fbbf24;
  --sky: #7dd3fc;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
[hidden] { display: none !important; }
a { color: var(--red-soft); text-decoration-color: rgba(255, 122, 136, 0.4); text-underline-offset: 3px; }
a:hover { color: #fff; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 3px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============ Hintergrund ============ */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 75%); }
.bg-glow { position: absolute; inset: 0; background: radial-gradient(700px 380px at 50% -60px, rgba(229, 23, 47, 0.16), transparent 70%), radial-gradient(600px 500px at 100% 100%, rgba(229, 23, 47, 0.07), transparent 70%); }

/* ============ Grundbausteine ============ */
.eyebrow { font: 500 0.72rem var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--red-soft); margin: 0; }
.text-gradient-red { background: linear-gradient(100deg, #fff 0%, var(--red-soft) 45%, var(--red) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-2); }
.small { font-size: 13.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  padding: 24px;
}
.card-hover { transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s; }
.card-hover:hover { border-color: rgba(229, 23, 47, 0.35); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 50px -24px rgba(229, 23, 47, 0.35); }

.logo { display: inline-flex; align-items: center; gap: 10px; font: 600 1.05rem var(--display); letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.logo svg { width: 32px; height: 32px; filter: drop-shadow(0 0 12px rgba(229, 23, 47, 0.45)); }
.logo b { color: var(--red-strong); font-weight: 600; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 99px; background: rgba(255, 255, 255, 0.02); color: var(--text-2); font-size: 12.5px; }
.pill svg.i { width: 14px; height: 14px; color: var(--red-soft); }
.pill-sep { width: 1px; height: 12px; background: var(--line-strong); }
.pill b { color: var(--red-soft); font-weight: 500; }

/* ============ Login ============ */
.login { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; max-width: 1240px; margin: 0 auto; padding: 22px 24px 40px; }
.login-top { display: flex; align-items: center; justify-content: space-between; }
.login-grid { flex: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; padding: 48px 0; }
.headline { font: 700 clamp(44px, 6.4vw, 84px)/0.98 var(--display); letter-spacing: -0.035em; margin: 26px 0 26px; }
.lead { color: var(--text-2); font-size: 17px; line-height: 1.75; max-width: 560px; margin: 0 0 22px; }
.quote { border-left: 2px solid var(--red); padding-left: 16px; font: 500 17px var(--display); margin: 0 0 34px; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(13, 14, 17, 0.7); max-width: 540px; }
.feature-row > div { display: flex; flex-direction: column; align-items: center; padding: 14px 10px; gap: 2px; text-align: center; }
.feature-row > div + div { border-left: 1px solid var(--line-strong); }
.feature-row svg.i { color: var(--red-soft); margin-bottom: 4px; }
.feature-row b { font-size: 14px; font-weight: 600; }
.feature-row span { font-size: 12px; color: var(--text-3); }
.login-card { padding: 34px 32px 30px; max-width: 440px; width: 100%; justify-self: end; animation: fadeUp 0.6s cubic-bezier(.22, 1, .36, 1) both; }
.login-card h2 { font: 600 26px var(--display); letter-spacing: -0.02em; margin: 8px 0 4px; }
.login-card .muted { margin: 0 0 24px; }

/* ============ Formulare ============ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field small, .hint { color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
input, textarea, select {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--text);
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 13px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a9b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; cursor: pointer; }
select option, select optgroup { background: var(--surface-2); }
input:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, 0.2); }
input:focus, textarea:focus, select:focus { border-color: rgba(229, 23, 47, 0.6); box-shadow: 0 0 0 3px rgba(229, 23, 47, 0.15); }
input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.input-icon { position: relative; }
.input-icon svg.i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 16px; height: 16px; pointer-events: none; }
.input-icon input { padding-left: 40px; }
.form-error { color: var(--red-soft); min-height: 1.2em; font-size: 13.5px; margin: 0 0 12px; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-size: 14.5px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 22px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: background 0.2s, border-color 0.2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform 0.2s ease, background 0.2s; }
.switch input:checked + .track { background: var(--red); border-color: var(--red); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(229, 23, 47, 0.3); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  font: 500 14px var(--sans); color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, opacity 0.2s;
}
.btn svg.i { width: 16px; height: 16px; }
.btn:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); color: #fff; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: transparent; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 10px 30px -10px rgba(229, 23, 47, 0.7); }
.btn-primary:hover { background: var(--red-strong); border-color: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 14px 40px -10px rgba(255, 42, 66, 0.8); }
.btn-primary:disabled:hover { background: var(--red); }
.btn-secondary { background: rgba(255, 255, 255, 0.03); }
.btn-danger { color: var(--red-soft); border-color: rgba(229, 23, 47, 0.35); background: rgba(229, 23, 47, 0.06); }
.btn-danger:hover { color: #fff; border-color: rgba(229, 23, 47, 0.6); background: rgba(229, 23, 47, 0.14); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; }
.btn.loading { pointer-events: none; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.icon-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.05); }

/* ============ Shell ============ */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(10, 10, 13, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sidebar-head { height: 68px; flex: none; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--line); }
nav { flex: 1; overflow-y: auto; padding: 10px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.nav-label { font: 500 10.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 18px 10px 6px; }
nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.15s, background 0.15s; }
nav a svg.i { width: 17px; height: 17px; color: var(--text-3); transition: color 0.15s; }
nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
nav a:hover svg.i { color: var(--text-2); }
nav a.active { color: #fff; background: rgba(229, 23, 47, 0.1); }
nav a.active svg.i { color: var(--red-strong); }
nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--red-strong); box-shadow: 0 0 10px var(--red-glow); }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 14px 16px; }
.me { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.me svg.i { width: 16px; height: 16px; color: var(--text-3); }
.me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(7, 7, 9, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; }
.burger { display: none; }

.status-chip { display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); font: 500 12px var(--mono); letter-spacing: 0.04em; color: var(--text-2); min-width: 0; }
.pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); animation: pulse 2s ease-in-out infinite; }
.dot.wait { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
.dot.err { background: var(--red-strong); box-shadow: 0 0 10px var(--red-glow); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ============ Views ============ */
.view { width: 100%; max-width: 1240px; margin: 0 auto; padding: 36px 28px 64px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; animation: fadeUp 0.5s cubic-bezier(.22, 1, .36, 1) both; }
.view-head h1 { font: 600 clamp(28px, 3.4vw, 38px)/1.1 var(--display); letter-spacing: -0.025em; margin: 10px 0 8px; }
.view-head p.sub { margin: 0; color: var(--text-2); max-width: 640px; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.top { align-items: start; }
.span-2 { grid-column: span 2; }
.view .card { animation: fadeUp 0.55s cubic-bezier(.22, 1, .36, 1) both; }
.view .grid > .card:nth-child(2) { animation-delay: 0.04s; } .view .grid > .card:nth-child(3) { animation-delay: 0.08s; } .view .grid > .card:nth-child(4) { animation-delay: 0.12s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.card-title { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.card-title h3 { font: 600 17px var(--display); letter-spacing: -0.01em; margin: 0; }
.ico-box { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(229, 23, 47, 0.1); border: 1px solid rgba(229, 23, 47, 0.25); color: var(--red-soft); }
.ico-box svg.i { width: 17px; height: 17px; }
.card-desc { margin: 0 0 20px; color: var(--text-2); font-size: 13.5px; }
.card-title + .card-desc { margin-left: 46px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; border: 0; }
.stack { display: grid; gap: 14px; }
.spacer { height: 20px; }
.mt { margin-top: 18px; }

/* Dashboard */
.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(229, 23, 47, 0.14), transparent 65%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.avatar-wrap { position: relative; width: max-content; justify-self: start; }
.avatar { width: 76px; height: 76px; border-radius: 20px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-strong); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 44px; height: 44px; }
.avatar-wrap .dot { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border: 3px solid var(--surface-2); }
.hero h2 { font: 600 26px var(--display); letter-spacing: -0.02em; margin: 6px 0 0; }
.meta { display: flex; gap: 8px 26px; flex-wrap: wrap; margin-top: 14px; }
.meta div { display: flex; flex-direction: column; }
.meta span { font: 500 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.meta b { font-weight: 500; font-size: 14.5px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.stat { padding: 20px 22px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat .k { font: 500 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.stat-top svg.i { color: var(--text-3); width: 17px; height: 17px; }
.stat .v { font: 600 34px/1.1 var(--display); letter-spacing: -0.02em; margin-top: 12px; }
.stat .v.red { color: var(--red-soft); }

.alert { padding: 13px 16px; border-radius: 14px; border: 1px solid; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; margin-bottom: 20px; line-height: 1.55; }
.alert svg.i { margin-top: 2px; }
.alert.warn { background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.28); color: rgba(253, 230, 138, 0.92); }
.alert.err { background: rgba(229, 23, 47, 0.07); border-color: rgba(229, 23, 47, 0.35); color: #fecdd3; }
.alert.info { background: rgba(125, 211, 252, 0.05); border-color: rgba(125, 211, 252, 0.25); color: rgba(186, 230, 253, 0.92); }
.alert b { color: #fff; font-weight: 600; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; transition: border-color 0.2s, background 0.2s; }
.quick a svg.i { color: var(--red-soft); width: 17px; height: 17px; }
.quick a .arrow { margin-left: auto; color: var(--text-3); transition: transform 0.2s, color 0.2s; }
.quick a:hover { border-color: rgba(229, 23, 47, 0.35); background: rgba(229, 23, 47, 0.05); }
.quick a:hover .arrow { transform: translateX(3px); color: var(--text); }

/* Chips & Badges */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); font-size: 13px; }
.chip.word { background: rgba(229, 23, 47, 0.07); border-color: rgba(229, 23, 47, 0.28); font-family: var(--mono); font-size: 12.5px; }
.chip.blur > span { filter: blur(4px); transition: filter 0.2s; }
.chip.blur:hover > span { filter: none; }
.chip button { all: unset; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.chip button svg.i { width: 13px; height: 13px; }
.chip button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.chip .swatch { width: 8px; height: 8px; border-radius: 50%; }
.add-row { display: flex; gap: 10px; margin-bottom: 16px; }
.add-row input { flex: 1; }
.multi { display: flex; flex-direction: column; gap: 10px; }
.empty { color: var(--text-3); font-size: 13.5px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; border: 1px solid; font: 500 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.red { border-color: rgba(229, 23, 47, 0.4); background: rgba(229, 23, 47, 0.1); color: var(--red-soft); }
.badge.green { border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.07); color: #6ee7b7; }
.badge.amber { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.07); color: rgba(253, 230, 138, 0.9); }
.badge.sky { border-color: rgba(125, 211, 252, 0.3); background: rgba(125, 211, 252, 0.07); color: rgba(186, 230, 253, 0.9); }
.badge.gray { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--text-2); }

.test-result { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; border: 1px solid; }
.test-result.hit { background: rgba(229, 23, 47, 0.08); border-color: rgba(229, 23, 47, 0.35); color: var(--red-soft); }
.test-result.ok { background: rgba(52, 211, 153, 0.06); border-color: rgba(52, 211, 153, 0.3); color: #6ee7b7; }

/* Discord-Vorschau */
.dc { background: #313338; border-radius: 12px; padding: 16px; font-family: var(--sans); color: #dbdee1; font-size: 15px; border: 1px solid rgba(255, 255, 255, 0.05); }
.dc-msg { display: flex; gap: 14px; }
.dc-ava { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #1e1f22; display: grid; place-items: center; overflow: hidden; }
.dc-ava img { width: 100%; height: 100%; object-fit: cover; }
.dc-ava svg { width: 26px; height: 26px; }
.dc-body { min-width: 0; flex: 1; }
.dc-name { font-weight: 600; color: #f2f3f5; }
.dc-tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.dc-time { color: #949ba4; font-size: 12px; margin-left: 6px; }
.dc-content { margin-top: 2px; }
.dc-embed { margin-top: 8px; background: #2b2d31; border-radius: 4px; border-left: 4px solid var(--red); padding: 12px 16px 14px; max-width: 520px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
.dc-embed .t { font-weight: 700; color: #f2f3f5; font-size: 16px; }
.dc-embed .d { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.45; grid-column: 1; }
.dc-embed .thumb { grid-row: 1 / span 3; grid-column: 2; width: 72px; height: 72px; border-radius: 6px; background: #1e1f22; display: grid; place-items: center; color: #4e5058; }
.dc-embed .thumb svg.i { width: 30px; height: 30px; }
.dc-embed .img { grid-column: 1 / -1; max-width: 100%; border-radius: 6px; max-height: 220px; object-fit: cover; }
.dc-embed .f { font-size: 12px; color: #b5bac1; grid-column: 1 / -1; }
.dc-embed .fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dc-embed .fields .full { grid-column: 1 / -1; }
.dc-embed .fields b { display: block; color: #f2f3f5; font-size: 13px; }
.dc-embed .fields span { font-size: 13.5px; }
.mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; padding: 0 3px; border-radius: 3px; font-weight: 500; }
.dc code { background: #1e1f22; padding: 1px 4px; border-radius: 4px; font-size: 85%; font-family: var(--mono); }

/* TikTok */
.tt-row { grid-template-columns: auto 1fr auto; align-items: start; }
.tt-ava { position: relative; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--text-3); }
.tt-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tt-info { min-width: 0; }
.tt-info a.muted { text-decoration: none; margin-left: 4px; }
.tt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
.tt-meta a { color: var(--text-2); }
.tt-err { margin-top: 6px; font-size: 12.5px; color: var(--red-soft); word-break: break-word; }
.tt-thumb { grid-column: 1 / -1; height: 180px; max-width: 260px; border-radius: 6px; background: linear-gradient(160deg, #1e1f22, #111214); display: grid; place-items: center; color: #4e5058; }
.tt-thumb svg.i { width: 40px; height: 40px; }
.dc-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 14px; border-radius: 4px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; cursor: default; }
.dc-btn svg.i { width: 14px; height: 14px; }

/* Tabs */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-1); }
.tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: 500 13.5px var(--sans); cursor: pointer; }
.tabs button svg.i { width: 15px; height: 15px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: rgba(229, 23, 47, 0.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(229, 23, 47, 0.3); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 600 11px/20px var(--mono); text-align: center; }

/* Tickets */
.card.tk-wrap { padding: 0; }
.tk-wrap { display: grid; grid-template-columns: 320px 1fr; padding: 0; overflow: hidden; height: min(74vh, 780px); min-height: 520px; }
.tk-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.tk-filter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 14px 14px 10px; }
.tk-filter button { height: 32px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text-2); font: 500 12.5px var(--sans); cursor: pointer; }
.tk-filter button span { font-family: var(--mono); color: var(--red-soft); margin-left: 2px; }
.tk-filter button.active { border-color: rgba(229, 23, 47, 0.4); background: rgba(229, 23, 47, 0.1); color: #fff; }
.tk-search { margin: 0 14px 10px; }
.tk-search input { height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }
.tk-items { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.tk-empty { padding: 20px 10px; text-align: center; }
.tk-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.tk-item:hover { background: rgba(255, 255, 255, 0.03); }
.tk-item.active { background: rgba(229, 23, 47, 0.09); box-shadow: inset 0 0 0 1px rgba(229, 23, 47, 0.25); }
.tk-item-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tk-item-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.tk-item-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-top time { font: 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.tk-item-reason { font-size: 12.5px; color: var(--red-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-last { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ava { position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--text-3); }
.tk-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tk-ava svg.i { width: 16px; height: 16px; }
.tk-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tk-placeholder { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--text-3); }
.tk-placeholder svg.i { width: 36px; height: 36px; }
.tk-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.tk-back { display: none; }
.tk-head-info { min-width: 0; flex: 1; }
.tk-head-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 600 16px var(--display); }
.tk-head-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.tk-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tk-msg { display: flex; gap: 12px; max-width: 760px; }
.tk-bubble { min-width: 0; flex: 1; }
.tk-meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.tk-meta time { font: 11px var(--mono); color: var(--text-3); }
.tk-text { margin-top: 4px; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--surface-3); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.55; }
.tk-msg.staff .tk-text { background: rgba(229, 23, 47, 0.08); border-color: rgba(229, 23, 47, 0.22); }
.tk-img { display: block; margin-top: 8px; max-width: 320px; max-height: 240px; border-radius: 10px; border: 1px solid var(--line); }
.tk-file { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line-strong); color: var(--text-2); font-size: 13px; text-decoration: none; }
.tk-file svg.i { width: 14px; height: 14px; }
.tk-compose { display: flex; gap: 10px; align-items: flex-end; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.tk-compose textarea { min-height: 46px; max-height: 200px; resize: vertical; }
.tk-compose .btn { height: 46px; }
.tk-compose.disabled { opacity: 0.6; }
.dc-btn.primary { background: #5865f2; }
.tk-modal-prev { margin-top: 14px; padding: 16px; border-radius: 12px; background: #313338; color: #dbdee1; display: grid; gap: 10px; font-size: 13px; }
.tk-modal-prev > b { color: #f2f3f5; font-size: 15px; }
.tk-modal-prev div { display: grid; gap: 6px; }
.tk-modal-prev span { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; }
.tk-modal-prev i { font-style: normal; padding: 9px 10px; border-radius: 4px; background: #1e1f22; color: #6d6f78; }
.tk-modal-prev i.tall { min-height: 64px; }

/* Commands */
.cmd-list { display: flex; flex-direction: column; }
.cmd-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: default; }
label.cmd-row { cursor: pointer; }
.cmd-row:last-child { border-bottom: 0; }
.cmd-name { font: 600 13.5px var(--mono); color: var(--red-soft); }
.cmd-desc { font-size: 14px; display: flex; flex-direction: column; }
.cmd-desc small { font-size: 12px; color: var(--text-3); }
.cmd-row .switch .track { margin: 0; }
.cmd-editor { margin-top: 4px; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-1); }
.input-prefix b { padding: 0 2px 0 13px; color: var(--red-soft); font-family: var(--mono); }
.input-prefix input { border: 0; background: transparent; padding-left: 4px; box-shadow: none !important; }
.input-prefix:focus-within { border-color: rgba(229, 23, 47, 0.6); box-shadow: 0 0 0 3px rgba(229, 23, 47, 0.15); }
.cmd-actions { display: grid; gap: 10px; margin-top: 12px; }
.cmd-action { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.cmd-action:has(> .check input:checked) { border-color: rgba(229, 23, 47, 0.3); background: rgba(229, 23, 47, 0.04); }
.cmd-sub { display: grid; gap: 10px; margin-top: 12px; padding-left: 32px; }
.cmd-sub.row { grid-template-columns: 1fr 1fr; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14.5px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-1); display: grid; place-items: center; color: transparent; transition: background 0.15s, border-color 0.15s; flex: none; }
.check .box svg.i { width: 13px; height: 13px; stroke-width: 3; }
.check input:checked + .box { background: var(--red); border-color: var(--red); color: #fff; }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(229, 23, 47, 0.3); }

/* Tabellen, Listen, Konsole */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table-wrap { overflow-x: auto; }
.spoiler { filter: blur(5px); cursor: pointer; transition: filter 0.2s; }
.spoiler.shown, .spoiler:hover { filter: none; }

.event-list { display: flex; flex-direction: column; }
.event { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.event:last-child { border-bottom: 0; }
.ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); color: var(--text-2); flex: none; }
.ico svg.i { width: 15px; height: 15px; }
.ico.red { color: var(--red-soft); border-color: rgba(229, 23, 47, 0.3); background: rgba(229, 23, 47, 0.06); }
.ico.green { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.25); }
.ico.amber { color: rgba(253, 230, 138, 0.9); border-color: rgba(251, 191, 36, 0.25); }
.ico.sky { color: rgba(186, 230, 253, 0.9); border-color: rgba(125, 211, 252, 0.25); }
.event time { color: var(--text-3); font: 12px var(--mono); white-space: nowrap; }

.console { background: #050506; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; height: min(62vh, 640px); overflow-y: auto; font: 12.5px/1.7 var(--mono); }
.console .ln { display: flex; gap: 14px; white-space: pre-wrap; word-break: break-word; }
.console .ts { color: var(--text-3); flex: none; }
.console .info { color: #d4d4d8; }
.console .warn { color: var(--amber); }
.console .error { color: var(--red-soft); }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--text-2); font-size: 14px; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 500 12px var(--mono); color: var(--red-soft); padding-top: 2px; }
.steps b { color: var(--text); font-weight: 600; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: rgba(19, 20, 24, 0.94); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9); font-size: 14px; animation: toastIn 0.3s cubic-bezier(.22, 1, .36, 1) both; }
.toast svg.i { margin-top: 2px; width: 16px; height: 16px; }
.toast.ok svg.i { color: var(--green); }
.toast.err { border-color: rgba(229, 23, 47, 0.45); }
.toast.err svg.i { color: var(--red-soft); }
.toast.out { animation: toastOut 0.25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

.skeleton { height: 140px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(90deg, var(--surface-1), var(--surface-2), var(--surface-1)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============ Responsive ============ */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .login-grid { grid-template-columns: 1fr; gap: 40px; padding: 36px 0; }
  .login-card { justify-self: stretch; max-width: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 20; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(.22, 1, .36, 1); background: var(--surface-1); }
  body.nav-open .sidebar { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, 0.6); }
  .burger { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .view { padding: 28px 16px 56px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .tk-wrap { grid-template-columns: 1fr; height: calc(100vh - 230px); min-height: 480px; }
  .tk-wrap .tk-chat { display: none; }
  .tk-side { border-right: 0; }
  .tk-wrap.has-open .tk-side { display: none; }
  .tk-wrap.has-open .tk-chat { display: flex; }
  .tk-back { display: inline-grid; }
  .tk-head { padding: 12px 14px; }
  .tk-msgs { padding: 14px; }
  .tk-compose { padding: 12px 14px 14px; }
  .span-2 { grid-column: auto; }
  .hero { grid-template-columns: auto 1fr; }
  .hero-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 600px) {
  .login { padding: 18px 16px 32px; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row > div + div { border-left: 0; border-top: 1px solid var(--line-strong); }
  .login-card { padding: 26px 20px; }
  .g-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .row { grid-template-columns: 1fr; }
  .topbar { gap: 8px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { padding: 0 11px; }
  .hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .hero-actions .btn { flex: 1; }
  .card { padding: 20px 16px; }
  .card-title + .card-desc { margin-left: 0; }
  .quick { grid-template-columns: 1fr; }
  .dc-embed .fields { grid-template-columns: 1fr 1fr; }
  .event { grid-template-columns: auto 1fr; }
  .event time { grid-column: 2; }
  .tt-row { grid-template-columns: auto 1fr; }
  .tk-head { flex-wrap: wrap; }
  .tk-head .actions { width: 100%; }
  .tk-compose .btn span { display: none; }
  .cmd-row { grid-template-columns: 1fr auto; }
  .cmd-row .cmd-desc { grid-column: 1 / -1; grid-row: 2; }
  .cmd-sub { padding-left: 0; }
  .cmd-sub.row { grid-template-columns: 1fr; }
  .tt-row .actions { grid-column: 1 / -1; }
  .stat { padding: 16px; }
  .stat .v { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
