/* =============================================================================
   VTUSO Security — Website & Dashboard
   Ohne Build-Schritt: reines CSS, Schriften lokal (DSGVO).
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0d17;
  --bg-2: #0f1220;
  --surface: #12152a;
  --surface-2: #161a33;
  --surface-3: #1c2142;
  --line: rgba(64, 72, 125, 0.45);
  --line-soft: rgba(64, 72, 125, 0.25);
  --text: #eceefb;
  --text-2: #c4c8e6;
  --muted: #9aa0c7;
  --faint: #6c7299;
  --accent: #7c5cff;
  --accent-2: #9077ff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --accent-line: rgba(124, 92, 255, 0.45);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --ok: #2ecc71;
  --ok-soft: rgba(46, 204, 113, 0.12);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, 0.13);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.13);
  --pro: #ffb400;
  --ultra: #a78bfa;
  --shadow: 0 10px 40px rgba(3, 4, 12, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #f6f7fb;
  --bg-2: #eef0f8;
  --surface: #ffffff;
  --surface-2: #f7f8fd;
  --surface-3: #eef0fa;
  --line: rgba(110, 118, 170, 0.28);
  --line-soft: rgba(110, 118, 170, 0.16);
  --text: #141733;
  --text-2: #2c3157;
  --muted: #5b6185;
  --faint: #8a90b0;
  --accent-soft: rgba(124, 92, 255, 0.1);
  --cyan-soft: rgba(8, 145, 178, 0.1);
  --cyan: #0891b2;
  --shadow: 0 10px 30px rgba(20, 23, 51, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: #b9a8ff; text-decoration: none; }
a:hover { color: #d6ccff; }
:root[data-theme='light'] a { color: #5b3fe0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(124, 92, 255, 0.35); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Layout ---------------------------------------------------------------- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.page-bg { position: relative; overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
.page-bg > main { flex: 1; }
.page-bg::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 900px; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
:root[data-theme='light'] .page-bg::before {
  background-image: linear-gradient(rgba(20,23,51,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(20,23,51,.05) 1px, transparent 1px);
}
.page-bg::after {
  content: ''; position: absolute; top: -260px; left: 50%; width: 1100px; height: 620px; transform: translateX(-50%);
  pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(124,92,255,.20), rgba(34,211,238,.05) 60%, transparent);
}
.page-bg > * { position: relative; z-index: 1; }

/* --- Kopfzeile -------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand span.sub { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent-line); }
.menu-toggle { display: none; }

/* --- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 550; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--accent-line); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: #fff; box-shadow: 0 6px 22px rgba(124, 92, 255, 0.35); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); border-color: transparent; }
.btn-danger { background: var(--bad); border-color: transparent; color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.08); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn .spin { width: 14px; height: 14px; }

/* --- Karten & Typo ---------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-tight { padding: 16px; }
.card h3 { font-size: 16px; font-weight: 600; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ultra); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.lead { font-size: 17px; color: var(--text-2); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 24px; }
hr.sep { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); white-space: nowrap;
}
.badge-free { color: var(--muted); }
.badge-pro { color: var(--pro); border-color: rgba(255,180,0,.4); background: rgba(255,180,0,.1); }
.badge-ultra { color: var(--ultra); border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.12); }
.badge-ok { color: var(--ok); border-color: rgba(46,204,113,.4); background: var(--ok-soft); }
.badge-warn { color: var(--warn); border-color: rgba(245,165,36,.4); background: var(--warn-soft); }
.badge-bad { color: var(--bad); border-color: rgba(239,68,68,.4); background: var(--bad-soft); }
.badge-accent { color: #c9bbff; border-color: var(--accent-line); background: var(--accent-soft); }
.badge-cyan { color: var(--cyan); border-color: rgba(34,211,238,.4); background: var(--cyan-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.dot.live { animation: pulse 1.6s infinite; }
.dot.off { background: var(--faint); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }

/* --- Startseite ------------------------------------------------------------- */
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.2vw, 62px); font-weight: 650; letter-spacing: -0.035em; }
.hero .lead { margin-top: 18px; max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.hero-checks span::before { content: '✓ '; color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--text-2); }
.preview { border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), 0 0 0 1px rgba(124,92,255,.08); padding: 18px; }
.preview-events .ev { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 10px; font-size: 13px; animation: fadeIn .4s ease; }
.preview-events .ev + .ev { margin-top: 8px; }
.preview-events .ev .tag { margin-left: auto; color: var(--faint); font-size: 12px; }
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.stat-band > div { padding: 22px 24px; }
.stat-band > div + div { border-left: 1px solid var(--line-soft); }
.stat-band .num { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-band .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }
.section { padding: 88px 0 0; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 620; margin-top: 10px; }
.section-head p { margin-top: 12px; color: var(--muted); }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.feature-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .2s, border-color .2s; }
.feature-card:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.feature-card .ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: #c9bbff; margin-bottom: 14px; }
.feature-card h3 { font-size: 15.5px; font-weight: 600; }
.feature-card p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.demo { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.demo-tabs button { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text); }
.demo-tabs button small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.demo-tabs button.active { background: var(--surface); border-color: var(--line); }
.demo-stage { min-height: 300px; }
.cta-box { margin: 96px 0 0; padding: 56px 24px; text-align: center; border-radius: 22px; border: 1px solid var(--line); background: radial-gradient(ellipse at top, rgba(124,92,255,.22), transparent 65%), var(--surface); }
.cta-box h2 { font-size: clamp(28px, 3.6vw, 42px); }
.faq details { border-bottom: 1px solid var(--line-soft); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 550; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--muted); }
.faq details[open] summary::after { content: '×'; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* --- Preise ----------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.plan.popular { border-color: rgba(255,180,0,.45); box-shadow: 0 0 0 1px rgba(255,180,0,.15), var(--shadow); }
.plan.ultra { border-color: rgba(167,139,250,.45); }
.plan .price { font-size: 34px; font-weight: 650; letter-spacing: -0.03em; margin-top: 14px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan .price s { color: var(--faint); font-size: 18px; margin-right: 6px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; flex: 1; }
.plan li { padding: 5px 0 5px 24px; position: relative; font-size: 14px; color: var(--text-2); }
.plan li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 550; font-size: 13.5px; }
.seg button.active { background: var(--accent); color: #fff; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.compare th { color: var(--muted); font-weight: 550; font-size: 13px; }
.compare td.c, .compare th.c { text-align: center; }
.compare tr.cat td { color: var(--ultra); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 22px; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--faint); }
.sale-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: linear-gradient(90deg, rgba(239,68,68,.16), rgba(245,165,36,.16)); border: 1px solid rgba(245,165,36,.35); font-weight: 550; }

/* --- Footer ----------------------------------------------------------------- */
.footer { margin-top: 96px; border-top: 1px solid var(--line-soft); padding: 40px 0 48px; color: var(--muted); font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer h4 { color: var(--text); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.footer a { color: var(--muted); display: block; padding: 3px 0; }
.footer a:hover { color: var(--text); }
.app .footer { margin-top: 40px; padding: 24px 0; }
.app .footer-grid { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.app .footer a { display: inline; }
.footer .brand { display: flex; color: var(--text); padding: 0; }

/* --- Dashboard-Layout -------------------------------------------------------- */
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { border-right: 1px solid var(--line-soft); padding: 16px 12px 40px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.guild-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; color: var(--text); }
.guild-switch:hover { border-color: var(--accent-line); }
.guild-switch .meta { min-width: 0; flex: 1; }
.guild-switch strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-weight: 650; font-size: 13px; color: var(--text-2); flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.round { border-radius: 50%; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 14px; }
.side-group { margin-top: 18px; }
.side-group h5 { margin: 0 0 6px 10px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-size: 14px; }
.side-link svg { color: var(--muted); flex-shrink: 0; }
.side-link:hover { background: var(--surface); color: var(--text); }
.side-link.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.side-link.active svg { color: #c9bbff; }
.side-link .badge { margin-left: auto; height: 18px; font-size: 10.5px; padding: 0 6px; }
.content { padding: 28px 32px 40px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 640; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 680px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px; font-size: 14px; }
.banner.bad { border-color: rgba(239,68,68,.45); background: var(--bad-soft); }
.banner.warn { border-color: rgba(245,165,36,.45); background: var(--warn-soft); }
.banner.info { border-color: var(--accent-line); background: var(--accent-soft); }
.banner .grow { flex: 1; }
.kpi { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.kpi .lbl { color: var(--muted); font-size: 12.5px; }
.kpi .num { font-size: 26px; font-weight: 640; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--faint); font-size: 12px; margin-top: 2px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 550; font-size: 14px; }
.list-row .sub { color: var(--muted); font-size: 12.5px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { margin: 0 auto 10px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.score-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring .grade { font-size: 34px; font-weight: 700; line-height: 1; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.check-row:last-child { border-bottom: 0; }
.check-row .st { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; margin-top: 1px; }
.check-row .st.ok { background: var(--ok-soft); color: var(--ok); }
.check-row .st.bad { background: var(--bad-soft); color: var(--bad); }
.panic { border: 1px solid rgba(239,68,68,.45); background: linear-gradient(135deg, rgba(239,68,68,.16), rgba(239,68,68,.04)); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { color: var(--muted); font-weight: 550; font-size: 12.5px; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; color: var(--muted); cursor: pointer; font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.locked { position: relative; }
.lock-overlay { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1px dashed rgba(255,180,0,.45); background: rgba(255,180,0,.06); margin-bottom: 16px; }
.lock-overlay .grow { flex: 1; }

/* --- Formulare -------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field .label { font-size: 13.5px; font-weight: 550; color: var(--text-2); }
.field .help { font-size: 12.5px; color: var(--faint); }
.field .err { font-size: 12.5px; color: var(--bad); }
.field.invalid .input, .field.invalid .picker { border-color: rgba(239,68,68,.7); }
.input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); outline: none; transition: border-color .15s;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-color { display: flex; gap: 8px; align-items: center; }
.input-color input[type='color'] { width: 42px; height: 40px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--bg-2); }
.switch-row .txt strong { display: block; font-size: 14px; font-weight: 550; }
.switch-row .txt span { color: var(--faint); font-size: 12.5px; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.picker { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); min-height: 40px; padding: 5px 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; cursor: text; }
.picker:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.picker input { border: 0; background: none; outline: none; flex: 1; min-width: 120px; padding: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 9px; border-radius: 7px; background: var(--surface-3); font-size: 13px; max-width: 100%; }
.chip .x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 3px; font-size: 15px; line-height: 1; }
.chip .x:hover { color: var(--bad); }
.chip .swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.picker-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); padding: 4px; }
.picker-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-size: 13.5px; }
.picker-menu button:hover, .picker-menu button.hl { background: var(--accent-soft); color: var(--text); }
.picker-menu .grp { padding: 8px 10px 4px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.rows-editor .item { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; background: var(--bg-2); }
.rows-editor .item + .item { margin-top: 10px; }
.savebar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; margin-top: 22px; border-radius: 14px; border: 1px solid var(--accent-line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow); animation: fadeIn .2s ease; }
.savebar .grow { flex: 1; font-size: 14px; }
.preview-discord { border-radius: 10px; background: #313338; color: #dbdee1; padding: 14px; font-size: 14px; }
:root[data-theme='light'] .preview-discord { background: #f2f3f5; color: #2e3338; }
.preview-discord .embed { border-left: 4px solid var(--accent); background: rgba(0,0,0,.18); border-radius: 4px; padding: 10px 12px; margin-top: 6px; word-break: break-word; }

/* --- Server-Auswahl ---------------------------------------------------------- */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guild-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: transform .15s, border-color .15s; }
.guild-card:hover { transform: translateY(-2px); border-color: var(--accent-line); color: var(--text); }
.guild-card.nobot { opacity: .85; border-style: dashed; }

/* --- Overlays ---------------------------------------------------------------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 14px; animation: fadeIn .2s ease; display: flex; gap: 10px; align-items: flex-start; }
.toast.ok { border-color: rgba(46,204,113,.5); }
.toast.bad { border-color: rgba(239,68,68,.55); }
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(5, 6, 14, .6); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fadeIn .15s ease; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); padding: 22px; }
.modal h3 { font-size: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.boot { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }

/* --- Diagramme --------------------------------------------------------------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart text { fill: var(--faint); font-size: 11px; font-family: var(--mono); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.hbar .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hbar .bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.heat div { aspect-ratio: 1; border-radius: 4px; background: var(--accent); }

/* --- Ergänzungen ------------------------------------------------------------- */
.checklist { list-style: none; padding: 0; margin: 14px 0 0; }
.checklist li { padding: 5px 0 5px 24px; position: relative; color: var(--text-2); }
.checklist li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-side { position: sticky; top: 84px; }
.top-actions .btn .avatar { width: 24px; height: 24px; font-size: 10px; }
button.side-link { text-align: left; color: var(--text-2); }
.preview-discord { --dc-strong: #f2f3f5; }
:root[data-theme='light'] .preview-discord { --dc-strong: #060607; }
.tabs::-webkit-scrollbar { height: 0; }
.show-sm, .l-short { display: none; }
.guild-switch svg:last-child { color: var(--muted); flex-shrink: 0; }
.kpi .num .small { font-size: 13px; }
.chip input { margin: 0 4px 0 0; }
.seg { max-width: 100%; overflow-x: auto; }
details > summary::-webkit-details-marker { display: none; }

/* --- Responsiv --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-side { position: static; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 48px; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: 64px; left: 0; bottom: 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform .2s; background: var(--bg); height: auto; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-toggle { display: inline-grid; }
  .content { padding: 22px 16px 32px; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
  .plans, .g3 { grid-template-columns: minmax(0, 1fr); }
  .g3 > [style*="grid-column:span 2"] { grid-column: auto !important; }
  .demo { grid-template-columns: minmax(0, 1fr); }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .stat-band > div:nth-child(3) { border-left: 0; }
  .stat-band > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .g2, .g4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .score-wrap { flex-wrap: wrap; justify-content: center; }
  .top-actions .hide-sm { display: none; }
  .topbar-inner { gap: 10px; }
  .brand { font-size: 15px; gap: 8px; }
  .l-long { display: none; }
  .l-short { display: inline; }
  .nav.open .show-sm { display: block; }
  .hero h1 { font-size: 36px; }
  .page-head h1 { font-size: 22px; }
  .brand span.sub { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .savebar { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .page-bg .top-actions [data-action='theme'] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
