/* ==========================================================================
   Designsystem – dunkles Theme mit roten Akzenten
   Farben werden über Branding-Einstellungen (Inline-:root im Layout) überschrieben.
   ========================================================================== */
:root {
  --c-primary: #e11d2e;
  --c-accent: #ff4757;
  --c-bg: #0b0b0d;
  --c-bg-2: #111114;
  --c-surface: #16161a;
  --c-surface-2: #1d1d22;
  --c-surface-3: #26262d;
  --c-border: #2a2a31;
  --c-border-strong: #3a3a43;
  --c-text: #f2f2f4;
  --c-text-2: #b4b4bd;
  --c-muted: #8f8f9a;
  --c-success: #22c55e;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;
  --c-info: #3b82f6;
  --c-primary-soft: color-mix(in srgb, var(--c-primary) 14%, transparent);
  --c-primary-line: color-mix(in srgb, var(--c-primary) 45%, transparent);
  --glow: 0 0 0 1px var(--c-primary-line), 0 0 24px color-mix(in srgb, var(--c-primary) 28%, transparent);
  --glow-sm: 0 0 14px color-mix(in srgb, var(--c-primary) 35%, transparent);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1240px;
  --header-h: 64px;
  color-scheme: dark;
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.6 var(--font); color: var(--c-text); background: var(--c-bg);
  background-image: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--c-primary) 12%, transparent), transparent 60%);
  background-attachment: fixed;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: 1.5rem 0; }
code, pre { font-family: var(--mono); font-size: .9em; }
pre { background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 12px; overflow: auto; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--c-primary); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* --- Icons ---------------------------------------------------------------- */
.ic { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; }
.ic-lg { width: 28px; height: 28px; }
.ic-xl { width: 40px; height: 40px; }

/* --- Layout --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
main { flex: 1; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section-sm { padding-top: 32px; padding-bottom: 32px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 560px) { .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tool-card { min-height: 116px; padding: 14px 8px; font-size: .86rem; } .tool-card small { display: none; } }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mt-4 { margin-top: 40px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }
.text-center { text-align: center; } .text-right { text-align: right; }
.muted { color: var(--c-muted); } .text-2 { color: var(--c-text-2); }
.small { font-size: .86rem; } .tiny { font-size: .76rem; }
.text-accent { color: var(--c-accent); } .text-success { color: var(--c-success); } .text-danger { color: var(--c-danger); }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }
.hidden, [hidden] { display: none !important; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--c-text); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand:hover { color: var(--c-text); }
.brand img { height: 34px; width: auto; }
.brand .brand-accent { color: var(--c-primary); }
.brand .badge { margin-left: 4px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .nav button.nav-link {
  color: var(--c-text-2); padding: 8px 12px; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 550;
  background: none; border: 0; cursor: pointer; font-family: inherit; display: inline-flex; gap: 6px; align-items: center;
}
.nav > a:hover, .nav button.nav-link:hover, .nav > a.active { color: #fff; background: var(--c-surface-2); }
.nav > a.active { box-shadow: inset 0 -2px 0 var(--c-primary); border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: transparent; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.site-header .nav-toggle { display: none; margin-left: auto; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; padding: 8px; z-index: 60;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow);
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--c-text-2); }
.dropdown-menu a:hover { background: var(--c-surface-2); color: #fff; }
.dropdown-menu .ic { color: var(--c-primary); }

@media (max-width: 960px) {
  .site-header .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--c-bg-2); border-bottom: 1px solid var(--c-border); padding: 12px 16px 20px; margin: 0;
    max-height: calc(100vh - var(--header-h)); overflow: auto; display: none;
  }
  .nav.open { display: flex; }
  .nav > a.active { box-shadow: inset 3px 0 0 var(--c-primary); border-radius: var(--radius-sm); }
  .nav-actions { flex-direction: column; align-items: stretch; margin-top: 8px; }
  .dropdown-menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 12px; display: block; }
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  --b-bg: var(--c-surface-2); --b-fg: var(--c-text); --b-bd: var(--c-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm);
  font: 600 .92rem/1.2 var(--font); color: var(--b-fg); background: var(--b-bg); border: 1px solid var(--b-bd);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s, border-color .15s;
}
.btn:hover { color: var(--b-fg); border-color: var(--c-muted); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { --b-bg: var(--c-primary); --b-fg: #fff; --b-bd: var(--c-primary); box-shadow: var(--glow-sm); }
.btn-primary:hover { --b-bg: color-mix(in srgb, var(--c-primary) 85%, #fff); border-color: var(--b-bg); box-shadow: var(--glow); }
.btn-outline { --b-bg: transparent; --b-bd: var(--c-border-strong); }
.btn-outline:hover { border-color: var(--c-primary); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; }
.btn-ghost:hover { --b-bg: var(--c-surface-2); }
.btn-danger { --b-bg: transparent; --b-fg: var(--c-danger); --b-bd: color-mix(in srgb, var(--c-danger) 50%, transparent); }
.btn-danger:hover { --b-bg: color-mix(in srgb, var(--c-danger) 14%, transparent); border-color: var(--c-danger); }
.btn-paypal { --b-bg: #ffc439; --b-fg: #111; --b-bd: #ffc439; font-weight: 750; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: .84rem; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

/* --- Cards ---------------------------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--c-surface), color-mix(in srgb, var(--c-surface) 85%, var(--c-bg)));
  border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 20px;
}
.card-glow { border-color: var(--c-primary-line); box-shadow: var(--glow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.05rem; }
.card-sub { background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px; }

.tool-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 132px; padding: 18px 12px; color: var(--c-text); font-weight: 650; font-size: .93rem; line-height: 1.3;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card .ic { width: 34px; height: 34px; color: var(--c-text); transition: color .15s; }
.tool-card small { color: var(--c-muted); font-weight: 450; font-size: .8rem; }
.tool-card:hover { color: #fff; border-color: var(--c-primary-line); box-shadow: var(--glow); transform: translateY(-2px); }
.tool-card:hover .ic { color: var(--c-primary); }

.stat {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: var(--c-primary); background: var(--c-primary-soft); box-shadow: var(--glow-sm);
}
.stat-icon .ic { width: 22px; height: 22px; }
.stat-value { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--c-text-2); font-size: .82rem; }
.stat-trend { font-size: .78rem; font-weight: 650; }
.stat-trend.up { color: var(--c-success); } .stat-trend.down { color: var(--c-danger); }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hero-kicker { color: var(--c-primary); font-weight: 750; font-size: .95rem; margin-bottom: 10px; }
.hero h1 { font-style: italic; max-width: 14ch; text-shadow: 0 0 30px rgba(0, 0, 0, .6); }
.hero-lead { color: var(--c-text-2); font-size: 1.08rem; max-width: 48ch; }
.hero-visual {
  position: absolute; right: -60px; top: -40px; width: min(52vw, 640px); aspect-ratio: 1; pointer-events: none; opacity: .9;
  background:
    radial-gradient(circle at 50% 50%, #000 0 18%, transparent 19%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--c-primary) 70%, #000) 0 22%, transparent 23%),
    repeating-radial-gradient(circle at 50% 50%, #18181c 0 3%, #0e0e10 3% 6%),
    radial-gradient(circle at 50% 50%, transparent 0 44%, color-mix(in srgb, var(--c-primary) 60%, transparent) 45%, transparent 47%);
  border-radius: 50%; filter: drop-shadow(0 0 50px color-mix(in srgb, var(--c-primary) 45%, transparent));
  mask-image: radial-gradient(circle, #000 60%, transparent 71%);
}
.hero .container { position: relative; z-index: 1; }
@media (max-width: 760px) { .hero-visual { opacity: .25; right: -40%; width: 110vw; } }

/* --- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--c-text-2); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--radius-sm);
  font: inherit; color: var(--c-text); background: var(--c-bg-2); border: 1px solid var(--c-border-strong);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; }
.textarea.code { font-family: var(--mono); font-size: .84rem; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.input[type=color] { padding: 4px; width: 56px; }
.input-sm { min-height: 34px; padding: 5px 9px; font-size: .88rem; }
.input-group { display: flex; } .input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); } .input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.help { color: var(--c-muted); font-size: .8rem; margin-top: 5px; }
.error-text { color: var(--c-danger); font-size: .82rem; margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.check input { margin-top: 4px; accent-color: var(--c-primary); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { display: inline-block; width: 40px; height: 22px; border-radius: 99px; background: var(--c-surface-3); border: 1px solid var(--c-border-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #ddd; transition: transform .15s; }
.switch input:checked + .track { background: var(--c-primary); border-color: var(--c-primary); box-shadow: var(--glow-sm); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.range { width: 100%; accent-color: var(--c-primary); height: 4px; }
.segmented { display: inline-flex; background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 3px; gap: 3px; flex-wrap: wrap; }
.segmented button, .segmented a {
  border: 0; background: transparent; color: var(--c-text-2); padding: 6px 12px; border-radius: 6px; cursor: pointer; font: 600 .84rem var(--font);
}
.segmented .active, .segmented [aria-pressed=true], .segmented [aria-selected=true] { background: var(--c-primary); color: #fff; }

.dropzone {
  border: 2px dashed var(--c-border-strong); border-radius: var(--radius-lg); padding: 40px 20px; text-align: center; cursor: pointer;
  background: color-mix(in srgb, var(--c-surface) 60%, transparent); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--c-primary); background: var(--c-primary-soft); }
.dropzone .ic { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--c-primary); }

/* --- Tabellen ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table th { color: var(--c-text-2); font-weight: 650; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; background: var(--c-bg-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--c-surface-2) 60%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Badges & Alerts ------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: .74rem; font-weight: 700; background: var(--c-surface-3); color: var(--c-text-2); }
.badge-primary { background: var(--c-primary); color: #fff; }
.badge-success { background: color-mix(in srgb, var(--c-success) 18%, transparent); color: var(--c-success); }
.badge-warning { background: color-mix(in srgb, var(--c-warning) 18%, transparent); color: var(--c-warning); }
.badge-danger { background: color-mix(in srgb, var(--c-danger) 18%, transparent); color: var(--c-danger); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--c-border); background: var(--c-surface); margin-bottom: 14px; font-size: .92rem; }
.alert .ic { margin-top: 3px; }
.alert-success { border-color: color-mix(in srgb, var(--c-success) 45%, transparent); background: color-mix(in srgb, var(--c-success) 9%, var(--c-surface)); }
.alert-error, .alert-danger { border-color: color-mix(in srgb, var(--c-danger) 45%, transparent); background: color-mix(in srgb, var(--c-danger) 9%, var(--c-surface)); }
.alert-warning { border-color: color-mix(in srgb, var(--c-warning) 45%, transparent); background: color-mix(in srgb, var(--c-warning) 9%, var(--c-surface)); }
.alert-info { border-color: color-mix(in srgb, var(--c-info) 45%, transparent); background: color-mix(in srgb, var(--c-info) 9%, var(--c-surface)); }
.flash-stack { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 90; width: min(420px, calc(100vw - 32px)); }
.flash-stack .alert { box-shadow: var(--shadow); animation: slide-in .25s ease-out; }
@keyframes slide-in { from { transform: translateY(-8px); opacity: 0; } }

/* --- Fortschritt ---------------------------------------------------------- */
.progress { height: 8px; border-radius: 99px; background: var(--c-surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); border-radius: inherit; box-shadow: var(--glow-sm); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--c-surface-3); border-top-color: var(--c-primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Panel-Layout (Konto & Admin) ---------------------------------------- */
.panel-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; padding-top: 24px; padding-bottom: 48px; }
.sidenav { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 10px; align-self: start; position: sticky; top: calc(var(--header-h) + 16px); }
.sidenav .sidenav-title { display: flex; gap: 10px; align-items: center; font-weight: 700; padding: 10px 10px 12px; border-bottom: 1px solid var(--c-border); margin-bottom: 6px; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--c-text-2); font-size: .9rem; font-weight: 550; }
.sidenav a:hover { background: var(--c-surface-2); color: #fff; }
.sidenav a.active { background: var(--c-primary); color: #fff; box-shadow: var(--glow-sm); }
.sidenav .sep { border-top: 1px solid var(--c-border); margin: 8px 0; }
.panel-main { min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h1 { font-size: 1.6rem; margin: 0; font-style: normal; }
@media (max-width: 900px) {
  .panel-layout { grid-template-columns: 1fr; }
  .sidenav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .sidenav .sidenav-title, .sidenav .sep { display: none; }
  .sidenav a { white-space: nowrap; }
}

/* --- Tabs ----------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a, .tabs button { padding: 7px 14px; border-radius: var(--radius-sm); background: var(--c-surface-2); border: 1px solid var(--c-border); color: var(--c-text-2); font: 600 .85rem var(--font); cursor: pointer; }
.tabs a.active, .tabs button.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* --- Bildergalerie ------------------------------------------------------- */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.thumb {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-border); background: var(--c-surface);
}
.thumb .thumb-img { aspect-ratio: 4/3; background: var(--checker); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb .thumb-meta { padding: 8px 10px; font-size: .8rem; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.thumb .thumb-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root { --checker: repeating-conic-gradient(#d9d9de 0 25%, #fff 0 50%) 0 0 / 18px 18px; }

/* --- Modal ---------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); }
.modal.open { display: grid; }
.modal-box { width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }

/* --- Werbung -------------------------------------------------------------- */
.ad-slot { margin: 20px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot .ad-label { font-size: .68rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.ad-slot img { margin: 0 auto; border-radius: var(--radius-sm); }
.ad-slot-header { margin: 10px auto 0; }

/* --- Cookie-Banner -------------------------------------------------------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 95; max-width: 760px; margin: 0 auto;
  background: var(--c-surface); border: 1px solid var(--c-primary-line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow), var(--glow);
}
.consent h2 { font-size: 1.05rem; display: flex; gap: 8px; align-items: center; }
.consent .consent-options { display: grid; gap: 10px; margin: 12px 0; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--c-border); background: var(--c-bg-2); padding: 36px 0 22px; margin-top: 40px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.footer-grid h3, .footer-grid .footer-h { font-size: .9rem; color: var(--c-text); margin-bottom: .6em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--c-text-2); }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--c-border); margin-top: 26px; padding-top: 16px; color: var(--c-muted); }

/* --- Prosa (Rechtstexte, Tool-Beschreibungen) ---------------------------- */
.prose { max-width: 780px; color: var(--c-text-2); }
.prose h2, .prose h3 { color: var(--c-text); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }

/* --- Fehlerseiten --------------------------------------------------------- */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.error-code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 900; color: var(--c-primary); line-height: 1; text-shadow: var(--glow); }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding-top: 36px; padding-bottom: 36px; }
  .hide-sm { display: none !important; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ==========================================================================
   Bildeditor
   ========================================================================== */
.breadcrumbs { padding-top: 18px; }
.breadcrumbs a { color: var(--c-text-2); }
.tool-head { padding: 10px 0 18px; }
.tool-head h1 { font-style: normal; font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: .3em; }
.tool-head p { max-width: 72ch; }
.steps { padding-left: 1.2em; color: var(--c-text-2); }
.steps li { margin-bottom: 6px; }
.faq { border-bottom: 1px solid var(--c-border); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 8px 0 0; }

.editor {
  max-width: var(--container); margin: 0 auto 8px; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  background: var(--c-bg-2); overflow: hidden; box-shadow: var(--shadow);
}
@media (min-width: 1272px) { .editor { width: calc(100% - 32px); } }
@media (max-width: 1271px) { .editor { margin-left: 16px; margin-right: 16px; } }
.editor-full { max-width: none; margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
.ed-topbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.ed-filename { font-size: .88rem; color: var(--c-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ed-top-actions { display: flex; gap: 6px; align-items: center; }
.ed-body { display: grid; grid-template-columns: 112px minmax(0, 1fr) 300px; min-height: 560px; }
.editor-full .ed-body { height: calc(100vh - var(--header-h) - 52px); min-height: 520px; }
.ed-rail { border-right: 1px solid var(--c-border); padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; background: var(--c-surface); }
.ed-rail button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--c-text-2); font: 600 .72rem/1.15 var(--font); cursor: pointer; text-align: center;
}
.ed-rail button .ic { width: 20px; height: 20px; }
.ed-rail button:hover { background: var(--c-surface-2); color: #fff; }
.ed-rail button[aria-pressed=true] { background: var(--c-primary); color: #fff; box-shadow: var(--glow-sm); }
.ed-rail button[disabled] { opacity: .5; cursor: not-allowed; }
.ed-stage { position: relative; display: grid; place-items: center; padding: 18px; min-width: 0; min-height: 0; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--c-surface-2), var(--c-bg) 70%); }
.ed-drop { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ed-drop.drag { border-color: var(--c-primary); }
.editor.dragging .ed-stage { outline: 2px dashed var(--c-primary); outline-offset: -10px; }
.ed-canvas-wrap { position: relative; max-width: 100%; max-height: 100%; line-height: 0; }
.ed-canvas-wrap canvas { max-width: 100%; max-height: calc(100% - 0px); width: auto; height: auto; background: var(--checker); box-shadow: 0 8px 30px rgba(0,0,0,.5); touch-action: none; }
.ed-canvas-wrap.ed-grab canvas { cursor: grab; }
.ed-info { position: absolute; left: 12px; bottom: 8px; }
.ed-busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgba(0,0,0,.55); z-index: 5; font-weight: 600; }
.ed-busy[hidden] { display: none; }
.ed-panel { border-left: 1px solid var(--c-border); padding: 16px; overflow-y: auto; background: var(--c-surface); }
.ed-panel h3 { font-size: 1rem; }
.ed-section .label { display: flex; justify-content: space-between; }
.ed-section output { color: var(--c-text); font-variant-numeric: tabular-nums; }
.ed-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; font-size: .9rem; }
.ed-matte { border-top: 1px solid var(--c-border); margin-top: 14px; padding-top: 6px; }
.ed-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ed-swatches button { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--c-border-strong); cursor: pointer; }
.ed-swatches button:hover, .ed-swatches button.active { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.ed-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ed-filters button { border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-bg-2); color: var(--c-text-2); padding: 4px; cursor: pointer; font: 600 .7rem var(--font); }
.ed-filters button canvas { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; margin-bottom: 4px; background: var(--checker); }
.ed-filters button.active { border-color: var(--c-primary); color: #fff; box-shadow: var(--glow-sm); }
.ed-ratios { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-dims { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: end; }
.ed-dims [aria-pressed=false] { opacity: .45; }
.ed-stickers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ed-stickers button { font-size: 1.4rem; padding: 6px 0; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-bg-2); cursor: pointer; }
.ed-stickers button:hover { border-color: var(--c-primary); }
.ed-tips { padding-left: 1.1em; }
.ed-recos .btn { justify-content: flex-start; }

/* Zuschnitt-Overlay */
.ed-crop { position: absolute; inset: 0; touch-action: none; }
.ed-crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 33.333% 33.333%; background-position: -1px -1px; }
.ed-crop-box span { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--c-primary); border-radius: 3px; }
.ed-crop-box [data-h=nw] { left: -9px; top: -9px; cursor: nwse-resize; }
.ed-crop-box [data-h=ne] { right: -9px; top: -9px; cursor: nesw-resize; }
.ed-crop-box [data-h=sw] { left: -9px; bottom: -9px; cursor: nesw-resize; }
.ed-crop-box [data-h=se] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.ed-crop-box [data-h=n] { left: calc(50% - 8px); top: -9px; cursor: ns-resize; }
.ed-crop-box [data-h=s] { left: calc(50% - 8px); bottom: -9px; cursor: ns-resize; }
.ed-crop-box [data-h=w] { top: calc(50% - 8px); left: -9px; cursor: ew-resize; }
.ed-crop-box [data-h=e] { top: calc(50% - 8px); right: -9px; cursor: ew-resize; }

@media (max-width: 1024px) {
  .ed-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(320px, 58vh) auto; min-height: 0; }
  .editor-full .ed-body { height: auto; }
  .ed-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--c-border); order: 0; }
  .ed-rail button { min-width: 78px; }
  .ed-stage { order: 1; }
  .ed-panel { order: 2; border-left: 0; border-top: 1px solid var(--c-border); max-height: none; }
}
@media (max-width: 560px) {
  .editor { margin-left: 0; margin-right: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .ed-body { grid-template-rows: auto minmax(280px, 52vh) auto; }
  .ed-stage { padding: 10px; }
}
@media (max-width: 560px) {
  .flash-stack { top: auto; bottom: 12px; right: 12px; width: calc(100vw - 24px); }
  .flash-stack .alert { font-size: .85rem; padding: 10px 12px; }
}

/* --- Anmeldung ------------------------------------------------------------ */
.auth-wrap { display: grid; place-items: center; padding-top: 48px; padding-bottom: 48px; min-height: calc(100vh - var(--header-h) - 200px); }
.auth-card { width: min(460px, 100%); padding: 28px; }
.auth-card h1 { font-size: 1.6rem; font-style: normal; }
.auth-card .ic-xl { margin: 0 auto; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.input[aria-invalid=true] { border-color: var(--c-danger); }
.sidenav-btn { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--c-text-2); font: 550 .9rem var(--font); background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.sidenav-btn:hover { background: var(--c-surface-2); color: #fff; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.thumb-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.thumb:hover .thumb-actions, .thumb:focus-within .thumb-actions { opacity: 1; }
@media (hover: none) { .thumb-actions { opacity: 1; } }
.thumb-actions .btn { background: rgba(0,0,0,.7); }
.thumb > a { color: inherit; display: block; }
.danger-zone { border-color: color-mix(in srgb, var(--c-danger) 45%, transparent); }
.ed-premium { justify-content: center; border-color: var(--c-primary-line); }
.ed-premium .badge { margin-left: 4px; }
.ed-manual { border-top: 1px solid var(--c-border); margin-top: 14px; padding-top: 10px; }
.ed-canvas-wrap.ed-brushing canvas { cursor: crosshair; }
.ed-cursor { position: absolute; border: 1.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.6); pointer-events: none; transform: translate(-50%, -50%); }
.price { font-size: 2.4rem; font-weight: 850; margin: 4px 0 8px; letter-spacing: -.02em; }
.feature-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; color: var(--c-text-2); }
.feature-list li { display: flex; gap: 8px; align-items: flex-start; }
.feature-list .ic { color: var(--c-success); margin-top: 3px; }
.pricing-grid { align-items: start; }
.input-code { font-family: var(--mono); font-size: 1.25rem; letter-spacing: .2em; text-align: center; }
.twofa-setup { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; margin-top: 12px; }
.twofa-setup .qr { background: #fff; padding: 8px; border-radius: 10px; width: 220px; aspect-ratio: 1; }
.twofa-setup .qr svg { width: 100%; height: 100%; }
.secret { display: block; font-size: 1rem; padding: 10px; background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: 8px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; list-style: none; padding: 0; }
.codes code { display: block; text-align: center; padding: 8px; background: var(--c-bg-2); border: 1px solid var(--c-border); border-radius: 8px; font-size: 1rem; }
@media (max-width: 600px) { .twofa-setup { grid-template-columns: 1fr; } .twofa-setup .qr { margin: 0 auto; } }

/* --- Admin & Diagramme --------------------------------------------------- */
.admin-layout { max-width: 1440px; }
.admin-grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .admin-grid-2 { grid-template-columns: 1fr; } }
.card-title { font-size: 1rem; margin-bottom: 10px; }
.range-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.range-filter .segmented a { text-decoration: none; }
.chart-wrap { margin: 0; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--c-border); stroke-width: 1; }
.chart .axis { fill: var(--c-muted); font-size: 11px; }
.chart .area { fill: color-mix(in srgb, var(--c-primary) 22%, transparent); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.chart .line.primary { stroke: var(--c-primary); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c-primary) 60%, transparent)); }
.chart .line.muted { stroke: var(--c-text-2); stroke-dasharray: 4 3; stroke-width: 1.6; }
.chart .dot.primary { fill: var(--c-primary); } .chart .dot.muted { fill: var(--c-text-2); }
.chart .bar { fill: var(--c-primary); }
.chart .bar:hover, .chart .dot:hover { opacity: .75; }
.chart-legend { display: flex; gap: 16px; font-size: .8rem; color: var(--c-text-2); margin-top: 6px; }
.chart-legend i { display: inline-block; width: 12px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--c-primary); }
.chart-legend i.muted { background: var(--c-text-2); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; }
.donut circle { fill: none; stroke-width: 22; }
.donut .donut-bg { stroke: var(--c-surface-3); }
.donut .seg.s0, .donut-legend .s0 { stroke: var(--c-primary); background: var(--c-primary); }
.donut .seg.s1, .donut-legend .s1 { stroke: #d4d4dc; background: #d4d4dc; }
.donut .seg.s2, .donut-legend .s2 { stroke: #7d7d88; background: #7d7d88; }
.donut .seg.s3, .donut-legend .s3 { stroke: #f59e0b; background: #f59e0b; }
.donut .seg.s4, .donut-legend .s4 { stroke: #3b82f6; background: #3b82f6; }
.donut .seg.s5, .donut-legend .s5 { stroke: #22c55e; background: #22c55e; }
.donut-total { fill: var(--c-text); font-size: 22px; font-weight: 800; }
.donut-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .88rem; }
.donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.hbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .86rem; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 1fr) 1.4fr auto; gap: 10px; align-items: center; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-text-2); }
.hb-bar { height: 8px; background: var(--c-surface-3); border-radius: 99px; overflow: hidden; }
.hb-bar i { display: block; height: 100%; background: var(--c-primary); border-radius: inherit; }
.hb-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-val small { color: var(--c-muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.kv dt { color: var(--c-muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.admin-actions { gap: 8px; }
.admin-actions form { margin: 0; }
.settings-form { max-width: 820px; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--c-danger); }
.seo-table td { min-width: 140px; } .seo-table td:first-child { min-width: 160px; } .seo-table td:last-child { min-width: 0; }
.brand-preview { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 8px; padding: 12px; display: inline-block; margin-bottom: 6px; }
.brand-preview img { max-height: 48px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.logview { max-height: 420px; font-size: .76rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .range-filter { width: 100%; }
  .range-filter > * { min-width: 0; max-width: 100%; }
  .range-filter .flex { width: 100%; }
  .range-filter .input { flex: 1; min-width: 0; }
  .range-filter .segmented a { padding: 6px 9px; }
}
@media (max-width: 480px) {
  .panel-main .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .panel-main .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .panel-main .stat-icon { width: 36px; height: 36px; }
  .panel-main .stat-value { font-size: 1.2rem; }
}

/* Barrierefreiheit: Links im Fließtext nicht nur über Farbe erkennbar */
p a:not(.btn), li a:not(.btn), .prose a, .help a, .tiny a, .small a:not(.btn), dd a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.nav a, .dropdown-menu a, .footer-grid a, .sidenav a, .breadcrumbs a, .tabs a, .segmented a, .thumb a, .footer-bottom a { text-decoration: none; }
.ed-panel .ed-h { font-size: 1rem; margin-bottom: .6em; }
.alert a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
/* Sprachmenü */
.dropdown-menu.dropdown-right { left: auto; right: 0; min-width: 190px; }
.lang-switch .dropdown-menu a.active { color: #fff; background: var(--c-surface-2); }
.lang-code { display: inline-block; min-width: 26px; font-weight: 700; color: var(--c-primary); font-size: .8rem; }
