/* ==========================================================================
   MeinSeo – Premium SEO Intelligence Design System
   Midnight-Navy · Türkis · Elektrisches Blau · Violett (KI)
   Schrift: Inter (selbst gehostet, optional) → Manrope → Systemschrift
   ========================================================================== */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/InterVariable.woff2") format("woff2"); }

:root {
    /* Flächen */
    --bg: #070B14;
    --bg-2: #0A1020;
    --sidebar: #091120;
    --surface: #101A2D;
    --surface-2: #15223A;
    --surface-hover: #192944;
    --border: #24344D;
    --border-subtle: #1A2940;
    /* Akzente */
    --accent: #20D4D8;
    --accent-2: #12A8B5;
    --accent-soft: rgba(32, 212, 216, .10);
    --accent-line: rgba(32, 212, 216, .35);
    --blue: #548BFF;
    --violet: #A78BFA;
    /* Text */
    --text: #F3F7FF;
    --text-2: #A4B4CC;
    --text-3: #71839F;
    /* Status */
    --success: #38D996;
    --warning: #FFBE5C;
    --danger: #FF6B81;
    --info: #66B7FF;
    --high: #FF8F5C;
    /* Form */
    --radius-xl: 18px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 7px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 12px 32px -12px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .03) inset;
    --shadow-pop: 0 24px 60px -16px rgba(0, 0, 0, .7);
    --ring: 0 0 0 3px rgba(32, 212, 216, .28);
    --font: "Inter", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --sidebar-w: 268px;
    --topbar-h: 64px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--font); font-feature-settings: "cv11", "ss01", "tnum" 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.app::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background: radial-gradient(900px 480px at 82% -8%, rgba(84, 139, 255, .09), transparent 60%), radial-gradient(800px 420px at 12% -10%, rgba(32, 212, 216, .08), transparent 62%); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #6FE6E9; }
h1, h2, h3, h4 { margin: 0 0 .4rem; line-height: 1.25; font-weight: 650; letter-spacing: -.018em; color: var(--text); }
h1 { font-size: 1.62rem; }
h2 { font-size: 1.04rem; letter-spacing: -.01em; }
h3 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .8rem; }
code { font: 12.5px/1.4 var(--mono); background: var(--surface-2); border: 1px solid var(--border-subtle); padding: 1px 6px; border-radius: 6px; color: var(--text); }
hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 18px 0; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.text-good { color: var(--success); }
.text-warn { color: var(--warning); }
.text-bad { color: var(--danger); }
.text-accent { color: var(--accent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre { white-space: pre-line; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(32, 212, 216, .3); }

.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; flex: none; }
.icon-lg { width: 26px; height: 26px; flex: none; }
.icon-xl { width: 40px; height: 40px; flex: none; }

/* ---------- App-Shell ---------- */
.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s var(--ease); }
body.sidebar-collapsed .app-shell { --sidebar-w: 76px; }

.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--border-subtle); z-index: 50; overflow: hidden; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--topbar-h); padding: 0 14px 0 18px; border-bottom: 1px solid var(--border-subtle); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand small { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-top: -2px; }
.collapse-btn { color: var(--text-3); }
.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 12px 18px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-title { padding: 0 12px 6px; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; margin: 1px 0; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: .9rem; white-space: nowrap; transition: background .15s, color .15s; }
.nav-link .icon { color: var(--text-3); transition: color .15s, transform .15s; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link:hover .icon { color: var(--text-2); }
.nav-link.is-active { background: linear-gradient(90deg, rgba(32, 212, 216, .14), rgba(32, 212, 216, .04)); color: var(--text); }
.nav-link.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px rgba(32, 212, 216, .6); }
.nav-link.is-active .icon { color: var(--accent); }
.nav-link.is-planned { cursor: default; opacity: .62; }
.nav-link.is-planned:hover { background: transparent; color: var(--text-2); }
.nav-badge { margin-left: auto; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-3); }
.nav-badge.is-ai { color: var(--violet); border-color: rgba(167, 139, 250, .35); }
.nav-admin .icon { color: var(--warning) !important; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--border-subtle); color: var(--text-3); font-size: .74rem; display: flex; justify-content: space-between; white-space: nowrap; }
body.sidebar-collapsed .nav-link span, body.sidebar-collapsed .nav-badge, body.sidebar-collapsed .nav-title, body.sidebar-collapsed .brand-text, body.sidebar-collapsed .sidebar-foot span { display: none; }
body.sidebar-collapsed .nav-title { display: block; height: 1px; margin: 8px 10px; padding: 0; background: var(--border-subtle); font-size: 0; }
body.sidebar-collapsed .nav-link { justify-content: center; padding: 0; }
body.sidebar-collapsed .sidebar-head { padding: 0; justify-content: center; flex-direction: column; gap: 0; }
.sidebar .collapse-btn-alt { display: none; }
body.sidebar-collapsed .sidebar .collapse-btn { display: none; }
body.sidebar-collapsed .sidebar .collapse-btn-alt { display: inline-grid; }
body.sidebar-collapsed .sidebar-foot { justify-content: center; padding: 10px 0; }
.sidebar-backdrop { display: none; }

/* ---------- Topbar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(7, 11, 20, .78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--border-subtle); }
.menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: .86rem; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.crumbs .icon-sm { opacity: .6; }
.crumbs strong { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-trigger { display: inline-flex; align-items: center; gap: 10px; height: 38px; min-width: 240px; padding: 0 10px 0 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border-subtle); color: var(--text-3); font: inherit; font-size: .86rem; cursor: pointer; transition: border-color .15s, background .15s; }
.search-trigger:hover { border-color: var(--border); background: var(--surface-2); color: var(--text-2); }
.search-trigger kbd, kbd { margin-left: auto; font: 600 .7rem/1 var(--font); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-2); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: var(--surface); color: var(--text); border-color: var(--border-subtle); }
.dot-count { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

/* Workspace-Selector */
.workspace { position: relative; }
.workspace-btn { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 6px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; max-width: 280px; }
.workspace-btn:hover { border-color: var(--border); }
.workspace-btn .ws-avatar { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: .74rem; font-weight: 700; background: linear-gradient(135deg, rgba(32, 212, 216, .25), rgba(84, 139, 255, .25)); color: var(--text); border: 1px solid var(--accent-line); }
.workspace-btn .ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-btn .ws-plan { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px; background: rgba(16, 26, 45, .98); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 60; animation: pop .14s var(--ease); }
.menu-left { left: 0; right: auto; }
.menu-wide { width: 360px; max-width: calc(100vw - 24px); }
.menu-head { padding: 10px 12px 10px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; display: flex; flex-direction: column; min-width: 0; }
.menu-head small { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.menu-label { padding: 8px 12px 4px; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.menu a, .menu button.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-size: .88rem; cursor: pointer; text-align: left; }
.menu a:hover, .menu button.menu-item:hover { background: var(--surface-hover); color: var(--text); }
.menu .icon { color: var(--text-3); }
.menu .is-current { color: var(--accent); }
.menu-foot { border-top: 1px solid var(--border-subtle); margin-top: 4px; padding-top: 4px; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; background: transparent; flex: none; }
.notif-item.unread .dot { background: var(--accent); box-shadow: 0 0 8px rgba(32, 212, 216, .6); }
.notif-item strong { display: block; font-weight: 550; font-size: .86rem; color: var(--text); }
.notif-item small { color: var(--text-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-2), var(--blue)); color: #fff; font-weight: 700; font-size: .84rem; flex: none; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px; border-radius: 99px; border: 1px solid transparent; }
.user-btn:hover { border-color: var(--border-subtle); background: var(--surface); }

.content { position: relative; padding: 28px 32px 48px; max-width: 1480px; width: 100%; }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 18px; border-radius: var(--radius-sm); border: 1px solid rgba(255, 190, 92, .3); background: rgba(255, 190, 92, .07); color: #FFD9A0; font-size: .86rem; }
.banner a { color: var(--warning); font-weight: 600; margin-left: auto; white-space: nowrap; }

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 4px 0 0; }
.page-head .eyebrow { margin-bottom: 8px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* Hero / Begrüßung */
.hero-panel { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 26px 28px; margin-bottom: 22px; border-radius: var(--radius-xl); border: 1px solid var(--border-subtle);
    background: radial-gradient(600px 220px at 100% 0%, rgba(84, 139, 255, .14), transparent 70%), radial-gradient(520px 240px at 0% 100%, rgba(32, 212, 216, .12), transparent 70%), linear-gradient(180deg, var(--surface), var(--bg-2)); }
.hero-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero-panel h1 { font-size: 1.7rem; margin-bottom: 4px; }
.hero-panel p { color: var(--text-2); margin: 0; max-width: 620px; }
.hero-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: var(--text-3); font-size: .82rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-panel .head-actions { position: relative; z-index: 1; }

/* ---------- Karten ---------- */
.card { position: relative; background: linear-gradient(180deg, rgba(21, 34, 58, .55), rgba(16, 26, 45, .9)); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; min-width: 0; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 9px; }
.card-head h2 .icon { color: var(--accent); }
.card-sub { color: var(--text-3); font-size: .82rem; margin: 2px 0 0; }
.card-narrow { max-width: 680px; }
.card-danger { border-color: rgba(255, 107, 129, .3); }
.card-ai { border-color: rgba(167, 139, 250, .28); background: radial-gradient(500px 200px at 100% 0%, rgba(167, 139, 250, .1), transparent 70%), linear-gradient(180deg, rgba(21, 34, 58, .55), rgba(16, 26, 45, .9)); }
.section-title { margin: 22px 0 10px; }

.grid, .grid-2, .grid-3, .grid-main, .grid-side, .grid-audit { display: grid; gap: 20px; margin-bottom: 20px; }
.grid > .card, .grid-2 > .card, .grid-3 > .card, .grid-main > .card, .grid-side > .card, .grid-audit > .card { margin-bottom: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.grid-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.grid-audit { grid-template-columns: 300px minmax(0, 1fr); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border-subtle); background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow); transition: border-color .2s, transform .2s var(--ease); }
.kpi:hover { border-color: var(--border); transform: translateY(-1px); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { color: var(--text-2); font-size: .8rem; font-weight: 550; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(32, 212, 216, .2); }
.kpi-icon.is-blue { background: rgba(84, 139, 255, .1); color: var(--blue); border-color: rgba(84, 139, 255, .22); }
.kpi-icon.is-violet { background: rgba(167, 139, 250, .1); color: var(--violet); border-color: rgba(167, 139, 250, .22); }
.kpi-icon.is-warn { background: rgba(255, 190, 92, .1); color: var(--warning); border-color: rgba(255, 190, 92, .22); }
.kpi-value { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: .95rem; color: var(--text-3); font-weight: 500; margin-left: 3px; letter-spacing: 0; }
.kpi-hint { color: var(--text-3); font-size: .76rem; margin-top: auto; }
.kpi-health { flex-direction: row; align-items: center; gap: 16px; }
.kpi-health .score-ring { --size: 92px; }
.kpi-health-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.delta { white-space: nowrap; align-self: flex-start; display: inline-flex; align-items: center; gap: 3px; font-size: .76rem; font-weight: 650; padding: 1px 7px; border-radius: 99px; }
.delta.up { color: var(--success); background: rgba(56, 217, 150, .1); }
.delta.down { color: var(--danger); background: rgba(255, 107, 129, .1); }
.delta.flat { color: var(--text-2); background: rgba(164, 180, 204, .08); }
.kpi-spark { position: absolute; right: 14px; bottom: 12px; width: 96px; height: 30px; color: var(--accent); opacity: .85; }
.kpi-spark .sparkline { width: 100%; height: 100%; }

/* Schweregrad-Verteilung */
.sev-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-hover); gap: 2px; }
.sev-bar span { display: block; height: 100%; min-width: 3px; }
.sev-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .74rem; color: var(--text-2); }
.sev-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sev-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.bg-critical { background: var(--danger); }
.bg-high { background: var(--high); }
.bg-medium { background: var(--warning); }
.bg-low { background: var(--text-3); }
.bg-info { background: var(--info); }

/* Score-Ring */
.score-ring { --size: 120px; position: relative; width: var(--size); height: var(--size); flex: none; color: var(--text-3); }
.score-ring svg { width: 100%; height: 100%; display: block; }
.score-ring .score-track { fill: none; stroke: var(--surface-hover); stroke-width: 9; }
.score-ring .score-value { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); filter: drop-shadow(0 0 6px currentColor); }
.score-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.score-ring-label strong { font-size: calc(var(--size) * .27); font-weight: 750; letter-spacing: -.04em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.score-ring-label span { font-size: calc(var(--size) * .095); color: var(--text-3); margin-top: 3px; max-width: 80%; line-height: 1.15; }
.score-good { color: var(--success); }
.score-warn { color: var(--warning); }
.score-bad { color: var(--danger); }
.score-muted { color: var(--text-3); }
.score-ring.score-muted .score-value { filter: none; }
.score-pill { display: inline-grid; place-items: center; min-width: 44px; height: 26px; padding: 0 8px; border-radius: 8px; font-weight: 700; font-size: .84rem; font-variant-numeric: tabular-nums; background: var(--surface-2); border: 1px solid var(--border-subtle); }
.score-pill.score-good { background: rgba(56, 217, 150, .1); border-color: rgba(56, 217, 150, .28); }
.score-pill.score-warn { background: rgba(255, 190, 92, .1); border-color: rgba(255, 190, 92, .28); }
.score-pill.score-bad { background: rgba(255, 107, 129, .1); border-color: rgba(255, 107, 129, .28); }

.sparkline { width: 120px; height: 32px; display: block; }

/* Diagramme */
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--border-subtle); stroke-width: 1; stroke-dasharray: 3 5; }
.chart-axis { fill: var(--text-3); font: 11px var(--font); }
.chart-line { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-area { fill: var(--c); opacity: .08; }
.chart-dot { fill: var(--bg); stroke: var(--c); stroke-width: 2.4; cursor: pointer; transition: r .15s; vector-effect: non-scaling-stroke; }
.chart-dot:hover, .chart-dot:focus { r: 6; outline: none; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 10px; border-radius: 9px; background: rgba(10, 16, 32, .96); border: 1px solid var(--border); box-shadow: var(--shadow-pop); font-size: .78rem; color: var(--text-2); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.chart-tip strong { color: var(--text); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 12px 0 0; padding: 0; font-size: .8rem; color: var(--text-2); }
.chart-legend span { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }

/* Integrationsaufforderung */
.integration { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.integration-icons { display: flex; gap: 8px; }
.integration-icons span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface-2); color: var(--blue); }
.metric-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-list li { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--border); color: var(--text-3); font-size: .8rem; }
.metric-list li strong { display: block; color: var(--text-2); font-weight: 600; }

/* Fortschritt */
.progress { height: 6px; background: var(--surface-hover); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .8s var(--ease); }
.progress > span.is-warn { background: var(--warning); }
.progress > span.is-bad { background: var(--danger); }
.progress-lg { height: 10px; margin: 14px 0; }
.progress-indeterminate > span { width: 35% !important; animation: indeterminate 1.4s ease-in-out infinite; }
@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.progress-card { border-color: var(--accent-line); }
.progress-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.usage { margin-bottom: 16px; }
.usage-head { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; color: var(--text-2); margin-bottom: 6px; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; color: var(--text-3); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(25, 41, 68, .45); }
.table tr.is-selected td { background: var(--accent-soft); }
.table-compact td { padding: 9px 12px; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-main { display: flex; flex-direction: column; min-width: 0; }
.cell-main strong { font-weight: 600; color: var(--text); }
.cell-main small { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.truncate { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.truncate-lg { max-width: 560px; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* Badges & Status */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 650; white-space: nowrap; border: 1px solid transparent; line-height: 1.6; }
.badge-critical { background: rgba(255, 107, 129, .12); color: var(--danger); border-color: rgba(255, 107, 129, .3); }
.badge-high { background: rgba(255, 143, 92, .12); color: var(--high); border-color: rgba(255, 143, 92, .3); }
.badge-medium { background: rgba(255, 190, 92, .1); color: var(--warning); border-color: rgba(255, 190, 92, .28); }
.badge-low { background: rgba(164, 180, 204, .08); color: var(--text-2); border-color: rgba(164, 180, 204, .2); }
.badge-info { background: rgba(102, 183, 255, .1); color: var(--info); border-color: rgba(102, 183, 255, .28); }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge-ai { background: rgba(167, 139, 250, .1); color: var(--violet); border-color: rgba(167, 139, 250, .3); }
.badge-proof { background: rgba(56, 217, 150, .08); color: var(--success); border-color: rgba(56, 217, 150, .25); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.status-queued { color: var(--text-2); }
.status-running { color: var(--accent); }
.status-running::before { animation: blink 1.4s ease-in-out infinite; }
.status-completed { color: var(--success); }
.status-failed { color: var(--danger); }
.status-canceled { color: var(--text-3); }
.status-paused { color: var(--warning); }
@keyframes blink { 50% { opacity: .35; } }

/* Listen */
.plain-list, .notice-list, .task-list, .issue-list, .activity, .steps-list, .category-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 7px 0; }
.severity-list { list-style: none; margin: 0; padding: 0; }
.severity-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-subtle); }
.severity-list li:last-child { border-bottom: 0; }
.notice-list li { padding: 12px 0 12px 16px; border-bottom: 1px solid var(--border-subtle); position: relative; display: flex; flex-direction: column; gap: 2px; }
.notice-list li.unread::before { content: ""; position: absolute; left: 0; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.notice-list p { margin: 2px 0; }
.task-list li { padding: 9px 0; border-bottom: 1px solid var(--border-subtle); display: flex; gap: 10px; align-items: baseline; }

/* Aktivität (Timeline) */
.activity li { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.activity li:last-child { padding-bottom: 0; }
.activity li::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 1px; background: var(--border-subtle); }
.activity li:last-child::before { display: none; }
.activity-icon { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; flex: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.activity-icon.is-running { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.activity-icon.is-done { color: var(--success); border-color: rgba(56, 217, 150, .3); background: rgba(56, 217, 150, .08); }
.activity-icon.is-failed { color: var(--danger); border-color: rgba(255, 107, 129, .3); background: rgba(255, 107, 129, .08); }
.activity-body { min-width: 0; flex: 1; }
.activity-body > a, .activity-body > strong { font-weight: 600; color: var(--text); }
.activity-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--text-3); font-size: .78rem; margin-top: 2px; }
.activity-body .progress { margin-top: 8px; }

/* Nächste Schritte */
.steps-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.steps-list li:first-child { padding-top: 4px; }
.steps-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.step-rank { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .84rem; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.step-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.step-title strong { font-weight: 600; }
.step-text { color: var(--text-2); font-size: .85rem; margin: 6px 0 0; }
.step-benefit { display: flex; gap: 6px; align-items: flex-start; color: var(--success); font-size: .8rem; margin-top: 6px; }
.step-meta { color: var(--text-3); font-size: .78rem; margin-top: 4px; }

/* Issues */
.issue { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.issue:last-child { border-bottom: 0; }
.issue-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.issue-main > div { min-width: 0; }
.issue-main .badge { margin-top: 1px; }
.issue-url { display: block; font-size: .84rem; overflow-wrap: anywhere; margin-top: 2px; }
.issue-details { color: var(--text-2); font-size: .84rem; margin: 6px 0 0; overflow-wrap: anywhere; }
.issue-rec { margin-top: 8px; font-size: .85rem; }
.issue-rec summary { cursor: pointer; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; list-style: none; font-weight: 550; }
.issue-rec summary::-webkit-details-marker { display: none; }
.issue-rec summary .icon-sm { transition: transform .15s; }
.issue-rec[open] summary .icon-sm { transform: rotate(90deg); }
.issue-rec .rec-box { margin-top: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border-subtle); color: var(--text-2); }
.issue-rec .rec-box p { margin: 0 0 6px; }
.issue-rec .rec-box p:last-child { margin: 0; }

/* Audit-Kategorien */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.category { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text); transition: border-color .15s, background .15s, transform .15s var(--ease); }
a.category:hover { border-color: var(--border); background: var(--surface-hover); color: var(--text); transform: translateY(-1px); }
.category.is-active { border-color: var(--accent-line); background: var(--accent-soft); }
.category .cat-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-2); border: 1px solid var(--border-subtle); }
.category .cat-body { min-width: 0; display: flex; flex-direction: column; }
.category .cat-body strong { font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category .cat-body small { font-size: .74rem; color: var(--text-3); }
.category.is-ok .cat-icon { color: var(--success); }
.category.is-issues .cat-icon { color: var(--warning); }
.category.is-critical .cat-icon { color: var(--danger); }
.category.is-unchecked { opacity: .55; border-style: dashed; }
.category.is-unchecked .cat-icon { color: var(--text-3); }

/* Filterleiste */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filter-bar .search-input { flex: 1 1 260px; position: relative; }
.filter-bar .search-input .icon-sm { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.filter-bar .search-input input { padding-left: 36px; }
.filter-bar select { width: auto; min-width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text-2); font-size: .8rem; font-weight: 550; }
.chip:hover { color: var(--text); border-color: var(--border); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.chip .count { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Vergleich */
.compare-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.compare-grid > * { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text); }
.compare-grid a:hover { border-color: var(--border); background: var(--surface-hover); color: var(--text); }
.compare-grid .is-active { border-color: var(--accent-line); background: var(--accent-soft); }
.compare-grid strong { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.stat-list { margin: 0; }
.stat-list div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-subtle); }
.stat-list div:last-child { border-bottom: 0; }
.stat-list dt { color: var(--text-2); }
.stat-list dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 10px 14px; color: var(--text-2); font-weight: 550; font-size: .87rem; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding-top: 18px; color: var(--text-3); font-size: .85rem; }
.pagination a { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-subtle); color: var(--text-2); }
.pagination a:hover { border-color: var(--border); color: var(--text); }

/* Empty States */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 44px 20px; color: var(--text-2); }
.empty-mark { position: relative; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: var(--accent); background: radial-gradient(circle at 30% 20%, rgba(32, 212, 216, .2), rgba(84, 139, 255, .06)); border: 1px solid var(--accent-line); }
.empty-mark::after { content: ""; position: absolute; inset: -9px; border-radius: 28px; border: 1px dashed var(--border); }
.empty h3 { margin: 6px 0 0; font-size: 1.05rem; }
.empty p { max-width: 460px; margin: 0; }
.empty-sm { padding: 24px 12px; }

/* Pläne */
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plan { margin-bottom: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-current { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line) inset, var(--shadow); }
.plan-price { font-size: 1.8rem; font-weight: 750; letter-spacing: -.03em; }
.plan-price small { font-size: .85rem; color: var(--text-3); font-weight: 500; }
.check-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; color: var(--text-2); }
.check-list li { display: flex; gap: 8px; align-items: center; }
.check-list .icon-sm { color: var(--accent); }

/* Toasts */
.toasts { position: fixed; top: calc(var(--topbar-h) + 12px); right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: var(--radius); background: rgba(16, 26, 45, .98); border: 1px solid var(--border); box-shadow: var(--shadow-pop); font-size: .88rem; animation: toast-in .28s var(--ease); }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: var(--success); }
.toast-error { border-color: rgba(255, 107, 129, .4); }
.toast-error .icon { color: var(--danger); }
.toast-info .icon { color: var(--info); }
.toast-warning .icon { color: var(--warning); }
.toast-body { flex: 1; color: var(--text); }
.toast-close { background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 0; display: grid; }
.toast-close:hover { color: var(--text); }
.toast.is-leaving { animation: toast-out .22s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* Inline-Hinweise */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; border: 1px solid; font-size: .88rem; }
.alert .icon { margin-top: 1px; }
.alert-success { background: rgba(56, 217, 150, .07); border-color: rgba(56, 217, 150, .3); color: #B5F3D7; }
.alert-error { background: rgba(255, 107, 129, .07); border-color: rgba(255, 107, 129, .32); color: #FFC9D2; }
.alert-info { background: rgba(102, 183, 255, .07); border-color: rgba(102, 183, 255, .3); color: #C4E2FF; }
.alert-warning { background: rgba(255, 190, 92, .07); border-color: rgba(255, 190, 92, .3); color: #FFDDA8; }
.alert-link { color: inherit; }
.alert-link:hover { color: inherit; filter: brightness(1.15); }

/* Dialoge */
dialog { padding: 0; border: 0; background: transparent; color: var(--text); max-width: calc(100vw - 32px); }
dialog::backdrop { background: rgba(3, 6, 12, .66); backdrop-filter: blur(4px); }
.dialog { width: 440px; max-width: 100%; padding: 24px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); animation: pop .18s var(--ease); }
.dialog h2 { font-size: 1.1rem; }
.dialog p { color: var(--text-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* Kommandozentrale */
.palette { width: 640px; max-width: 100%; margin-top: 12vh; border-radius: var(--radius-xl); background: rgba(16, 26, 45, .98); border: 1px solid var(--border); box-shadow: var(--shadow-pop), 0 0 0 1px rgba(32, 212, 216, .08); overflow: hidden; animation: pop .16s var(--ease); }
dialog.palette-dialog { margin: 0 auto; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border-subtle); }
.palette-input .icon { color: var(--accent); }
.palette-input input { flex: 1; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 1rem; padding: 0; outline: none; box-shadow: none; }
.palette-list { max-height: min(60vh, 440px); overflow-y: auto; padding: 8px; }
.palette-group { padding: 10px 10px 4px; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.palette-item .icon { color: var(--text-3); }
.palette-item small { color: var(--text-3); margin-left: auto; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.palette-item.is-active { background: var(--surface-hover); }
.palette-item.is-active .icon { color: var(--accent); }
.palette-empty { padding: 26px; text-align: center; color: var(--text-3); font-size: .88rem; }
.palette-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--border-subtle); color: var(--text-3); font-size: .74rem; }
.palette-foot kbd { margin: 0 4px 0 0; }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-2); min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Tooltips */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 6px 9px; border-radius: 8px; background: #0A1020; border: 1px solid var(--border); color: var(--text-2); font-size: .74rem; font-weight: 500; white-space: nowrap; z-index: 80; pointer-events: none; box-shadow: var(--shadow-pop); }
.sidebar [data-tooltip]:hover::after { display: none; }
body.sidebar-collapsed .sidebar [data-tooltip]:hover::after { display: block; left: calc(100% + 10px); bottom: auto; top: 50%; transform: translateY(-50%); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-size: .84rem; font-weight: 550; color: var(--text); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label-link { font-weight: 500; font-size: .8rem; }
.optional { color: var(--text-3); font-weight: 400; font-size: .76rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
    width: 100%; height: 40px; background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; font: inherit; font-size: .9rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: #2E4262; }
select { padding-right: 34px; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371839F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 10px center; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: #0B1326; }
input:disabled, input[readonly] { opacity: .7; }
.field-error { color: var(--danger); font-size: .8rem; margin: 0; display: flex; gap: 5px; align-items: center; }
.hint { color: var(--text-3); font-size: .8rem; margin: 0; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text-2); justify-content: flex-start; }
.checkbox input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.inline-form select { width: auto; height: 34px; font-size: .84rem; }
.form-inline-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.form-inline-grid.three { grid-template-columns: minmax(0, 1fr) 180px auto; }
.search-form { display: flex; gap: 10px; margin-bottom: 18px; max-width: 560px; }
.steps { padding-left: 20px; color: var(--text-2); }
.steps li { margin-bottom: 10px; }
.secret-key code { display: inline-block; margin: 8px 0; padding: 8px 12px; font-size: 1rem; letter-spacing: .08em; }
.recovery-codes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.recovery-codes code { text-align: center; padding: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--radius-sm); font: inherit; font-weight: 600; font-size: .875rem; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, #2BDDE1, var(--accent-2)); color: #04161A; box-shadow: 0 8px 22px -10px rgba(32, 212, 216, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { background: linear-gradient(180deg, #4BE6E9, #19B9C5); color: #04161A; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-hover); border-color: #34496B; color: var(--text); }
.btn-quiet { background: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--danger); color: #2A0710; }
.btn-danger:hover { background: #FF8597; color: #2A0710; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: rgba(255, 107, 129, .35); }
.btn-danger-ghost:hover { background: rgba(255, 107, 129, .08); color: var(--danger); }
.btn-sm { height: 32px; padding: 0 11px; font-size: .8rem; border-radius: 8px; }
.btn-xs { height: 28px; padding: 0 9px; font-size: .76rem; border-radius: 7px; gap: 5px; }
.btn-xs .icon { width: 14px; height: 14px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; padding: 0; }
.btn[disabled], .btn.is-loading { opacity: .65; cursor: progress; }
.link { font-size: .85rem; font-weight: 550; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Gastbereich ---------- */
body.guest { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
.guest-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(800px 420px at 25% -5%, rgba(32, 212, 216, .16), transparent 62%), radial-gradient(700px 400px at 85% 5%, rgba(84, 139, 255, .13), transparent 60%), radial-gradient(600px 300px at 60% 110%, rgba(167, 139, 250, .07), transparent 60%); }
.guest-grid { position: fixed; inset: 0; pointer-events: none; z-index: 0; background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); }
.guest-header { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 18px 32px; max-width: 1240px; width: 100%; margin: 0 auto; }
.guest-nav { display: flex; align-items: center; gap: 10px; }
.guest-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 28px 20px 64px; }
.guest-footer { position: relative; z-index: 1; display: flex; gap: 20px; justify-content: center; padding: 22px; color: var(--text-3); font-size: .8rem; border-top: 1px solid var(--border-subtle); }
.guest-footer a { color: var(--text-2); }
.auth-card { width: 100%; max-width: 440px; padding: 34px; border-radius: var(--radius-xl); background: rgba(16, 26, 45, .82); border: 1px solid var(--border); box-shadow: var(--shadow-pop); backdrop-filter: blur(12px); animation: rise .4s var(--ease); }
.auth-card h1 { font-size: 1.45rem; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-foot { margin: 22px 0 0; text-align: center; color: var(--text-2); font-size: .86rem; line-height: 1.9; }
.auth-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }

.landing { width: 100%; max-width: 1180px; }
.landing-hero { text-align: center; padding: 44px 0 36px; }
.landing-hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); letter-spacing: -.04em; line-height: 1.06; margin: 18px auto; max-width: 860px; }
.gradient-text { background: linear-gradient(92deg, var(--accent) 10%, var(--blue) 60%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.1rem; color: var(--text-2); max-width: 640px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 99px; border: 1px solid var(--border); background: rgba(16, 26, 45, .7); font-size: .8rem; color: var(--text-2); }
.pill b { padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: .7rem; letter-spacing: .06em; }
.preview { position: relative; margin: 48px auto 0; max-width: 980px; padding: 14px; border-radius: 22px; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(21, 34, 58, .7), rgba(10, 16, 32, .9)); box-shadow: var(--shadow-pop), 0 0 120px -40px rgba(32, 212, 216, .35); }
.preview-inner { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 14px; text-align: left; }
.preview-card { padding: 16px; border-radius: 14px; border: 1px solid var(--border-subtle); background: var(--surface); }
.preview-card h4 { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.preview-tag { position: absolute; top: -12px; right: 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; text-align: left; }
.feature { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border-subtle); background: rgba(16, 26, 45, .7); }
.feature .kpi-icon { margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--text-2); font-size: .9rem; margin: 0; }

.error-page { text-align: center; padding: 60px 20px; max-width: 520px; margin: 0 auto; }
.error-code { font-size: 5rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; }

/* ---------- Bewegung ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.reveal { animation: rise .45s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .05s; }
.reveal:nth-child(3) { animation-delay: .1s; }
.reveal:nth-child(4) { animation-delay: .15s; }
.reveal:nth-child(5) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
    .grid-audit, .grid-side { grid-template-columns: 1fr; }
    .search-trigger { min-width: 0; }
    .search-trigger .search-label { display: none; }
}
@media (max-width: 960px) {
    .app-shell, body.sidebar-collapsed .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; width: 284px; transform: translateX(-102%); transition: transform .24s var(--ease); box-shadow: var(--shadow-pop); }
    body.sidebar-collapsed .sidebar .nav-link span, body.sidebar-collapsed .sidebar .nav-badge, body.sidebar-collapsed .sidebar .brand-text, body.sidebar-collapsed .sidebar .sidebar-foot span { display: initial; }
    body.sidebar-collapsed .nav-title { display: block; height: auto; margin: 0; padding: 0 12px 6px; background: none; font-size: .66rem; }
    body.sidebar-collapsed .nav-link { justify-content: flex-start; padding: 0 12px; }
    body.sidebar-collapsed .sidebar-head { flex-direction: row; justify-content: space-between; padding: 0 14px 0 18px; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(3, 6, 12, .6); backdrop-filter: blur(2px); }
    .collapse-btn, .collapse-btn-alt { display: none !important; }
    .menu-btn { display: inline-grid; }
    .topbar { padding: 0 14px; gap: 8px; }
    .crumbs { display: none; }
    .content { padding: 20px 16px 40px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .preview-inner { grid-template-columns: 1fr; }
    .workspace-btn { max-width: 46vw; }
    .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .kpi-grid, .plan-grid { grid-template-columns: 1fr; }
    .field-row, .form-inline-grid, .form-inline-grid.three { grid-template-columns: 1fr; }
    .issue { flex-direction: column; }
    .hero-panel { padding: 20px; }
    .hero-panel h1 { font-size: 1.35rem; }
    .guest-header { padding: 16px; }
    .auth-card { padding: 26px 20px; }
    h1 { font-size: 1.35rem; }
    .kpi-value { font-size: 1.7rem; }
    .workspace-btn .ws-plan { display: none; }
    .workspace-btn { max-width: 52vw; gap: 8px; }
    .search-trigger { width: 38px; min-width: 38px; padding: 0; justify-content: center; }
    .search-trigger kbd { display: none; }
    .topbar-right { gap: 4px; }
    .banner { flex-wrap: wrap; }
    .banner a { margin-left: 30px; }
    .hero-panel .head-actions { width: 100%; }
    .hero-panel .head-actions .btn { flex: 1 1 auto; }
    .recovery-codes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps-list li { grid-template-columns: auto minmax(0, 1fr); }
    .steps-list li > .btn { grid-column: 2; justify-self: start; }
    /* Tabellen als Karten */
    .table-cards thead { display: none; }
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
    .table-cards tr { padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
    .table-cards td { border: 0; padding: 4px 0; text-align: left !important; }
    .table-cards td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 120px; color: var(--text-3); font-size: .76rem; }
    .table-cards .row-actions { justify-content: flex-start; margin-top: 6px; }
    .palette { margin-top: 6vh; }
}

/* KI-Antworten */
.ai-output { color: var(--text); line-height: 1.7; }
.ai-output h2, .ai-output h3, .ai-output h4 { margin: 20px 0 8px; }
.ai-output h2 { font-size: 1.12rem; }
.ai-output h3 { font-size: 1rem; }
.ai-output ul, .ai-output ol { padding-left: 22px; margin: 0 0 12px; }
.ai-output li { margin-bottom: 4px; }
.ai-output p { color: var(--text-2); }
.ai-output strong { color: var(--text); }
.ai-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: .74rem; font-weight: 650; color: var(--violet); background: rgba(167, 139, 250, .1); border: 1px solid rgba(167, 139, 250, .3); }
.task-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.task-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.task-tile:hover { border-color: rgba(167, 139, 250, .4); background: var(--surface-hover); }
.task-tile input { position: absolute; opacity: 0; }
.task-tile:has(input:checked) { border-color: var(--violet); background: rgba(167, 139, 250, .08); box-shadow: 0 0 0 1px rgba(167, 139, 250, .4) inset; }
.task-tile .icon { color: var(--violet); }
.task-tile strong { font-size: .9rem; }
.task-tile small { color: var(--text-3); line-height: 1.4; }
.metric-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.metric-card { padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); background: var(--surface); }
.metric-card span { display: block; font-size: .74rem; color: var(--text-3); }
.metric-card strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.lh-scores { display: flex; gap: 18px; flex-wrap: wrap; }
.lh-scores .lh { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .76rem; color: var(--text-2); }
