/* to-e-rechnung.de – Stylesheet · Design 2026: Slate + Indigo, Mint-Akzent, Inter */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #5b6577;
  --line: #e2e8f0;
  --accent: #4f46e5;          /* Indigo – Buttons, Links (Kontrast zu Weiß 6,3:1) */
  --accent-strong: #4338ca;
  --accent-soft: #eef2ff;
  --brand: #6366f1;           /* Indigo hell – Icons, Grafiken */
  --brand-light: #a5b4fc;
  --mint: #10b981;            /* Frischer Akzent */
  --mint-soft: #d1fae5;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --err: #be123c;
  --err-soft: #fff1f2;
  --info: #4338ca;
  --info-soft: #eef2ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px -10px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .05);
  --ring: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --on-accent: #ffffff;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0b1020; --surface: #121829; --surface-2: #1a2236; --text: #e8ecf5; --muted: #98a2b8; --line: #263049;
    --accent: #818cf8; --accent-strong: #a5b4fc; --accent-soft: #1e2347; --brand: #818cf8; --brand-light: #4f46e5;
    --mint: #34d399; --mint-soft: #0f2e25;
    --ok: #34d399; --ok-soft: #0f2a22; --warn: #fbbf24; --warn-soft: #2e2410; --err: #fb7185; --err-soft: #34141c; --info: #a5b4fc; --info-soft: #1e2347;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, .6); --on-accent: #0b1020; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0b1020; --surface: #121829; --surface-2: #1a2236; --text: #e8ecf5; --muted: #98a2b8; --line: #263049;
    --accent: #818cf8; --accent-strong: #a5b4fc; --accent-soft: #1e2347; --brand: #818cf8; --brand-light: #4f46e5;
    --mint: #34d399; --mint-soft: #0f2e25;
    --ok: #34d399; --ok-soft: #0f2a22; --warn: #fbbf24; --warn-soft: #2e2410; --err: #fb7185; --err-soft: #34141c; --info: #a5b4fc; --info-soft: #1e2347;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, .6); --on-accent: #0b1020; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.022em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 750; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .88em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 99; }

/* Header */
.site-header { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 750; letter-spacing: -.02em; font-size: 1.05rem; }
.brand img, .brand svg { width: 30px; height: 30px; flex: none; }
.brand span b { color: var(--accent); font-weight: 750; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 550; font-size: .93rem; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.brand, .nav a, .nav-account .btn { white-space: nowrap; }
@media (max-width: 1080px) {
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; order: 3; }
  .nav a { padding: 6px 10px; font-size: .9rem; white-space: nowrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .93rem; line-height: 1.2; padding: 10px 18px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.btn-secondary:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--err); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-lg { padding: 13px 22px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 9px; }

/* Hero */
.hero { padding: 72px 0 56px; position: relative;
  background: radial-gradient(520px 360px at 88% 8%, color-mix(in srgb, var(--mint) 16%, transparent), transparent 70%),
              radial-gradient(620px 420px at 72% 70%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { background: linear-gradient(120deg, var(--text) 30%, var(--accent) 75%, var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .05em; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 20px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .9rem; }
.trust li::before { content: "✓"; color: var(--mint); font-weight: 800; margin-right: 7px; }
.hero-visual { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 24px; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.doc { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); min-height: 150px; font-size: .78rem; }
.doc .bar { height: 7px; border-radius: 4px; background: var(--line); margin: 7px 0; }
.doc .bar.s { width: 55%; } .doc .bar.m { width: 75%; }
.doc .tag { display: inline-block; font-weight: 700; font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); margin-bottom: 6px; }
.doc.xml { background: var(--accent-soft); border-color: transparent; font-family: var(--mono); color: var(--accent-strong); line-height: 1.45; overflow: hidden; }
.doc.xml .tag { background: #047857; color: #fff; font-family: var(--font); }
.arrow { font-size: 1.6rem; color: var(--mint); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; } .hero { padding-top: 40px; } }

/* Sections */
section.block { padding: 64px 0; }
section.block:has(.cta-band) { padding-bottom: 8px; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 30px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s, border-color .2s; }
a.card:hover, .card:has(a.btn):hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin-bottom: 16px; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--accent-soft), var(--mint-soft)); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.card .icon svg { width: 22px; height: 22px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: s; padding-left: 48px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li.now::before { background: var(--mint); border-color: var(--mint); }
.timeline b { display: block; }
.timeline span { color: var(--muted); font-size: .95rem; }
.cite { color: var(--muted); font-size: .85rem; }

details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--accent); font-weight: 600; font-size: 1.2rem; line-height: 1; transition: transform .2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
.site-footer { padding: 36px 0 44px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Tool pages */
.page-head { padding: 32px 0 8px; }
.page-head p { color: var(--muted); max-width: 52em; }
.dropzone { border: 2px dashed color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 18px; background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent-soft) 60%, var(--surface))); padding: 44px 20px; text-align: center; transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 8px; }
.dropzone strong { display: block; font-size: 1.05rem; }
.dropzone input { display: none; }
.dropzone .file { margin-top: 10px; font-weight: 600; color: var(--accent); }

.alert { border-radius: 12px; padding: 14px 16px 14px 18px; margin: 14px 0; border: 1px solid transparent; position: relative; }
.alert h3 { margin: 0 0 4px; font-size: 1rem; }
.alert p { margin: 0; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-ok h3 { color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert-warn h3 { color: var(--warn); }
.alert-err { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.alert-err h3 { color: var(--err); }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert-info h3 { color: var(--info); }

.workspace { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; align-items: start; margin-top: 18px; }
.preview { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; height: calc(100vh - 110px); min-height: 420px; }
.preview iframe, .preview object { width: 100%; height: 100%; border: 0; display: block; }
.preview .empty { display: grid; place-items: center; height: 100%; color: var(--muted); padding: 20px; text-align: center; }
@media (max-width: 980px) { .workspace { grid-template-columns: 1fr; } .preview { position: static; height: 60vh; } }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px 20px 10px; margin: 0 0 16px; min-width: 0; box-shadow: var(--shadow); }
legend { font-weight: 700; padding: 0 8px; letter-spacing: -.01em; }
.fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 12px; }
.f { display: flex; flex-direction: column; gap: 4px; grid-column: span 3; min-width: 0; margin-bottom: 4px; }
.f.s2 { grid-column: span 2; } .f.s4 { grid-column: span 4; } .f.s6 { grid-column: span 6; } .f.s1 { grid-column: span 1; }
@media (max-width: 640px) { .f, .f.s1, .f.s2, .f.s4 { grid-column: span 6; } }
label { font-size: .82rem; font-weight: 600; color: var(--muted); letter-spacing: .005em; }
label .req { color: var(--err); }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input.invalid { border-color: var(--err); background: var(--err-soft); }
textarea { resize: vertical; min-height: 64px; }
.hint { font-size: .78rem; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1180px) { .two-col { grid-template-columns: 1fr; } }

table.lines { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.lines th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 650; padding: 6px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.lines td { padding: 6px 4px; vertical-align: top; border-bottom: 1px solid var(--line); }
table.lines td input, table.lines td select { padding: 6px 7px; font-size: .88rem; }
table.lines .num { text-align: right; }
table.lines td.net { white-space: nowrap; font-weight: 600; padding-top: 12px; text-align: right; }
.line-desc { margin-top: 5px; }
.lines-wrap { overflow-x: auto; }
@media (max-width: 760px) {
  table.lines thead { display: none; }
  table.lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.lines td { border: 0; padding: 0; }
  table.lines td.c-name { grid-column: 1 / -1; }
  table.lines td::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
  table.lines td.c-name::before, table.lines td.c-del::before { content: none; }
}

.totals { width: 100%; max-width: 420px; margin-left: auto; border-collapse: collapse; font-size: .95rem; }
.totals td { padding: 5px 0; }
.totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals tr.strong td { font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; }
.compare { font-size: .82rem; }
.compare.mismatch { color: var(--err); font-weight: 600; }

.actions-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow-lg); }
.ab-left, .ab-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ab-left select { width: auto; min-width: 210px; }
.ab-label { margin: 0; }
.req-status { border: 0; font: inherit; font-size: .82rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; cursor: default; white-space: nowrap; }
.req-status:empty { display: none; }
.req-status.open { background: var(--warn-soft); color: var(--warn); cursor: pointer; }
.req-status.open::before { content: "●  "; font-size: .7em; vertical-align: 1px; }
.req-status.done { background: var(--ok-soft); color: var(--ok); }
.req-status.done::before { content: "✓ "; }
@media (max-width: 760px) {
  .actions-bar { bottom: 8px; padding: 10px; }
  .ab-left, .ab-right { width: 100%; }
  .ab-left select { flex: 1; min-width: 0; }
  .ab-right .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
}

/* Konverter: Kopf & Fortschritt */
.page-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head-row h1 { margin: 0; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.page-head > p { margin-top: 10px; }
.stepper { list-style: none; padding: 0; margin: 18px 0 8px; display: flex; gap: 8px; flex-wrap: wrap; counter-reset: none; }
.stepper li { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .88rem; font-weight: 600; }
.stepper li .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .78rem; font-weight: 700; }
.stepper li.on { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--ring); }
.stepper li.on .n { background: var(--accent); color: var(--on-accent); }
.stepper li.done { color: var(--text); }
.stepper li.done .n { background: var(--mint); color: #fff; font-size: 0; }
.stepper li.done .n::after { content: "✓"; font-size: .8rem; }
@media (max-width: 640px) { .stepper li .t { display: none; } .stepper li.on .t { display: inline; } }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; letter-spacing: .01em; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--muted); }

.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; overflow: hidden; box-shadow: var(--shadow); }
.stage-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.stage-head h3 { margin: 0; }
.stage-head .std { color: var(--muted); font-size: .8rem; margin-left: auto; }
.msgs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.msgs li { padding: 10px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .92rem; }
.msgs li:last-child { border-bottom: 0; }
.msgs .rid { font-family: var(--mono); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.msgs .orig { color: var(--muted); font-size: .82rem; }
.msgs .loc { color: var(--muted); font-size: .72rem; font-family: var(--mono); word-break: break-all; }
.msgs .tax { font-size: .72rem; font-weight: 700; color: var(--err); }
.msgs .col2 { grid-column: 2; }
.sev-error .rid { color: var(--err); } .sev-warning .rid { color: var(--warn); } .sev-info .rid { color: var(--info); }

/* Rechnungsansicht */
.invoice-view { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 34px; margin: 18px 0; }
.iv-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.iv-seller b { font-size: 1.15rem; display: block; }
.iv-type { font-size: 1.6rem; font-weight: 750; color: var(--accent); text-align: right; }
.iv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 22px; }
@media (max-width: 700px) { .iv-grid { grid-template-columns: 1fr; } .invoice-view { padding: 18px; } .iv-type { text-align: left; } }
.iv-meta { width: 100%; border-collapse: collapse; font-size: .9rem; }
.iv-meta td { padding: 3px 0; vertical-align: top; }
.iv-meta td:first-child { color: var(--muted); padding-right: 12px; white-space: nowrap; }
.iv-meta td:last-child { text-align: right; font-weight: 600; word-break: break-word; }
.iv-lines { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 6px 0 16px; }
.iv-lines th { background: var(--surface-2); text-align: left; padding: 7px 8px; font-size: .78rem; color: var(--muted); }
.iv-lines td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.iv-lines .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.iv-lines .desc { color: var(--muted); font-size: .84rem; }
.iv-block { margin-top: 18px; font-size: .92rem; }
.iv-block h4 { margin: 0 0 6px; font-size: .95rem; }
.iv-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.lines-scroll { overflow-x: auto; }

.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.prose { max-width: 50em; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose h3 { margin-top: 1.2em; }
.prose li { margin-bottom: .3em; }
.placeholder { background: var(--warn-soft); padding: 0 4px; border-radius: 4px; }

@media print {
  .site-header, .site-footer, .toolbar, .actions-bar, .dropzone, .no-print { display: none !important; }
  body { background: #fff; }
  .invoice-view { border: 0; box-shadow: none; padding: 0; }
}

/* Konverter: breiteres Layout, Formular hat Vorrang */
.wrap.wide { max-width: 1440px; }
.workspace { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.workspace .two-col { grid-template-columns: 1fr; }
@media (min-width: 1500px) { .workspace .two-col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) { .workspace { grid-template-columns: 1fr; } }
table.lines { min-width: 640px; }
table.lines .l-qty { min-width: 64px; }
table.lines .l-price { min-width: 92px; }
table.lines .l-unit { min-width: 104px; }
table.lines .l-vat { min-width: 130px; }
@media (max-width: 760px) { table.lines { min-width: 0; } }
.workspace.no-preview { grid-template-columns: 1fr; }
.workspace.no-preview .preview { display: none; }

/* ---------- Konto & Portal ---------- */
.nav-account { display: flex; gap: 8px; align-items: center; margin-left: 8px; }
.nav-account .btn { padding: 7px 14px; font-size: .9rem; }
@media (max-width: 1080px) { .nav-account { margin-left: auto; } }
@media (max-width: 420px) { .nav-account .btn-secondary { display: none; } }
.hidden { display: none !important; }

.auth-wrap { min-height: calc(100vh - 64px - 120px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 34px; }
.auth-wrap { background: radial-gradient(60% 50% at 80% 0%, color-mix(in srgb, var(--mint) 12%, transparent), transparent), radial-gradient(50% 50% at 10% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent); }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 20px; }
.form-stack { display: grid; gap: 14px; }
.form-stack > .f { grid-column: auto; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text); font-weight: 400; }
.check input { width: auto; margin-top: 3px; flex: none; }
.auth-foot { margin-top: 18px; font-size: .92rem; color: var(--muted); text-align: center; }
.btn-block { width: 100%; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; padding: 4px 8px; }
.meter { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; width: 0; background: var(--err); transition: width .2s, background .2s; }

/* Portal-Layout */
.portal { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; padding-top: 24px; padding-bottom: 40px; align-items: start; }
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: .95rem; }
.side a:hover { background: var(--surface-2); color: var(--text); }
.side a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--line); }
.side a.active svg { color: var(--accent); }
.side a { border: 1px solid transparent; }
.side a svg { width: 18px; height: 18px; flex: none; }
.side .sep { height: 1px; background: var(--line); margin: 10px 4px; }
.side .side-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px 4px; font-weight: 700; }
@media (max-width: 860px) {
  .portal { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .side { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .side a { white-space: nowrap; padding: 7px 10px; }
  .side .sep, .side .side-title { display: none; }
}
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.view-head h1 { font-size: 1.6rem; margin: 0; }
.view-head p { color: var(--muted); margin: 4px 0 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.1rem; margin-bottom: 4px; }
.panel > p.muted { margin-bottom: 16px; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.6rem; font-weight: 750; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: .82rem; color: var(--muted); }
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--mint)); border-radius: 4px; }
.progress.full > span { background: var(--warn); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.quick a { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); font-weight: 600; box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .15s; }
.quick a:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.quick .icon { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--accent-soft), var(--mint-soft)); color: var(--accent); display: grid; place-items: center; flex: none; }
.quick .icon svg { width: 20px; height: 20px; }
.quick small { display: block; font-weight: 400; color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.empty-state { text-align: center; color: var(--muted); padding: 28px 10px; }

/* Tarife */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.featured { border: 2px solid var(--accent); box-shadow: 0 20px 40px -18px color-mix(in srgb, var(--accent) 45%, transparent); }
.plan .tag { position: absolute; top: -12px; left: 24px; background: linear-gradient(90deg, #4f46e5, #047857); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 1.2rem; margin: 0; }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; flex: 1; }
.plan li { padding-left: 24px; position: relative; font-size: .95rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 800; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; color: var(--muted); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 14px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Dialog & Toast */
dialog.modal { border: 1px solid var(--line); border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .4); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
dialog.modal .m-head { padding: 20px 22px 6px; }
dialog.modal .m-head h2 { font-size: 1.2rem; margin: 0; }
dialog.modal .m-body { padding: 10px 22px; max-height: 70vh; overflow: auto; }
dialog.modal .m-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--surface); padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: .92rem; opacity: 0; transition: opacity .2s, transform .2s; z-index: 100; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); color: #fff; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; word-break: break-word; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-top: 8px; }
.chart span { flex: 1; background: linear-gradient(180deg, var(--brand), var(--accent)); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.chart span:hover { opacity: 1; }
.cta-strip { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--mint-soft) 70%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); border-radius: var(--radius); padding: 14px 18px; margin: 14px 0; }
.cta-strip p { margin: 0; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--err) 85%, #000); color: #fff; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: var(--surface-2); }

/* Footer 2026 */
.site-footer { padding: 0; margin-top: 56px; background: var(--surface); }
.site-footer .wrap { display: block; }
.footer-grid { display: grid !important; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px; padding-top: 44px !important; padding-bottom: 32px !important; }
.footer-brand p { margin: 12px 0 0; max-width: 30em; line-height: 1.55; }
.site-footer h4 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text); font-weight: 700; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { display: flex !important; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px !important; padding-bottom: 22px !important; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.theme-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.theme-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.theme-switch button svg { width: 14px; height: 14px; }
.theme-switch button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn-danger, .btn-danger:hover { color: var(--on-accent); }

/* Werkzeugseiten: Infokarten */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }
.info-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.info-card .icon { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--mint-soft)); color: var(--accent); }
.info-card .icon svg { width: 18px; height: 18px; }
.info-card b { display: block; font-size: .95rem; margin-bottom: 2px; }
.info-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.dropzone svg { width: 46px; height: 46px; padding: 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 12px; }
.dropzone strong { font-size: 1.08rem; }

/* Abschlussbereich Startseite */
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 40px; border-radius: 24px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(16, 185, 129, .55), transparent 55%), linear-gradient(135deg, #4338ca, #4f46e5 55%, #6366f1); box-shadow: 0 30px 60px -30px rgba(79, 70, 229, .6); }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); max-width: 40em; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-light { background: #fff; color: #312e81; }
.btn-light:hover { background: #eef2ff; color: #312e81; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
@media (max-width: 640px) { .cta-band { padding: 26px; } }

/* Registrierung mit Vorteilen */
.auth-split { display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: 48px; align-items: center; width: 100%; max-width: 1080px; }
.auth-aside h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 22px; }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.benefits li { padding-left: 40px; position: relative; }
.benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--mint-soft); color: var(--ok); font-weight: 800; font-size: .85rem; }
.benefits b { display: block; }
.benefits span { color: var(--muted); font-size: .93rem; }
@media (max-width: 960px) { .auth-split { grid-template-columns: 1fr; gap: 28px; max-width: 560px; } .auth-aside { order: 2; } }
.link-btn { background: none; border: 0; padding: 2px 0; font: inherit; font-size: .78rem; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left; align-self: flex-start; }
.link-btn:hover { text-decoration: underline; }

/* Konverter: Dateitypen, Vorschau, Fertig-Ansicht */
.filetypes { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.filetypes span { font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.img-preview { height: 100%; overflow: auto; background: var(--surface-2); display: flex; align-items: flex-start; justify-content: center; padding: 12px; }
.img-preview img { max-width: 100%; height: auto; box-shadow: var(--shadow-lg); border-radius: 4px; background: #fff; }
.file-card { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.file-ext { width: 64px; height: 76px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--mint-soft)); border: 1px solid var(--line); }
.ready { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-lg); margin: 18px 0; }
.ready-head { display: flex; gap: 16px; align-items: flex-start; }
.ready-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.ready-head p { margin: 0; }
.ready-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 8px 20px -8px rgba(16, 185, 129, .7); }
.ready-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 22px 0 18px; }
.ready-sum div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ready-sum dt { font-size: .75rem; color: var(--muted); font-weight: 600; }
.ready-sum dd { margin: 2px 0 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready-sum dd.amount { font-size: 1.1rem; color: var(--accent); }
.ready-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ready-actions select { width: auto; min-width: 220px; }
@media (max-width: 860px) { .ready-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ready-actions .btn { flex: 1; } }

/* Hilfe & Support-Chat */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.support-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; font: inherit; font-weight: 650; font-size: .92rem; padding: 12px 18px 12px 14px; border-radius: 999px;
  box-shadow: 0 12px 30px -10px rgba(79, 70, 229, .65), 0 2px 6px rgba(15, 23, 42, .15); transition: transform .15s, box-shadow .15s; }
.support-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(79, 70, 229, .7); }
.support-fab svg { width: 20px; height: 20px; }
.support-fab.open { background: var(--text); color: var(--surface); }
body:has(#workspace:not(.hidden)) .support-fab { bottom: 112px; }
@media (max-width: 760px) { .support-fab span { display: none; } .support-fab { padding: 13px; } body:has(#workspace:not(.hidden)) .support-fab { bottom: 150px; } }
.support-panel { position: fixed; right: 20px; bottom: 84px; z-index: 41; width: min(380px, calc(100vw - 32px)); max-height: min(600px, calc(100vh - 120px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .45); overflow: hidden; }
.support-panel[hidden] { display: none; }
body:has(#workspace:not(.hidden)) .support-panel { bottom: 176px; }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; color: #fff; background: radial-gradient(120% 160% at 100% 0%, rgba(16, 185, 129, .5), transparent 55%), linear-gradient(135deg, #4338ca, #4f46e5); }
.sp-head b { display: block; font-size: 1rem; }
.sp-head span { font-size: .8rem; opacity: .85; }
.sp-close { background: rgba(255, 255, 255, .15); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.sp-close svg { width: 16px; height: 16px; }
.sp-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 120px; background: var(--bg); }
.sp-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: .9rem; line-height: 1.5; }
.sp-msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.sp-msg.bot.small { font-size: .8rem; color: var(--muted); padding: 4px 2px; border: 0; background: none; }
.sp-msg.user { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; align-self: flex-end; white-space: pre-wrap; }
.sp-msg.error { background: var(--err-soft); color: var(--err); align-self: stretch; max-width: none; font-size: .85rem; }
.sp-hit { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.sp-hit + .sp-hit { margin-top: 8px; }
.sp-hit summary { cursor: pointer; font-weight: 600; }
.sp-hit p { margin: 8px 0 0; color: var(--muted); }
.sp-form { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; background: var(--surface); }
.sp-form textarea { min-height: 70px; resize: none; }
.sp-contact { display: grid; gap: 8px; }
.sp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-consent { font-size: .78rem; }
.sp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sp-actions { display: flex; justify-content: space-between; align-items: center; }
.sp-link { font-size: .85rem; }
@media print { .support-fab, .support-panel { display: none !important; } }

/* Hilfe-Center */
.help-hero { padding: 56px 0 24px; text-align: center; background: radial-gradient(520px 300px at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.help-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.help-search { position: relative; max-width: 620px; margin: 20px auto 16px; }
.help-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.help-search input { padding: 15px 16px 15px 46px; font-size: 1.02rem; border-radius: 14px; box-shadow: var(--shadow-lg); }
.help-cats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.help-cats button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.help-cats button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.help-aside { position: sticky; top: 90px; }
.help-cat-title { font-size: 1.1rem; margin: 26px 0 4px; }
.help-cat-title:first-child { margin-top: 0; }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-aside { position: static; } }

/* Blog */
.help-cats a { border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .88rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; text-decoration: none; }
.help-cats a.on, .help-cats a:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.blog-hero { padding: 56px 0 18px; text-align: center; background: radial-gradient(520px 300px at 50% 0%, color-mix(in srgb, var(--mint) 12%, transparent), transparent 70%); }
.blog-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.blog-hero .lead { max-width: 40em; margin: 0 auto 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); color: var(--text); }
.post-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.post-card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.post-cat { align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }
.post-meta { font-size: .8rem; color: var(--muted); }
.article-page { padding-top: 28px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article-head { max-width: 46em; margin: 18px 0 26px; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 14px; }
.article-head .lead { font-size: 1.15rem; color: var(--muted); }
.article-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.article-body { max-width: 46em; font-size: 1.04rem; line-height: 1.75; }
.article-body h2 { font-size: 1.5rem; margin: 2em 0 .6em; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; scroll-margin-top: 90px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin-bottom: .45em; }
.article-body blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 1.2em 0; }
.article-body th, .article-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body th { background: var(--surface-2); font-size: .82rem; }
.article-body .table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.article-body .table-wrap table { margin: 0; }
.article-body code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.article-faq, .article-sources { margin-top: 2.4em; }
.article-sources ul { font-size: .92rem; }
.article-aside { position: sticky; top: 90px; display: grid; gap: 16px; }
@media (max-width: 960px) { .article-aside { position: static; } }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-size: .9rem; }
.toc b { display: block; margin-bottom: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.cta-card { border-radius: var(--radius); padding: 20px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, rgba(16, 185, 129, .5), transparent 55%), linear-gradient(135deg, #4338ca, #4f46e5); box-shadow: var(--shadow-lg); }
.cta-card b { font-size: 1.05rem; }
.cta-card p { margin: 8px 0 14px; color: rgba(255, 255, 255, .88); font-size: .92rem; }
.cta-card .btn-primary { background: #fff; color: #312e81; }
.cta-card .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); box-shadow: none; }
.related { margin: 56px 0 8px; }
.related h2 { margin-bottom: 18px; }

/* Startseite: animierter Ablauf (12 s Schleife) */
.demo { padding: 22px; overflow: hidden; }
.demo-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.demo-steps li { text-align: center; font-size: .74rem; font-weight: 650; padding: 6px 4px; border-radius: 999px; background: var(--surface-2); color: var(--muted); animation: 12s infinite both; }
.demo-steps .s1 { animation-name: d-s1; } .demo-steps .s2 { animation-name: d-s2; } .demo-steps .s3 { animation-name: d-s3; } .demo-steps .s4 { animation-name: d-s4; }
@keyframes d-s1 { 0%, 24% { background: var(--accent); color: var(--on-accent); } 26%, 100% { background: var(--surface-2); color: var(--muted); } }
@keyframes d-s2 { 0%, 24% { background: var(--surface-2); color: var(--muted); } 26%, 55% { background: var(--accent); color: var(--on-accent); } 57%, 100% { background: var(--surface-2); color: var(--muted); } }
@keyframes d-s3 { 0%, 55% { background: var(--surface-2); color: var(--muted); } 57%, 71% { background: var(--accent); color: var(--on-accent); } 73%, 100% { background: var(--surface-2); color: var(--muted); } }
@keyframes d-s4 { 0%, 71% { background: var(--surface-2); color: var(--muted); } 73%, 94% { background: #047857; color: #fff; } 96%, 100% { background: var(--surface-2); color: var(--muted); } }
.demo-stage { position: relative; display: grid; grid-template-columns: .8fr auto 1.2fr; gap: 10px; align-items: center; min-height: 236px; padding-bottom: 44px; }
.demo-doc { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; min-height: 200px; box-shadow: var(--shadow); animation: d-doc 12s infinite both; overflow: hidden; }
[data-theme="dark"] .demo-doc { background: #f8fafc; }
.demo-doc .bar { height: 6px; border-radius: 3px; background: #e2e8f0; margin: 7px 0; }
.demo-doc .bar.s { width: 55%; } .demo-doc .bar.m { width: 75%; } .demo-doc .bar.right { margin-left: auto; width: 40%; background: #cbd5e1; }
.demo-doc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.demo-doc-head .tag { font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #e2e8f0; color: #475569; }
.demo-logo { font-weight: 900; font-size: .8rem; color: #0f172a; letter-spacing: -.04em; }
.demo-table { border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 2px 0; margin: 8px 0; }
.demo-scan { position: absolute; left: 0; right: 0; height: 3px; top: 0; background: linear-gradient(90deg, transparent, #10b981, transparent); box-shadow: 0 0 18px 6px rgba(16, 185, 129, .35); opacity: 0; animation: d-scan 12s infinite both; }
.demo-arrow { color: var(--mint); font-size: 1.4rem; animation: d-arrow 12s infinite both; }
.demo-form { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); min-height: 200px; box-shadow: var(--shadow); }
.demo-form-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.demo-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .78rem; padding: 7px 8px; border-radius: 8px; background: var(--surface-2); margin-bottom: 6px; opacity: 0; animation: 12s infinite both; }
.demo-row span { color: var(--muted); }
.demo-row b { text-align: right; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-row i { font-style: normal; color: #fff; background: var(--mint); width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; font-weight: 800; }
.demo-row.r1 { animation-name: d-r1; } .demo-row.r2 { animation-name: d-r2; } .demo-row.r3 { animation-name: d-r3; } .demo-row.r4 { animation-name: d-r4; }
.demo-badge { position: absolute; left: 12px; right: 12px; bottom: -6px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .8rem; font-weight: 700; color: #fff; padding: 9px; border-radius: 10px; background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 10px 24px -10px rgba(16, 185, 129, .8); opacity: 0; animation: d-badge 12s infinite both; }
.demo-send { position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 650; background: var(--text); color: var(--surface); padding: 8px 12px; border-radius: 999px; box-shadow: var(--shadow-lg); opacity: 0; animation: d-send 12s infinite both; }
.demo-send svg { width: 15px; height: 15px; }
.demo-caption { margin: 8px 0 0; font-size: .82rem; text-align: center; }
@keyframes d-doc { 0% { opacity: 0; transform: translateY(14px) rotate(-2deg); } 6%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes d-scan { 0%, 8% { top: 0; opacity: 0; } 10% { top: 0; opacity: 1; } 27% { top: calc(100% - 3px); opacity: 1; } 30%, 100% { top: calc(100% - 3px); opacity: 0; } }
@keyframes d-arrow { 0%, 26% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateX(4px); } 34%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: .25; } }
@keyframes d-r1 { 0%, 28% { opacity: 0; transform: translateX(-8px); } 32%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes d-r2 { 0%, 34% { opacity: 0; transform: translateX(-8px); } 38%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes d-r3 { 0%, 40% { opacity: 0; transform: translateX(-8px); } 44%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes d-r4 { 0%, 46% { opacity: 0; transform: translateX(-8px); } 50%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes d-badge { 0%, 57% { opacity: 0; transform: scale(.85); } 61% { opacity: 1; transform: scale(1.04); } 64%, 70% { opacity: 1; transform: none; } 73%, 100% { opacity: 0; transform: none; } }
@keyframes d-send { 0%, 72% { opacity: 0; transform: translate(-40px, 10px); } 77% { opacity: 1; transform: none; } 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .demo *, .demo-steps li { animation: none !important; }
  .demo-row, .demo-badge { opacity: 1; }
  .demo-badge { position: static; margin-top: 8px; }
  .demo-steps .s4 { background: #047857; color: #fff; }
}
@media (max-width: 520px) { .demo-stage { grid-template-columns: 1fr; } .demo-arrow { display: none; } .demo-doc { min-height: 140px; } .demo-send { position: static; margin-top: 10px; } }

/* =========================================================
   App-Oberfläche (/app/…)
   ========================================================= */
.app-body { background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.app-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; z-index: 30; }
.app-side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 4px; }
.app-side .brand { font-size: 1rem; }
.app-new { justify-content: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; }
.app-new svg { width: 18px; height: 18px; }
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav a, .app-help-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 560; font-size: .93rem; transition: background .15s, color .15s; position: relative; }
.app-nav a svg, .app-help-link svg { width: 18px; height: 18px; flex: none; }
.app-nav a:hover, .app-help-link:hover { background: var(--surface-2); color: var(--text); }
.app-nav a.active, .app-help-link.active { background: var(--accent-soft); color: var(--accent); }
.app-nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.app-nav .side-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; font-weight: 700; }
.app-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.quota-card { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; color: var(--text); }
.quota-card .q-label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.quota-card .q-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.quota-card .progress { margin-top: 4px; height: 6px; }
.quota-card.full .q-val { color: var(--warn); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.user-chip .avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; background: linear-gradient(135deg, #4f46e5, #10b981); }
.user-chip .u-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.user-chip b, .user-chip small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip b { font-size: .88rem; }
.user-chip small { color: var(--muted); font-size: .75rem; }
.app-icon-btn { border: 0; background: transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; flex: none; }
.app-icon-btn:hover { background: var(--surface-2); color: var(--text); }
.app-icon-btn svg { width: 18px; height: 18px; }
.app-close, .app-menu { display: none; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.app-crumb { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); min-width: 0; }
.app-crumb a { color: var(--muted); text-decoration: none; }
.app-crumb a:hover { color: var(--accent); }
.app-crumb span:last-child { color: var(--text); font-weight: 600; }
.app-top-actions { margin-left: auto; display: flex; gap: 4px; }
.app-top-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: .86rem; font-weight: 560; }
.app-top-link:hover { background: var(--surface-2); color: var(--text); }
.app-top-link svg { width: 16px; height: 16px; }
.app-content { padding: 28px 28px 80px; max-width: 1680px; width: 100%; }
.app-content .page-head { padding-top: 0; }
.app-content .wrap.wide, .app-content .wrap { max-width: none; padding: 0; }
.app-backdrop { display: none; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.menu-open .app-side { transform: none; }
  body.menu-open .app-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 25; }
  .app-close, .app-menu { display: grid; }
  .app-top { padding: 0 14px; }
  .app-content { padding: 20px 16px 90px; }
  .app-top-link span { display: none; }
  .app-nav a.active::before { display: none; }
}

/* Reiter (Einstellungen) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 22px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
fieldset.plain { border: 0; padding: 0; margin: 0; box-shadow: none; background: none; }

/* Animationen (dezent) */
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-enter { animation: view-in .28s ease both; }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.sk { border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 0, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 50%, var(--surface-2) 100%); background-size: 800px 100%; animation: shimmer 1.3s linear infinite; }
.sk-title { height: 30px; width: 40%; margin-bottom: 20px; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.sk-card { height: 96px; }
.sk-block { height: 220px; }
@keyframes pop-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.ready, .diag-ok, .alert-ok { animation: pop-in .3s ease both; }
.check-anim { width: 52px; height: 52px; flex: none; }
.check-anim circle { fill: none; stroke: var(--mint); stroke-width: 3; stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .6s ease forwards; }
.check-anim path { fill: none; stroke: var(--mint); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .5s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ready-icon { animation: pop-in .4s ease both; }
@media (prefers-reduced-motion: reduce) { .view-enter, .ready, .diag-ok, .alert-ok, .ready-icon, .d-step, .sk { animation: none !important; } .check-anim circle, .check-anim path { stroke-dashoffset: 0; animation: none; } }

/* SMTP-Assistent & Diagnose */
.wiz-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.wiz-head h3 { margin: 2px 0 2px; font-size: 1.05rem; }
.wiz-head p { margin: 0; font-size: .9rem; }
.wiz-n { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #fff; background: linear-gradient(135deg, #4f46e5, #6366f1); }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.prov { border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; padding: 12px; border-radius: 12px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, transform .1s; }
.prov:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.prov[aria-checked="true"] { border-color: var(--accent); box-shadow: var(--ring); background: var(--accent-soft); color: var(--accent); }
.prov:active { transform: scale(.98); }
.prov-tip { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--text); font-size: .9rem; border-left: 3px solid var(--accent); animation: pop-in .25s ease both; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-lg); }
.diag-panel h3 { margin-top: 0; }
.diag { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; }
.d-step { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; animation: view-in .25s ease both; }
.d-step b { font-weight: 600; font-size: .93rem; }
.d-step small { display: block; color: var(--muted); font-size: .8rem; word-break: break-word; }
.d-step.fail { background: var(--err-soft); }
.d-step.skip b { color: var(--muted); font-weight: 500; }
.d-ico { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; }
.d-ico.ok { background: var(--mint); color: #fff; }
.d-ico.fail { background: var(--err); color: #fff; }
.d-ico.skip { background: var(--surface-2); color: var(--muted); }
.d-ico.run .spinner { width: 16px; height: 16px; }
.diag-ok { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 14px; background: var(--ok-soft); }
.diag-ok p { margin: 4px 0 0; }
.diag-help { padding: 16px 18px; border-radius: 14px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.diag-help h3 { margin: 0 0 4px; color: var(--warn); }
.diag-help ul { margin: 6px 0 0; padding-left: 20px; }
.diag-help li { margin-bottom: 4px; }
.feature-lock { display: flex; gap: 18px; align-items: flex-start; }
.lock-icon { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--mint-soft)); }
.lock-icon svg { width: 26px; height: 26px; }

/* Hilfe in der App */
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--text); }
.guide-card .icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--mint-soft)); margin-bottom: 6px; }
.guide-card .icon svg { width: 18px; height: 18px; }
.guide-card small { color: var(--muted); }
.guide { scroll-margin-top: 80px; }
.guide-steps { counter-reset: g; list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.guide-steps li { counter-increment: g; position: relative; padding-left: 44px; display: flex; flex-direction: column; gap: 2px; }
.guide-steps li::before { content: counter(g); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--accent-soft); color: var(--accent); }
.guide-steps li span { color: var(--muted); }
.guide-table td { font-size: .86rem; vertical-align: top; }
.guide-err summary { font-weight: 650; }
.guide-err ul { margin: 6px 0 0; color: var(--muted); }

/* Einführungstour */
.tour { position: fixed; inset: 0; z-index: 90; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .55); transition: all .3s ease; pointer-events: none; }
.tour-card { position: fixed; z-index: 91; background: var(--surface); color: var(--text); border-radius: 16px; padding: 18px; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .5); border: 1px solid var(--line); animation: pop-in .25s ease both; }
.tour-card.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); animation: none; }
.tour-card h3 { margin: 6px 0 6px; font-size: 1.1rem; }
.tour-card p { margin: 0 0 14px; color: var(--muted); font-size: .93rem; }
.tour-prog { display: flex; gap: 4px; }
.tour-prog span { height: 4px; flex: 1; border-radius: 2px; background: var(--surface-2); }
.tour-prog span.on { background: linear-gradient(90deg, var(--accent), var(--mint)); }
.tour-actions { display: flex; gap: 8px; align-items: center; }
.tour:has(.tour-card.center) .tour-spot { box-shadow: 0 0 0 9999px rgba(15, 23, 42, .55); width: 0 !important; height: 0 !important; left: 50% !important; top: 50% !important; opacity: 1 !important; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
body[data-page="feature"] .hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
body:has(.sticky-actions) .support-fab { bottom: 96px; }
body:has(.sticky-actions) .support-panel { bottom: 160px; }
@media (max-width: 760px) { body:has(.sticky-actions) .support-fab { bottom: 132px; } }

/* Microsoft 365 */
.btn-ms { background: #fff; color: #1f1f1f; border: 1px solid #8c8c8c; font-weight: 600; gap: 10px; }
.btn-ms:hover { background: #f3f3f3; color: #1f1f1f; border-color: #6f6f6f; }
.ms-box { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ms-box p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); max-width: 44em; }
.ms-head { display: flex; gap: 14px; align-items: center; }
.ms-head b { display: block; font-size: 1.05rem; }
.ms-head span { color: var(--muted); }
#f-smtp.ms-mode .wiz:not(:first-of-type), #f-smtp.ms-mode .sticky-actions { display: none; }
.ms-wait { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); animation: view-in .2s ease both; }
.ms-wait[hidden] { display: none; }
.ms-wait-card { background: var(--surface); border-radius: 20px; padding: 28px; max-width: 400px; text-align: center; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .5); }
.ms-wait-card h3 { margin: 12px 0 6px; }
.ms-wait-card p { color: var(--muted); margin: 0 0 8px; }
body.oauth-done .auth-wrap { min-height: 100vh; }

/* ---------- Nur fehlende Angaben (statt ganzem Formular) ---------- */
.workspace.quick-mode { grid-template-columns: 1fr; }
.workspace.quick-mode #form { display: none; }
.workspace.quick-mode .preview { position: static; height: min(78vh, 980px); }
.quickfix { background: var(--surface); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow); margin-top: 6px; animation: rise .35s ease both; }
.qf-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.qf-head h2 { margin: 0; font-size: 1.25rem; }
.qf-head p { margin: 4px 0 0; }
.qf-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-weight: 800; font-size: 1.1rem; }
.qf-form { display: grid; gap: 10px; margin: 0 0 14px; }
.qf-row { display: grid; grid-template-columns: minmax(170px, 260px) 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .2s, background .2s; }
.qf-row.done { background: color-mix(in srgb, var(--ok-soft) 70%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.qf-row.done .qf-label::after { content: " ✓"; color: var(--ok); }
.qf-label { font-weight: 600; font-size: .95rem; }
.qf-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.qf-in { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; margin: 0; }
.qf-in span { font-size: .78rem; color: var(--muted); }
.qf-in input { width: 100%; }
.qf-notes { font-size: .86rem; margin: 0 0 12px; }
.qf-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .qf-row { grid-template-columns: 1fr; } .quickfix { padding: 18px 16px; } }
.ready-foot { margin: 14px 0 0; font-size: .9rem; }

/* ---------- Sammel-Upload ---------- */
.bulk { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); margin: 0 0 18px; }
.bulk-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.bulk-head h2 { margin: 0; font-size: 1.15rem; }
.bulk-head p { margin: 4px 0 0; }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk .progress { margin: 14px 0 12px; }
.bulk .progress span { transition: width .4s ease; }
.bulk-table td { vertical-align: middle; }
.bulk-table .b-file { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bulk-table tr.b-wait td { color: var(--muted); }
.bulk-table .hint { margin-top: 3px; }
.badge .spinner { width: 10px; height: 10px; border-width: 2px; vertical-align: -1px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Rechnungen (Archiv) ---------- */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dropzone.dz-compact { display: flex; align-items: center; gap: 16px; text-align: left; padding: 18px 22px; margin-bottom: 18px; }
.dropzone.dz-compact svg { margin: 0; flex: none; width: 34px; height: 34px; }
.dropzone.dz-compact strong { font-size: 1rem; }
.dropzone.dz-compact .muted { display: block; font-size: .88rem; }
.inv-panel { padding-top: 16px; }
.inv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-toolbar input[type=search] { max-width: 300px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); padding: 7px 12px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.seg .cnt { font-weight: 500; font-size: .8rem; margin-left: 2px; color: var(--muted); }
.inv-bulkbar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 12px; animation: rise .2s ease both; }
.inv-table td { vertical-align: middle; }
.inv-table .sel { width: 34px; }
.inv-table .inv-src { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-table .inv-act { text-align: right; white-space: nowrap; }
.inv-table .inv-act .btn { margin-left: 6px; }
.inv-table .inv-act .app-icon-btn { display: inline-grid; margin-left: 4px; vertical-align: middle; color: var(--muted); }
.inv-table .inv-act .app-icon-btn:hover { color: var(--err); }
.small-note { font-size: .82rem; margin: 6px 2px 0; }
.inv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.inv-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; }
.inv-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.inv-tile .k { font-size: .85rem; color: var(--muted); font-weight: 600; }
.inv-tile .v { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.inv-tile.t-review .v { color: var(--warn); }
.inv-tile.t-ready .v { color: var(--info); }
.inv-tile.t-sent .v { color: var(--ok); }
@media (max-width: 640px) { .inv-tiles { gap: 8px; } .inv-tile { padding: 12px; } .inv-tile .k { font-size: .74rem; } .inv-tile .v { font-size: 1.4rem; } .inv-table .inv-act .btn { margin: 4px 0 0 4px; } }

/* ---------- Einrichtung ---------- */
.setup { max-width: 860px; margin: 0 auto; }
.setup-head { text-align: center; margin: 8px 0 22px; }
.setup-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 10px 0 8px; letter-spacing: -.02em; }
.setup-head p { max-width: 640px; margin: 0 auto; }
.setup-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .82rem; }
.setup-steps { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 18px 0 0; counter-reset: s; }
.setup-steps li { counter-increment: s; font-size: .85rem; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: var(--surface-2); }
.setup-steps li::before { content: counter(s) " · "; font-weight: 700; color: var(--accent); }
.setup-form legend { display: flex; align-items: center; gap: 8px; }
.setup-form legend .n { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: .8rem; }
.setup-actions { display: flex; justify-content: flex-end; margin: 8px 0 30px; }
.hint.strong, .hint .strong { color: var(--warn); font-weight: 600; }
body.setup-mode .app-new, body.setup-mode #app-quota { visibility: hidden; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .quickfix, .inv-bulkbar { animation: none; } }

/* ---------- E-Mail-Versand: Einrichtung ---------- */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.method { position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.method:hover { transform: translateY(-1px); }
.method[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.method b { font-size: 1.05rem; }
.method > span:last-child { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.m-badge { align-self: flex-start; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.m-badge.alt { background: var(--ok-soft); color: var(--ok); }
.detect-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.detect-row .f { flex: 1 1 280px; margin: 0; }
.prov-card { margin: 18px 0 14px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); animation: rise .25s ease both; }
.prov-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.prov-head > div { display: flex; flex-direction: column; }
.prov-head .muted { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.prov-head b { font-size: 1.1rem; }
.prov-notes { margin: 10px 0 0; padding-left: 20px; font-size: .92rem; }
.prov-notes li { margin: 3px 0; }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lbl-row label { margin-bottom: 6px; }
.ext-link { font-size: .84rem; font-weight: 600; white-space: nowrap; }
details.srv { margin: 6px 0 4px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
details.srv summary { cursor: pointer; font-size: .9rem; color: var(--muted); }
details.srv[open] summary { margin-bottom: 10px; }
.call-provider { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); font-size: .9rem; }
.alt-plat { margin: 12px 0 0; font-size: .92rem; }
.conn-head { display: flex; gap: 14px; align-items: center; }
.conn-head > div { display: flex; flex-direction: column; min-width: 0; }
.conn-head span:not(.conn-ico) { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.conn-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.conn-ico svg { width: 22px; height: 22px; }
.plat-preview { font-size: .9rem; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
#own-box .diag-panel, #plat-box .diag-panel { margin-top: 16px; }
.addr-row { display: flex; align-items: stretch; }
.addr-row input { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1 1 auto; min-width: 0; }
.addr-domain { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface-2); color: var(--muted); font-size: .92rem; white-space: nowrap; }
.hint.bad { color: var(--err); }
@media (max-width: 520px) { .addr-row:has(.addr-domain) { flex-direction: column; } .addr-row:has(.addr-domain) input { border-radius: 10px; } .addr-domain { border: 0; padding: 4px 0 0; background: none; } }

/* ---------- Rechnungen: Detailspalte ---------- */
.inv-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.inv-split.open { grid-template-columns: minmax(0, 1fr) 400px; }
.inv-table tbody tr[data-id] { cursor: pointer; transition: background .12s; }
.inv-table tbody tr[data-id]:hover { background: var(--surface-2); }
.inv-table tbody tr.sel-row { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.inv-split.open .inv-table th:nth-child(7), .inv-split.open .inv-table td:nth-child(7) { display: none; } /* Format-Spalte ausblenden */
.inv-detail { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 20px; animation: rise .2s ease both; }
.inv-detail[hidden] { display: none; }
.idt-loading { display: grid; place-items: center; min-height: 240px; }
.idt-bar { display: flex; align-items: center; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.idt-ico { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 10px; color: var(--muted); cursor: pointer; text-decoration: none; }
.idt-ico svg { width: 20px; height: 20px; }
.idt-ico:hover { background: var(--surface-2); color: var(--text); }
.idt-ico.danger:hover { color: var(--err); background: var(--err-soft); }
.idt-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.idt-head > div { display: flex; flex-direction: column; min-width: 0; }
.idt-head .muted { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.idt-head h2 { margin: 2px 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.idt-cta { margin-bottom: 12px; }
.btn-block { width: 100%; justify-content: center; }
.idt-thumb { display: grid; place-items: center; position: relative; width: 100%; min-height: 180px; max-height: 340px; overflow: hidden; padding: 0; margin: 0 0 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: zoom-in; }
.idt-thumb canvas { display: block; width: 100%; height: auto; }
.idt-zoom { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(15, 23, 42, .65); color: #fff; font-size: .9rem; }
.idt-sec { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.idt-sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.idt-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .9rem; }
.idt-row span { color: var(--muted); flex: none; }
.idt-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.idt-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 1rem; }
.idt-total span { color: var(--text); font-weight: 600; }
.idt-lines, .idt-sends, .idt-open { list-style: none; margin: 0; padding: 0; }
.idt-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: .88rem; border-bottom: 1px dashed var(--line); }
.idt-lines li:last-child { border-bottom: 0; }
.idt-lines small, .idt-sends small { display: block; color: var(--muted); font-size: .8rem; }
.idt-lines b { white-space: nowrap; font-weight: 600; }
.idt-sends li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: .86rem; }
.idt-open li { padding: 6px 10px; margin: 0 0 6px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: .88rem; }
.idt-empty { font-size: .88rem; margin: 4px 0 0; }
.inv-backdrop { display: none; }
@media (max-width: 1199px) {
  .inv-split.open { grid-template-columns: minmax(0, 1fr); }
  .inv-split.open .inv-table th:nth-child(7), .inv-split.open .inv-table td:nth-child(7) { display: table-cell; }
  .inv-detail { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(440px, 100vw); max-height: none; border-radius: 0; border: 0; animation: slide-in .22s ease both; }
  .inv-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(15, 23, 42, .4); }
}
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .inv-detail { animation: none; } }
.addr-prefix { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-2); color: var(--muted); font-size: .88rem; white-space: nowrap; }
.addr-prefix + input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; flex: 1 1 auto; }
#reg-preview .strong { color: var(--warn); font-weight: 600; }

/* ---------- DATEV ---------- */
.addon-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 70%, var(--surface)), var(--surface)); }
.addon-hero h2 { margin: 8px 0 6px; }
.addon-points { margin: 6px 0 0; padding-left: 20px; }
.addon-points li { margin: 4px 0; }
.addon-buy { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 200px; }
.addon-price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.addon-price small { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.dv-map input, .dv-own input { width: 100%; }
.dv-map .acc-in, .dv-own .acc-in { max-width: 120px; }
.dv-map .bu-in, .dv-own .bu-in { max-width: 70px; }
.dv-map td:first-child { min-width: 220px; }
.dv-h3 { font-size: 1rem; margin: 18px 0 8px; }
.inline-num { width: 110px !important; display: inline-block; padding: 4px 8px !important; margin-left: 6px; }
#form:not(.has-datev) .c-acc { display: none; }
.c-acc .l-acc { width: 84px; }
.datev-tag { color: var(--ok) !important; font-weight: 600; }
.idt-lines .kto { color: var(--accent); font-weight: 600; }
.addon-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; max-width: 900px; margin: 22px auto 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.addon-strip h3 { margin: 8px 0 4px; }
.addon-strip p { margin: 0; max-width: 560px; }

/* ── Startseite: Werbespot ─────────────────────────────────────────────── */
.spot-teaser { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--text); text-decoration: none; font-size: .93rem; }
.spot-teaser b { font-weight: 650; }
.spot-teaser span:last-child { color: var(--muted); }
.spot-teaser span:last-child b { color: var(--text); }
.spot-teaser-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--on-accent); background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); transition: transform .2s; }
.spot-teaser-icon svg { width: 15px; height: 15px; margin-left: 2px; }
.spot-teaser-icon::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); animation: spot-ring 2.4s ease-out infinite; }
.spot-teaser:hover .spot-teaser-icon { transform: scale(1.08); }
.spot-teaser:hover span:last-child { color: var(--accent); }

.spot { position: relative; padding: 72px 0 80px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px) 0 0 / 48px 48px;
  border-top: 1px solid var(--line); }
.spot::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(transparent, var(--bg)); z-index: -1; }
.spot-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.spot-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
.spot-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 0 color-mix(in srgb, var(--err) 60%, transparent); animation: spot-live 2s infinite; }
.spot-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.12; letter-spacing: -.025em; margin: 16px 0 12px; }
.spot-head h2 span { background: linear-gradient(110deg, var(--accent) 20%, var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spot-head p { color: var(--muted); font-size: 1.08rem; margin: 0 auto; max-width: 40em; }

.spot-stage { position: relative; max-width: 1000px; margin: 0 auto; }
.spot-glow { position: absolute; inset: 8% 6% -6%; z-index: -1; border-radius: 40px; filter: blur(60px); opacity: .55;
  background: conic-gradient(from 210deg at 50% 50%, color-mix(in srgb, var(--brand) 70%, transparent), color-mix(in srgb, var(--mint) 55%, transparent), color-mix(in srgb, var(--accent) 60%, transparent), color-mix(in srgb, var(--brand) 70%, transparent));
  animation: spot-glow 9s ease-in-out infinite; }
.spot-frame { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #f8fafc; border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  box-shadow: 0 40px 80px -40px rgba(15, 23, 42, .45), 0 0 0 8px color-mix(in srgb, var(--surface) 70%, transparent); }
.spot-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #f8fafc; }

.spot-play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; gap: 16px; padding: clamp(16px, 3.4vw, 34px); border: 0; cursor: pointer; font: inherit; color: var(--text);
  background: linear-gradient(0deg, rgba(248, 250, 252, .92) 0%, rgba(248, 250, 252, .55) 26%, rgba(248, 250, 252, 0) 55%); transition: opacity .35s, visibility .35s; }
.spot-play-btn { position: relative; display: grid; place-items: center; width: clamp(46px, 7vw, 78px); aspect-ratio: 1; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #6366f1, #4f46e5 55%, #10b981);
  box-shadow: 0 18px 36px -12px rgba(79, 70, 229, .75); transition: transform .25s cubic-bezier(.2, .9, .3, 1.3); }
.spot-play-btn svg { width: 42%; height: 42%; margin-left: 6%; }
.spot-play-btn::before, .spot-play-btn::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(99, 102, 241, .45); animation: spot-ring 2.4s ease-out infinite; }
.spot-play-btn::after { animation-delay: 1.2s; }
.spot-play-label { display: grid; text-align: left; line-height: 1.25; padding-bottom: 4px; }
.spot-play-label b { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 700; color: #0f172a; }
.spot-play-label small { font-size: .85rem; color: #475569; font-weight: 550; }
.spot-play:hover .spot-play-btn, .spot-play:focus-visible .spot-play-btn { transform: scale(1.08); }
.spot-play:focus-visible { outline: none; }
.spot-play:focus-visible .spot-play-btn { box-shadow: 0 0 0 4px #fff, 0 0 0 7px #4f46e5; }
.spot-frame.is-started .spot-play { opacity: 0; visibility: hidden; }

.spot-end { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 20px; padding: 24px; text-align: center;
  background: color-mix(in srgb, #f8fafc 86%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: spot-fade .4s ease-out both; }
.spot-end[hidden] { display: none; }
.spot-end-title { margin: 0; font-size: clamp(1.3rem, 3vw, 2.1rem); font-weight: 750; letter-spacing: -.03em; color: #0f172a; }
.spot-end-title span { color: #10b981; }
.spot-end-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.spot-end .btn-secondary { background: #fff; color: #0f172a; border-color: #e2e8f0; }

.spot-float { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; font-size: .86rem; font-weight: 650; white-space: nowrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: spot-float 7s ease-in-out infinite; pointer-events: none; }
.spot-float i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .72rem; font-weight: 800; }
.spot-float i.ok { background: var(--mint-soft); color: var(--ok); }
.spot-float i.ind { background: var(--accent-soft); color: var(--accent); }
.spot-float.f1 { left: -78px; top: 12%; }
.spot-float.f2 { right: -84px; bottom: 16%; animation-delay: -2.3s; }
.spot-float.f3 { left: -96px; top: 69%; animation-delay: -4.6s; }
.spot.is-playing .spot-float { opacity: 0; transform: scale(.9); transition: opacity .4s, transform .4s; animation-play-state: paused; }

.spot-chapters { list-style: none; padding: 0; margin: 28px auto 0; max-width: 1000px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.spot-chapters button { position: relative; width: 100%; display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.spot-chapters button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); box-shadow: var(--shadow); }
.spot-chapters button:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.spot-chapters .t { font-size: .8rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.spot-chapters .l { font-size: .9rem; font-weight: 600; }
.spot-chapters button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--accent), var(--mint)); }
.spot-chapters button[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }

@keyframes spot-ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes spot-live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--err) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes spot-glow { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: .7; transform: scale(1.04); } }
@keyframes spot-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spot-fade { from { opacity: 0; } }

@media (max-width: 1180px) { .spot-float.f1 { left: -18px; } .spot-float.f2 { right: -18px; } .spot-float.f3 { display: none; } }
@media (max-width: 860px) {
  .spot { padding: 52px 0 56px; }
  .spot-float { display: none; }
  .spot-frame { border-radius: 16px; box-shadow: 0 24px 48px -28px rgba(15, 23, 42, .5); }
  .spot-chapters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) { .spot-play { gap: 10px; } .spot-play-label small { display: none; } .spot-play-btn::after { display: none; } .spot-play-btn::before { inset: -5px; } .spot-chapters { gap: 8px; } .spot-chapters button { padding: 10px 12px; } .spot-chapters .l { font-size: .84rem; } }
@media (prefers-reduced-motion: reduce) {
  .spot-glow, .spot-float, .spot-play-btn::before, .spot-play-btn::after, .spot-teaser-icon::after, .spot-eyebrow .dot { animation: none; }
}
@media (max-width: 640px) {
  .spot-end { gap: 10px; padding: 12px; }
  .spot-end-title { font-size: 1.05rem; }
  .spot-end-actions { gap: 8px; flex-wrap: nowrap; }
  .spot-end-actions .btn { padding: 9px 12px; font-size: .84rem; white-space: nowrap; }
  .spot-end-actions .btn svg { width: 15px; height: 15px; }
}

/* ── Einzelumwandlungen & Mehrumwandlungen ─────────────────────────────── */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--accent-strong); }
.quota-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.credit-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.credit-panel > div:first-child { flex: 1 1 360px; }
.credit-buy { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.credit-buy select { width: auto; min-width: 150px; }
.credit-count { display: grid; justify-items: center; text-align: center; min-width: 150px; padding: 14px 18px; border-radius: 14px; background: var(--accent-soft); }
.credit-count b { font-size: 2rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.credit-count span { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.single-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; max-width: 900px; margin: 22px auto 0; padding: 22px 26px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--mint-soft) 70%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.single-strip .single-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.single-strip .single-icon svg { width: 26px; height: 26px; }
.single-strip h3 { margin: 0 0 4px; }
.single-strip p { margin: 0; }
.single-strip .single-price { text-align: right; display: grid; gap: 8px; justify-items: end; }
.single-strip .single-price b { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.single-strip .single-price small { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; margin-top: 4px; }
@media (max-width: 720px) { .single-strip { grid-template-columns: 1fr; text-align: left; } .single-strip .single-price { justify-items: start; text-align: left; } }
.dv-sub { margin: -2px 0 10px 28px; display: grid; gap: 4px; }
.dv-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .92rem; }

/* ── Echtheitsprüfung ─────────────────────────────────────────────────── */
.verify-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start; }
.verify-intro h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.025em; margin: 14px 0 12px; }
.spot-eyebrow .dot.ok { background: var(--mint); animation: none; box-shadow: none; }
.verify-card h2 { margin-top: 0; }
.verify-row { display: flex; gap: 10px; margin-top: 12px; }
.verify-row input { flex: 1; font-size: 1.25rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
#verify-result { margin-top: 14px; }
.verify-ok { border: 1px solid color-mix(in srgb, var(--mint) 45%, var(--line)); background: var(--ok-soft); border-radius: 14px; padding: 16px; }
.verify-ok-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.verify-ok-head b { display: block; }
.verify-ok-head span { font-size: .88rem; color: var(--muted); }
.verify-ok-ico { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; font-weight: 800; }
.check-list { padding-left: 1.2em; }
.check-list li { margin: 6px 0; }
@media (max-width: 860px) { .verify-wrap { grid-template-columns: 1fr; gap: 20px; } }

/* ── E-Mail-Texte: Vorlagen, Signatur, Vorschau ───────────────────────── */
.mt-panel h3 { font-size: 1.1rem; }
.mt-grid { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.mt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mt-item { width: 100%; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.mt-item span { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-item.on { border-color: var(--accent); background: var(--accent-soft); }
.mt-item:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mt-edit .f { margin-bottom: 12px; }
.mt-edit textarea { font-family: var(--font); line-height: 1.5; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.ph-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sig-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--surface-2); }
.sig-toolbar button, .sig-toolbar select { font: inherit; font-size: .85rem; border: 1px solid transparent; background: transparent; color: var(--text); border-radius: 8px; padding: 5px 9px; cursor: pointer; }
.sig-toolbar button:hover:not(:disabled) { background: var(--surface); border-color: var(--line); }
.sig-toolbar button:disabled { opacity: .45; cursor: default; }
.sig-toolbar select { border-color: var(--line); background: var(--surface); width: auto; }
.sig-toolbar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; }
.sig-color { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 0 6px; }
.sig-color input { width: 28px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.sig-editor { min-height: 130px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 0 0 12px 12px; background: #fff; color: #1f2937; font-family: Segoe UI, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.55; outline: none; }
.sig-editor:focus { border-color: var(--accent); box-shadow: var(--ring); }
.sig-editor a { color: #4f46e5; }
.sig-editor img { display: block; margin: 6px 0; max-width: 100%; height: auto; }
.sig-toolbar[hidden] + .sig-editor { border-radius: 12px; }
.sig-logo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.sig-logo-prev { min-width: 140px; min-height: 64px; display: grid; place-items: center; padding: 8px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; }
.sig-logo-prev img { max-width: 200px; max-height: 70px; }
.sig-logo-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; flex: 1; }
.sig-logo-ctl .hint { flex-basis: 100%; }
.sig-width { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.sig-width input { width: 140px; }
.sig-platform { margin-top: 14px; }
.mail-preview { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.mp-subj { padding: 10px 14px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; color: #0f172a; font-size: .92rem; }
.mail-preview iframe { display: block; width: 100%; height: 520px; border: 0; background: #fff; }
@media (max-width: 860px) { .mt-grid { grid-template-columns: 1fr; } .mail-preview iframe { height: 460px; } }
.mt-item .badge { justify-self: start; width: auto; margin-top: 2px; }
.sig-logo-drop { width: 220px; min-height: 90px; display: grid; place-items: center; text-align: center; padding: 10px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-size: .86rem; transition: border-color .15s, background .15s; }
.sig-logo-drop:hover, .sig-logo-drop:focus-visible, .sig-logo-drop.over { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.sig-logo-drop img { max-width: 200px; max-height: 80px; }
.sig-logo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sig-status { flex-basis: 100%; font-size: .85rem; min-height: 1.2em; color: var(--muted); }
.sig-status[data-kind="ok"] { color: var(--ok); }
.sig-status[data-kind="err"] { color: var(--err); }
/* KI-Testsatz */
.tb-exp { display: grid; grid-template-columns: minmax(220px, 1fr) 1.3fr; gap: 16px; align-items: start; }
.tb-img { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tb-img img { display: block; width: 100%; height: auto; }
.tb-mm { margin: 6px 0 0; padding-left: 1.1em; font-size: .86rem; display: grid; gap: 4px; }
@media (max-width: 860px) { .tb-exp { grid-template-columns: 1fr; } }
.modal:has(.tb-exp) { width: min(1100px, 96vw); max-width: 96vw; }
@media (max-width: 860px) { .tb-img { max-height: 45vh; } }

/* ---------- to-e-rechnung Drucker ---------- */
.key-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; background: var(--surface-2); }
.key-box code { font-size: 1.05rem; font-weight: 650; letter-spacing: .06em; word-break: break-all; user-select: all; }
.dr-dl { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.dr-steps { margin: 12px 0 0; padding-left: 20px; }
.dr-steps li { margin: 4px 0; }
.btn.disabled, .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.drucker-visual { display: grid; gap: 12px; }
.dv-line { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dv-line > div { display: flex; flex-direction: column; min-width: 0; }
.dv-line .muted { font-size: .85rem; overflow-wrap: anywhere; }
.dv-ico { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dv-ico svg { width: 20px; height: 20px; }
.dv-line.ok .dv-ico { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 640px) {
  table.dr-devices thead { display: none; }
  table.dr-devices tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.dr-devices td { border: 0; padding: 0; }
  table.dr-devices td::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
  table.dr-devices td.c-del::before { content: none; }
}

/* ---------- Erfassung im Hintergrund & Prüfansicht ---------- */
.inv-issue { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--warn); }
.inv-issue.err { color: var(--err); }
.inv-act .btn + .btn { margin-left: 6px; }
.review-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 12px; font-size: .92rem; }
.review-nav b { color: var(--accent-strong); }
.preview-note { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 9px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
@media (max-width: 980px) { .preview-note { position: static; display: block; margin: 8px; } }
/* Prüfen/Bearbeiten in der App: ganze Bildschirmbreite nutzen, Beleg rechts mitlaufend */
.app-content:has(#workspace:not(.hidden)) { max-width: none; }
@media (min-width: 1280px) {
  .app-content:has(#workspace:not(.hidden):not(.no-preview)) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 43%); column-gap: 26px; align-items: start; }
  .app-content:has(#workspace:not(.hidden):not(.no-preview)) > * { grid-column: 1; min-width: 0; }
  .app-content:has(#workspace:not(.hidden):not(.no-preview)) > #workspace { display: contents; }
  .app-content:has(#workspace:not(.hidden):not(.no-preview)) #form { grid-column: 1; min-width: 0; }
  .app-content:has(#workspace:not(.hidden):not(.no-preview)) #preview,
  .app-content:has(#workspace:not(.hidden):not(.no-preview)) .workspace.quick-mode #preview { grid-column: 2; grid-row: 1 / span 30; position: sticky; top: 74px; height: calc(100vh - 92px); min-height: 520px; }
}
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .74rem; font-weight: 700; text-align: center; }
.nav-badge.busy { background: var(--info-soft); color: var(--info); }
@media (min-width: 1280px) { .app-content:has(#workspace:not(.hidden):not(.no-preview)) .workspace .two-col { grid-template-columns: 1fr; } }
@media (min-width: 1920px) { .app-content:has(#workspace:not(.hidden):not(.no-preview)) .workspace .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- CRM (Kunden) ---------- */
.crm-nav { margin: 0 0 16px; }
.crm-nav a { display: inline-block; font-weight: 600; font-size: .9rem; color: var(--muted); padding: 7px 14px; border-radius: 9px; text-decoration: none; transition: background .15s, color .15s; }
.crm-nav a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.crm-nav a:hover:not(.on) { color: var(--text); }
.stat.warn .v { color: var(--err); }
.crm-kpis.small { grid-template-columns: 1fr 1fr; }
.crm-kpis.small .stat { padding: 14px 16px; }
.crm-kpis.small .stat .v { font-size: 1.3rem; }
.chip { display: inline-block; margin: 2px 4px 0 0; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .74rem; font-weight: 600; }
.hint.err { color: var(--err); }
.crm-table tbody tr { cursor: pointer; }
.crm-table tbody tr:hover { background: var(--surface-2); }
.crm-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.crm-back svg { width: 16px; height: 16px; }
.crm-back:hover { color: var(--text); }
.crm-akte { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 1200px) { .crm-akte { grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); } .crm-side { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; } }
.crm-form .panel h2, .crm-side .panel h2 { font-size: 1.05rem; margin: 0 0 12px; }
.crm-save { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.crm-ro { padding: 9px 0; }
.crm-inv td { vertical-align: top; }
.crm-inv .inv-act { white-space: nowrap; text-align: right; }
.crm-note-form { display: grid; gap: 8px; margin-bottom: 12px; }
.crm-note-form textarea { width: 100%; resize: vertical; }
.crm-note-form .btn { justify-self: start; }
.crm-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.crm-notes li { border-left: 3px solid var(--accent-soft); padding: 2px 0 2px 10px; }
.crm-notes p { margin: 2px 0 0; white-space: normal; }
.crm-notes .link-btn { margin-left: 8px; font-size: .78rem; }
.crm-offer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 28px; align-items: center; }
@media (max-width: 860px) { .crm-offer-grid { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { padding-left: 28px; position: relative; line-height: 1.5; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.crm-offer-cta { background: var(--surface-2); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.crm-price { display: grid; gap: 4px; }
.crm-price .v { font-size: 2.2rem; font-weight: 800; letter-spacing: -.5px; }
.crm-price .badge { justify-self: start; }
.crm-dup .table-wrap { margin-bottom: 4px; }
.small-list { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; }
dialog.modal.wide { width: min(980px, 96vw); }
.addon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.addon-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.addon-list li:first-child { border-top: 0; padding-top: 0; }
