/* ==========================================================================
   Gewerbe-Service – Design-System
   Systemschriften (keine externen Fonts → DSGVO-freundlich)
   ========================================================================== */

:root {
  --navy: #0d1b45;
  --navy-2: #13275e;
  --primary: #1f4fd1;
  --primary-600: #1a42b0;
  --primary-50: #eef3ff;
  --primary-100: #dce6ff;
  --accent: #0ea371;
  --accent-50: #e8f8f1;

  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --bg: #f5f7fb;
  --surface: #ffffff;

  --success: #15803d;
  --success-50: #ecfdf3;
  --warning: #b45309;
  --warning-50: #fff8eb;
  --danger: #c02626;
  --danger-50: #fef2f2;
  --violet: #6d28d9;
  --violet-50: #f3efff;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px -20px rgba(13, 27, 69, .35);
  --ring: 0 0 0 4px rgba(31, 79, 209, .16);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--text); letter-spacing: -.015em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.cond-hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }

.icon { width: 1.15em; height: 1.15em; flex: none; stroke-width: 2; }
.icon-lg { width: 26px; height: 26px; stroke-width: 1.8; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.container-narrow { max-width: 880px; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .85em 1.35em; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(31, 79, 209, .35), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(15, 23, 42, .05); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--primary-50); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f3c4c4; }
.btn-danger:hover { background: var(--danger-50); }
.btn-sm { padding: .6em 1em; font-size: .875rem; border-radius: 8px; }
.btn-lg { padding: 1.05em 1.6em; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .7; cursor: progress; }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.1rem; color: var(--navy); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--navy) 100%); box-shadow: 0 6px 14px -6px rgba(31,79,209,.6);
}
.brand-mark svg { width: 19px; height: 19px; stroke-width: 2.4; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a:not(.btn) { color: var(--text-2); font-weight: 500; font-size: .94rem; padding: 8px 12px; border-radius: 8px; }
.main-nav a:not(.btn):hover { background: rgba(15,23,42,.05); text-decoration: none; }
.menu-toggle { display: none; position: relative; }
.header-right { display: flex; align-items: center; gap: 10px; }
.menu-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #f43f5e; border: 2px solid var(--navy); }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
  .menu-toggle svg { width: 22px; height: 22px; }
  .header-right { display: flex; align-items: center; gap: 10px; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px max(16px, env(safe-area-inset-left)) 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 18px 30px -18px rgba(15,23,42,.25); }
  .main-nav.open { display: flex; animation: einblenden .18s ease; }
  .main-nav a:not(.btn) { padding: 14px 12px; font-size: 1rem; border-radius: 10px; }
  .main-nav .btn { display: none; }
}
@media (min-width: 901px) { .header-cta { display: none; } }

/* ---------------------------------------------------------------- Footer */
.site-footer { background: var(--navy); color: #c7d0e6; padding: 56px 0 28px; margin-top: 80px; font-size: .94rem; }
.site-footer a { color: #e3e9f8; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
@media (max-width: 1020px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #93a0c2; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; } .footer-grid > :last-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- Startseite */
.hero {
  position: relative; overflow: hidden; padding: 84px 0 96px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(31,79,209,.16), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(14,163,113,.10), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: .85rem; font-weight: 550;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.eyebrow .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-50); color: var(--accent); }
.eyebrow .dot svg { width: 13px; height: 13px; stroke-width: 3; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); font-weight: 780; letter-spacing: -.035em; line-height: 1.07; margin-bottom: 20px; }
.hero h1 .hl { background: linear-gradient(90deg, var(--primary), #3b82f6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { color: var(--accent); width: 17px; height: 17px; stroke-width: 2.6; }

.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px; position: relative; }
.hero-card::before { content: ""; position: absolute; inset: -14px 18px auto; height: 14px; border-radius: 16px 16px 0 0; background: rgba(255,255,255,.6); border: 1px solid var(--border); border-bottom: 0; }
.hero-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hero-card-head strong { font-size: 1rem; }
.mini-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-steps li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font-weight: 550; font-size: .94rem; }
.mini-steps li small { display: block; color: var(--muted); font-weight: 450; font-size: .82rem; }
.mini-steps .ms-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.mini-steps li.done .ms-icon { background: var(--accent-50); color: var(--accent); }
.mini-steps li.done { background: #fff; }
.signature-demo { margin-top: 14px; border: 1.5px dashed var(--border-strong); border-radius: 12px; height: 74px; display: grid; place-items: center; position: relative; color: var(--navy); }
.signature-demo svg { width: 170px; height: 52px; stroke-width: 2; }
.signature-demo span { position: absolute; left: 14px; bottom: 8px; font-size: .75rem; color: var(--muted); }

@media (max-width: 920px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-card { width: 100%; max-width: 560px; margin: 0 auto; }
  .lead { max-width: none; }
}
@media (max-width: 560px) {
  .hero { padding: 32px 0 44px; }
  .hero h1 { font-size: 2.05rem; }
  .lead { font-size: 1.05rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-trust { flex-direction: column; gap: 8px; }
  .hero-card { padding: 18px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
}

.section { padding: 84px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .kicker { color: var(--primary); font-weight: 650; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 760; letter-spacing: -.03em; }
.section-head p { color: var(--muted); font-size: 1.06rem; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.service-card:hover { text-decoration: none; border-color: var(--primary-100); box-shadow: var(--shadow); transform: translateY(-3px); }
.service-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px; }
.service-icon.anmeldung { background: var(--accent-50); color: var(--accent); }
.service-icon.ummeldung { background: var(--primary-50); color: var(--primary); }
.service-icon.abmeldung { background: #fff1f0; color: #d1432b; }
.service-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.service-card p { color: var(--muted); flex: 1; }
.service-card ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 7px; font-size: .92rem; color: var(--text-2); }
.service-card ul li { display: flex; gap: 8px; align-items: flex-start; }
.service-card ul svg { color: var(--accent); margin-top: 4px; width: 15px; height: 15px; stroke-width: 3; }
.service-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--primary); }
.service-card:hover .service-link svg { transform: translateX(3px); }
.service-link svg { transition: transform .2s; }
.vordruck { font-size: .78rem; color: var(--muted); font-weight: 550; letter-spacing: .02em; border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; margin-left: auto; }
.service-card-top { display: flex; align-items: flex-start; }
@media (max-width: 1020px) { .service-grid { gap: 14px; } .service-card { padding: 22px; } }
@media (max-width: 720px) { .service-grid { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: schritt; position: relative; }
.step-item { position: relative; padding: 0 6px; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; color: var(--primary);
  background: var(--surface); border: 2px solid var(--primary-100); margin-bottom: 18px; position: relative; z-index: 1;
}
.step-item:not(:last-child)::after { content: ""; position: absolute; top: 23px; left: 58px; right: -16px; border-top: 2px dashed var(--primary-100); }
.step-item h3 { font-size: 1.06rem; }
.step-item p { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .step-item::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.feature .f-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); color: var(--primary); border: 1px solid var(--border); flex: none; }
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 22px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 620; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin: 0 0 18px; }

.cta-band {
  border-radius: 24px; padding: 52px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: radial-gradient(600px 300px at 90% 0%, rgba(59,130,246,.45), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 6px; }
.cta-band p, .ratgeber-inhalt .cta-band p { color: #c7d0e6; margin: 0; }
@media (max-width: 640px) { .cta-band { padding: 32px 24px; } }

/* ---------------------------------------------------------------- Karten, Hinweise */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: 24px; }
.card-head { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.02rem; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: .94rem; margin-bottom: 18px; }
.alert svg { margin-top: 2px; }
.alert-info { background: var(--primary-50); border-color: var(--primary-100); color: #1e3a8a; }
.alert-erfolg { background: var(--success-50); border-color: #bbe9cd; color: #14532d; }
.alert-fehler { background: var(--danger-50); border-color: #f6caca; color: #7f1d1d; }
.alert-warnung { background: var(--warning-50); border-color: #f5dcae; color: #7c2d12; }
.flash-wrap { padding-top: 18px; }

/* ---------------------------------------------------------------- Formulare */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px 16px; }
.field { grid-column: span 12; min-width: 0; }
.span-halb { grid-column: span 6; }
.span-drittel { grid-column: span 4; }
.span-zweidrittel { grid-column: span 8; }
@media (max-width: 640px) { .span-halb, .span-drittel, .span-zweidrittel { grid-column: span 12; } }

.label { display: block; font-weight: 600; font-size: .9rem; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.req { color: var(--danger); }
.optional { color: var(--muted); font-weight: 450; font-size: .82rem; }
.input, .field input[type=text], .field input[type=email], .field input[type=url], .field input[type=tel], .field input[type=date],
.field input[type=number], .field input[type=password], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 13px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.field input::placeholder, .field textarea::placeholder { color: #a0aabb; }
.help { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.error-text { font-size: .84rem; color: var(--danger); margin: 6px 0 0; font-weight: 550; }
.error-text:empty { display: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger) !important; }
.has-error input:focus, .has-error select:focus, .has-error textarea:focus { box-shadow: 0 0 0 4px rgba(192,38,38,.14) !important; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.option-group legend { margin-bottom: 8px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); font-size: .93rem; font-weight: 520; color: var(--text-2); transition: all .15s; user-select: none;
}
.option span::before {
  content: ""; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border-strong); background: #fff; flex: none;
  transition: all .15s;
}
.option input[type=radio] + span::before { border-radius: 50%; }
.option:hover span { border-color: var(--primary); }
.option input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary-600); }
.option input:checked + span::before {
  border-color: var(--primary); background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}
.option input[type=radio]:checked + span::before { background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.option input:focus-visible + span { box-shadow: var(--ring); }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .95rem; color: var(--text-2); }
.check input {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 2px 0 0; border-radius: 6px; border: 1.5px solid var(--border-strong);
  background: #fff; flex: none; cursor: pointer; transition: all .15s;
}
.check input:checked {
  border-color: var(--primary); background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.check input:focus-visible { box-shadow: var(--ring); outline: none; }
.has-error .check input { border-color: var(--danger); }

/* ---------------------------------------------------------------- Antrag (Wizard) */
.wizard-page { padding: 44px 0 20px; }
.wizard-head { text-align: center; margin-bottom: 30px; }
.wizard-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 760; letter-spacing: -.03em; margin-bottom: 8px; }
.wizard-head p { color: var(--muted); margin: 0; }

.stepper { list-style: none; margin: 0 0 26px; padding: 0; display: flex; justify-content: space-between; position: relative; }
.stepper::before { content: ""; position: absolute; left: 22px; right: 22px; top: 17px; height: 2px; background: var(--border); }
.stepper li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.stepper li:first-child { align-items: flex-start; }
.stepper li:last-child { align-items: flex-end; }
.stepper button { all: unset; display: flex; flex-direction: column; align-items: inherit; gap: 8px; cursor: default; }
.stepper li.done button { cursor: pointer; }
.stepper-dot {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: var(--surface); border: 2px solid var(--border-strong); color: var(--muted); transition: all .2s;
}
.stepper-dot svg { width: 16px; height: 16px; stroke-width: 3; }
.stepper-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.stepper li.active .stepper-dot { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: var(--ring); }
.stepper li.active .stepper-label { color: var(--primary); }
.stepper li.done .stepper-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.stepper li.done .stepper-label { color: var(--text-2); }
.stepper-mobile { display: none; margin-bottom: 18px; }
.stepper-mobile-text { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.progress { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #3b82f6); border-radius: 99px; transition: width .3s; }
@media (max-width: 680px) { .stepper { display: none; } .stepper-mobile { display: block; } }

.step { display: none; padding: 30px; }
.step.active { display: block; animation: einblenden .25s ease; }
@keyframes einblenden { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .step { padding: 22px 18px; } }
.step-title { font-size: 1.35rem; font-weight: 720; margin-bottom: 6px; }
.step-intro { color: var(--muted); margin-bottom: 24px; }
.form-section + .form-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border); }
.section-title { font-size: 1.12rem; font-weight: 700; margin-bottom: 4px; padding: 0; color: var(--text); }
.section-hint { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
legend.section-title + .form-grid, legend.section-title + .section-hint { margin-top: 10px; }

.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .choice-grid { grid-template-columns: 1fr; } }
.choice-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: all .15s; }
.choice-card:hover { border-color: var(--primary-100); box-shadow: var(--shadow); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card .service-icon { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 8px; }
.choice-title { font-weight: 700; font-size: 1.05rem; }
.choice-text { color: var(--muted); font-size: .9rem; }
.choice-meta { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.choice-card::after {
  content: ""; position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: #fff;
}
.choice-card:has(input:checked) { border-color: var(--primary); background: linear-gradient(180deg, var(--primary-50), #fff 70%); box-shadow: var(--ring); }
.choice-card:has(input:checked)::after {
  border-color: var(--primary); background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.choice-card:has(input:focus-visible) { box-shadow: var(--ring); }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .upload-grid { grid-template-columns: 1fr; } }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 150px; padding: 20px;
  border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--bg); cursor: pointer; transition: all .15s; position: relative;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--primary); background: var(--primary-50); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--primary); border: 1px solid var(--border); }
.dropzone-title { font-weight: 650; font-size: .95rem; }
.dropzone-file { font-size: .84rem; color: var(--muted); word-break: break-all; }
.dropzone.has-file { border-style: solid; border-color: var(--accent); background: var(--accent-50); }
.dropzone.has-file .dz-icon { color: var(--accent); }
.dropzone.has-file .dropzone-file { color: var(--success); font-weight: 600; }
.has-error .dropzone { border-color: var(--danger); }

.summary { display: grid; gap: 14px; margin-bottom: 28px; }
.summary-group { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.summary-group-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border); font-weight: 650; font-size: .92rem; }
.summary-group-head button { all: unset; color: var(--primary); font-size: .85rem; font-weight: 600; cursor: pointer; }
.summary-group-head button:hover { text-decoration: underline; }
.summary-group dl { margin: 0; display: grid; grid-template-columns: minmax(140px, 38%) 1fr; }
.summary-group dt, .summary-group dd { margin: 0; padding: 8px 16px; font-size: .9rem; border-bottom: 1px solid var(--border); }
.summary-group dt { color: var(--muted); }
.summary-group dd { color: var(--text); white-space: pre-line; word-break: break-word; }
.summary-group dl > :nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 560px) {
  .summary-group dl { grid-template-columns: 1fr; }
  .summary-group dt { border-bottom: 0; padding-bottom: 0; font-size: .8rem; }
}

.vollmacht-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin: 4px 0 20px; }
.vollmacht-box h3 { font-size: .98rem; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.vollmacht-box p { color: var(--text-2); font-size: .92rem; margin: 0; }
.consents { display: grid; gap: 12px; margin-bottom: 26px; }

.signature-pad { position: relative; height: 200px; border: 1.5px solid var(--border-strong); border-radius: 14px; background: #fff; overflow: hidden; touch-action: none; }
.signature-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.signature-line { position: absolute; left: 24px; right: 24px; bottom: 46px; border-top: 1.5px solid var(--border); pointer-events: none; }
.signature-line::before { content: "✕"; position: absolute; left: 0; top: -26px; color: var(--muted); font-size: .9rem; }
.signature-placeholder { position: absolute; inset: 0 0 auto; top: 38%; text-align: center; color: #a0aabb; font-size: .95rem; pointer-events: none; display: flex; justify-content: center; gap: 8px; align-items: center; }
.signature-pad.signed .signature-placeholder { display: none; }
.signature-pad.signed { border-color: var(--accent); }
.has-error .signature-pad { border-color: var(--danger); }
.signature-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }

.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.wizard-nav .spacer { flex: 1; }
.contact-note { color: var(--muted); font-size: .88rem; margin-top: 22px; text-align: center; }
.secure-note { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; margin-top: 22px; text-align: center; }

/* ---------------------------------------------------------------- Vorgang / Status (Kunde) */
.status-hero { text-align: center; padding: 10px 0 26px; }
.status-hero .big-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--accent-50); color: var(--accent); }
.status-hero .big-icon svg { width: 34px; height: 34px; stroke-width: 2.6; }
.ref-box { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 26px; border-radius: 14px; background: var(--primary-50); border: 1px solid var(--primary-100); margin: 8px 0 4px; }
.ref-box small { color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ref-box strong { font-family: var(--mono); font-size: 1.45rem; letter-spacing: .06em; color: var(--navy); }

.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.track::before { content: ""; position: absolute; top: 15px; left: 12.5%; right: 12.5%; height: 3px; background: var(--border); border-radius: 3px; }
.track li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; font-size: .85rem; font-weight: 600; color: var(--muted); }
.track .t-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border); display: grid; place-items: center; z-index: 1; }
.track .t-dot svg { width: 15px; height: 15px; stroke-width: 3.2; }
.track li.done .t-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.track li.done { color: var(--text-2); }
.track li.current .t-dot { background: var(--primary); border-color: var(--primary-100); color: #fff; box-shadow: 0 0 0 4px var(--primary-50); }
.track li.current { color: var(--primary); }
@media (max-width: 560px) { .track li { font-size: .74rem; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.intern::before { background: var(--border-strong); box-shadow: 0 0 0 4px var(--bg); }
.timeline .tl-text { font-size: .92rem; color: var(--text); white-space: pre-line; word-break: break-word; }
.timeline .tl-meta { font-size: .78rem; color: var(--muted); }

.vorgang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; align-items: start; }
@media (max-width: 720px) { .vorgang-grid { grid-template-columns: 1fr; } }
.narrow-card { max-width: 520px; margin: 0 auto; }
.page-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 760; letter-spacing: -.03em; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.25rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--text-2); }

/* ---------------------------------------------------------------- Admin */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--navy) 250px, var(--bg) 250px); }
.icon-link { display: inline-flex; align-items: center; gap: 6px; word-break: break-all; }
.sidebar { background: var(--navy); color: #c7d0e6; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { color: #fff; margin: 0 8px 24px; font-size: 1rem; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar a, .sidebar button.nav-link {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c7d0e6;
  font-weight: 550; font-size: .93rem; cursor: pointer; width: 100%;
}
.sidebar a:hover, .sidebar button.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar .nav-badge { margin-left: auto; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; display: grid; gap: 4px; }
.sidebar-user { padding: 4px 12px 8px; font-size: .82rem; color: #93a0c2; word-break: break-all; }
.admin-main { padding: 30px 36px 60px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 1.6rem; font-weight: 750; letter-spacing: -.025em; margin: 0; }
.admin-topbar .crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.admin-topbar .crumbs a { color: var(--muted); }
.sidebar-top { display: contents; }
.sidebar .menu-toggle { display: none; }
@media (max-width: 1024px) {
  .admin-shell { grid-template-columns: 1fr; background: var(--bg); }
  .sidebar { position: sticky; top: 0; z-index: 40; height: auto; padding: 10px max(16px, env(safe-area-inset-left)); gap: 0; }
  .sidebar-top { display: flex; align-items: center; justify-content: space-between; }
  .sidebar .brand { margin: 0; }
  .sidebar .menu-toggle { display: inline-flex; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
  .sidebar nav, .sidebar-foot { display: none; }
  .sidebar.open nav, .sidebar.open .sidebar-foot { display: grid; }
  .sidebar.open nav { padding-top: 10px; }
  .sidebar.open .sidebar-foot { margin-top: 8px; }
  .sidebar a, .sidebar button.nav-link { padding: 13px 12px; font-size: 1rem; }
  .admin-main { padding: 22px max(16px, env(safe-area-inset-left)) 48px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; color: var(--text); transition: all .15s; }
.stat:hover { text-decoration: none; border-color: var(--primary-100); box-shadow: var(--shadow); }
.stat.active { border-color: var(--primary); box-shadow: var(--ring); }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.9rem; font-weight: 760; letter-spacing: -.03em; margin-top: 4px; }
.stat-dot { width: 8px; height: 8px; border-radius: 50%; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px; border-bottom: 1px solid var(--border); }
.toolbar .search { position: relative; flex: 1; min-width: 220px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .input { min-height: 40px; padding: 8px 12px; font-size: .92rem; }
.toolbar .search .input { padding-left: 38px; }
.toolbar select.input {
  width: auto; padding-right: 36px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #fafbfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .row-link { color: var(--text); font-weight: 600; }
.table .sub { display: block; font-size: .82rem; color: var(--muted); font-weight: 450; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty svg { margin: 0 auto 12px; width: 40px; height: 40px; color: var(--border-strong); }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.pagination .btns { display: flex; gap: 8px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; padding: 4px 10px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-neu { background: var(--primary-50); color: var(--primary-600); border-color: var(--primary-100); }
.badge-in_pruefung { background: var(--warning-50); color: var(--warning); border-color: #f5dcae; }
.badge-rueckfrage { background: #fff1eb; color: #c2410c; border-color: #fed7c3; }
.badge-an_amt_gesendet { background: var(--violet-50); color: var(--violet); border-color: #ddd3fb; }
.badge-erledigt { background: var(--success-50); color: var(--success); border-color: #bbe9cd; }
.badge-storniert { background: #f1f5f9; color: var(--muted); border-color: var(--border); }
.art-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 650; padding: 3px 9px; border-radius: 7px; }
.art-tag.anmeldung { background: var(--accent-50); color: #0b7a55; }
.art-tag.ummeldung { background: var(--primary-50); color: var(--primary-600); }
.art-tag.abmeldung { background: #fff1f0; color: #b9381f; }
.dot-neu { background: var(--primary); } .dot-in_pruefung { background: #f59e0b; } .dot-an_amt_gesendet { background: var(--violet); } .dot-erledigt { background: var(--success); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
@media (max-width: 1180px) { .detail-grid { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 22px; }
.data-list { margin: 0; display: grid; grid-template-columns: minmax(150px, 34%) 1fr; }
.data-list dt, .data-list dd { margin: 0; padding: 10px 24px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.data-list dt { color: var(--muted); padding-right: 8px; }
.data-list dd { white-space: pre-line; word-break: break-word; padding-left: 8px; }
.data-list > :nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 640px) { .data-list { grid-template-columns: 1fr; } .data-list dt { border: 0; padding-bottom: 0; font-size: .8rem; } }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: 0; }
.doc-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.doc-list .doc-name { font-weight: 600; font-size: .92rem; word-break: break-all; }
.doc-list .doc-meta { font-size: .8rem; color: var(--muted); }
.doc-list .doc-actions { margin-left: auto; display: flex; gap: 6px; }
.signature-preview { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 14px; display: grid; place-items: center; }
.signature-preview img { max-height: 110px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-stack { display: grid; gap: 14px; }
.form-stack .field { grid-column: auto; }
.amt-box { padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; font-size: .9rem; }
.amt-box strong { display: block; }
.ready-card .amt-box { margin-bottom: 12px; }
.inline-form { display: inline; }
details.edit > summary { list-style: none; cursor: pointer; }
details.edit > summary::-webkit-details-marker { display: none; }
.amt-edit { padding: 18px 24px; background: var(--bg); border-top: 1px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.attachment-list { display: grid; gap: 8px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(800px 400px at 80% 0%, rgba(31,79,209,.18), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 410px; padding: 34px; }
.login-card .brand { margin-bottom: 26px; }
.login-card h1 { font-size: 1.45rem; }

/* ---------------------------------------------------------------- Preis & Zahlung */
.price-box { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 20px; padding: 18px 22px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--primary-100); box-shadow: var(--shadow-sm); }
.price-label { font-weight: 700; }
.price-note { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.price-value { font-size: 1.6rem; font-weight: 780; letter-spacing: -.02em; color: var(--navy); white-space: nowrap; }
.preis-tag { display: inline-flex; align-items: baseline; gap: 6px; margin: -6px 0 18px; font-size: .9rem; color: var(--muted); }
.preis-tag strong { font-size: 1.35rem; color: var(--text); letter-spacing: -.02em; }
.pay-card { max-width: 560px; margin: 0 auto; }
.pay-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.pay-row:last-of-type { border-bottom: 0; }
.pay-total { font-size: 1.15rem; font-weight: 750; }
.test-banner { background: repeating-linear-gradient(45deg, #fff8eb, #fff8eb 10px, #fff1d6 10px, #fff1d6 20px); border: 1px solid #f5dcae; color: #7c2d12; border-radius: 12px; padding: 12px 16px; font-size: .9rem; margin-bottom: 18px; }
.ready-card { border: 1.5px solid var(--primary-100); background: linear-gradient(180deg, var(--primary-50), #fff 60%); }
.ready-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.ready-list li { display: flex; gap: 10px; align-items: center; }
.ready-list li svg { color: var(--accent); flex: none; }
.ready-list li.fehlt svg { color: var(--warning); }
.ready-list a { margin-left: auto; font-size: .82rem; font-weight: 600; }
.zahlung-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; padding: 4px 10px; border-radius: 99px; }
.zahlung-badge.bezahlt { background: var(--success-50); color: var(--success); }
.zahlung-badge.offen { background: var(--warning-50); color: var(--warning); }

/* ---------------------------------------------------------------- Touch & iOS */
input[type=date] { display: block; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .6; }
.signature-pad, .signature-pad canvas { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: contain; }
@media (hover: none) {
  .service-card:hover, .stat:hover, .choice-card:hover { transform: none; box-shadow: none; }
}

/* Formular auf dem Handy: Weiter-Leiste bleibt unten sichtbar */
@media (max-width: 640px) {
  html { scroll-padding-top: 80px; scroll-padding-bottom: 110px; }
  .wizard-page { padding-top: 24px; }
  .wizard-head h1 { font-size: 1.55rem; }
  .wizard-nav {
    position: sticky; bottom: 0; z-index: 30; margin: 16px calc(-1 * max(20px, env(safe-area-inset-left))) 0;
    padding: 12px max(16px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); box-shadow: 0 -10px 24px -18px rgba(15,23,42,.35);
  }
  .wizard-nav .spacer { display: none; }
  .wizard-nav [data-weiter], .wizard-nav [data-absenden] { flex: 1; }
  .wizard-nav .btn-lg { padding: 1em 1.1em; font-size: .98rem; }
  .wizard-nav [data-zurueck] { padding: .95em 1em; }
  .signature-pad { height: 180px; }
  .price-box { padding: 14px 16px; }
  .price-value { font-size: 1.35rem; }
  .ref-box strong { font-size: 1.2rem; }
  .card-body { padding: 18px; }
  .card-head { padding: 14px 18px; }
}

/* Tabellen werden auf dem Handy zu Karten */
@media (max-width: 720px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 3px 0; border: 0; }
  .table-cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  .table-cards td.nowrap { white-space: normal; }
  .ratgeber-tabelle .table-cards td:first-child { margin-bottom: 4px; font-size: 1.02rem; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 1.5rem; }
  .admin-topbar h1 { font-size: 1.35rem; }
  .header-actions { width: 100%; }
  .header-actions .btn, .header-actions form { flex: 1; }
  .header-actions form .btn { width: 100%; }
}

/* ---------------------------------------------------------------- Einstellungen */
.setup-card { margin-bottom: 22px; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.setup-list li:last-child { border-bottom: 0; }
.setup-list li div { flex: 1; display: flex; flex-direction: column; font-size: .92rem; }
.setup-list li div span { color: var(--muted); font-size: .86rem; }
.setup-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.setup-list li.ok .setup-icon { background: var(--success-50); color: var(--success); }
.setup-list li.offen .setup-icon { background: var(--warning-50); color: var(--warning); }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: 20px; display: grid; gap: 2px; }
.settings-nav a { padding: 10px 14px; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: .93rem; }
.settings-nav a:hover { background: var(--surface); text-decoration: none; }
.settings-card { scroll-margin-top: 90px; }
.settings-actions { display: flex; justify-content: flex-end; }
.test-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
.test-form .input { width: auto; flex: 1 1 220px; min-height: 40px; padding: 8px 12px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 40px !important; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.info-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; font-size: .9rem; color: var(--text-2); }
.info-box ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.info-box code { font-family: var(--mono); font-size: .82rem; background: var(--surface); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.copy-field { display: flex; gap: 8px; margin: 8px 0; }
.copy-field .input { min-height: 40px; padding: 8px 12px; font-size: .85rem; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: .95rem; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--border-strong); flex: none; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }
.span-voll { grid-column: span 12; }
@media (max-width: 1100px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .settings-nav a { white-space: nowrap; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 8px 14px; }
}
@media (max-width: 640px) { .setup-list li { padding: 12px 16px; } .setup-list .btn { padding: .5em .7em; } }

/* ---------------------------------------------------------------- E-Mails */
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; }
.chip { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: var(--primary-100); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip b { background: var(--danger); color: #fff; border-radius: 99px; padding: 0 6px; font-size: .75rem; margin-left: 2px; }
.toolbar .search { flex: 0 1 300px; }
@media (max-width: 720px) { .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; } .toolbar .search { flex: 1 1 100%; } }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li { border-bottom: 1px solid var(--border); display: flex; align-items: stretch; }
.mail-check { display: flex; align-items: center; padding-left: 18px; flex: none; cursor: pointer; }
.mail-check input { width: 18px; height: 18px; cursor: pointer; }
.mail-auswahl { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.mail-list li:last-child { border-bottom: 0; }
.mail-row { display: flex; gap: 14px; padding: 14px 18px 14px 14px; color: var(--text); align-items: flex-start; flex: 1; min-width: 0; }
.mail-row:hover { background: #fafbfe; text-decoration: none; }
.mail-list li.ungelesen { background: var(--primary-50); }
.mail-list li.ungelesen .mail-subject { font-weight: 750; }
.mail-dir { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.mail-dir.ein { background: var(--primary-50); color: var(--primary); }
.mail-dir.aus { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.mail-dir svg { width: 17px; height: 17px; }
.mail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mail-top { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--muted); }
.mail-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text-2); }
.mail-time { white-space: nowrap; }
.mail-subject { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; margin-top: 3px; }
.mail-meta svg { width: 13px; height: 13px; display: inline; vertical-align: -2px; }
.mail-tag { font-family: var(--mono); font-size: .76rem; background: var(--bg); border: 1px solid var(--border); padding: 1px 7px; border-radius: 6px; color: var(--text-2); }
.mail-tag.warn { font-family: var(--font); background: var(--warning-50); border-color: #f5dcae; color: var(--warning); }
.mail-status { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.mail-status svg { width: 13px; height: 13px; stroke-width: 2.6; }
.s-gesendet { background: var(--primary-50); color: var(--primary-600); }
.s-gelesen { background: var(--success-50); color: var(--success); }
.s-fehler { background: var(--danger-50); color: var(--danger); }
.s-warnung { background: var(--warning-50); color: var(--warning); }
.s-neu { background: var(--primary); color: #fff; }
.s-erledigt { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.mail-title { word-break: break-word; }
.mail-body { padding: 22px 24px; white-space: pre-wrap; word-break: break-word; font-size: .95rem; line-height: 1.65; border-top: 1px solid var(--border); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 14px; height: 14px; }
.mail-mini { list-style: none; margin: 0; padding: 0; }
.mail-mini li { border-bottom: 1px solid var(--border); }
.mail-mini li:last-child { border-bottom: 0; }
.mail-mini a { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: var(--text); }
.mail-mini a:hover { background: #fafbfe; text-decoration: none; }
.mail-mini .mail-dir { width: 30px; height: 30px; border-radius: 8px; }
.mail-mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .86rem; }
.mail-mini-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mail-mini-text small { color: var(--muted); font-size: .76rem; }
.amt-mail-status { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.amt-mail-status:hover { text-decoration: none; border-color: var(--primary-100); }
.inline-row { display: flex; gap: 8px; }
.inline-row .input { min-height: 40px; padding: 8px 12px; font-size: .9rem; }
.narrow-form { max-width: 860px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) { .form-actions .btn { flex: 1; } .mail-row { padding: 12px 14px; } .mail-body { padding: 18px; } }

/* Kopfzeile auf schmalen Handys */
.brand span:last-child { white-space: nowrap; }
.header-cta .kurz { display: none; }
@media (max-width: 420px) {
  .brand { font-size: 1rem; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-cta .lang { display: none; }
  .header-cta .kurz { display: inline; }
  .header-right { gap: 8px; }
}

/* Formular-Knöpfe auf schmalen Handys */
@media (max-width: 640px) {
  .wizard-nav .btn { white-space: normal; text-align: center; line-height: 1.2; }
  .preis-im-knopf { display: none; }
}
@media (max-width: 420px) {
  .wizard-nav [data-zurueck] .btn-text { display: none; }
  .wizard-nav [data-zurueck] { flex: 0 0 auto; padding: .95em; }
}

/* Auftrag: „Einreichung beim Amt“ auf dem Computer rechts oben, auf iPad/Handy ganz oben */
@media (min-width: 1181px) {
  .detail-grid-antrag { grid-template-rows: auto 1fr; }
  .detail-grid-antrag .daten-bereich { grid-column: 1; grid-row: 1 / span 2; }
  .detail-grid-antrag .einreichung-bereich { grid-column: 2; grid-row: 1; }
  .detail-grid-antrag .aktionen-bereich { grid-column: 2; grid-row: 2; }
}

/* Abschluss & andere Einreichungswege */
.nebenweg { margin-top: 14px; }
.nebenweg > summary { list-style: none; cursor: pointer; padding: 14px 20px; font-size: .88rem; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nebenweg > summary::-webkit-details-marker { display: none; }
.nebenweg > summary .muted { font-weight: 450; }
.nebenweg[open] > summary { border-bottom: 1px solid var(--border); }
.abschluss-card { margin-top: 14px; border: 1.5px solid #bbe9cd; background: linear-gradient(180deg, var(--success-50), #fff 55%); }
.abschluss-card h3 { display: flex; align-items: center; gap: 8px; }
.abschluss-card h3 svg { color: var(--success); }
.unterlagen-amt { margin-top: 22px; border: 1.5px solid #bbe9cd; background: linear-gradient(180deg, var(--success-50), #fff 70%); }
.unterlagen-kopf { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.unterlagen-kopf h2 { font-size: 1.15rem; margin: 0; }
.big-icon.klein { width: 46px; height: 46px; margin: 0; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--success); border: 1px solid #bbe9cd; }
.big-icon.klein svg { width: 22px; height: 22px; stroke-width: 2.2; }
.unterlagen-liste { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) { .unterlagen-liste .btn { flex: 1 1 100%; white-space: normal; } }

/* Rechtstexte */
.prose h3 { font-size: 1.02rem; margin: 1.4em 0 .4em; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--surface); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.prose h2 { scroll-margin-top: 90px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 22px; margin: 20px 0 8px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; font-size: .93rem; }
.toc li { margin: 3px 0; break-inside: avoid; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* ---------------------------------------------------------------- Ratgeber (SEO/GEO) */
.service-card h3 a { color: inherit; }
.service-card h3 a:hover { color: var(--primary); text-decoration: none; }
.service-card:hover { transform: none; }
.service-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: auto; }
.faq-mehr { text-align: center; margin-top: 22px; color: var(--muted); font-size: .93rem; }
.ratgeber-kopf { padding: 40px 0 34px; background: radial-gradient(700px 300px at 90% 0%, rgba(31,79,209,.12), transparent 60%), linear-gradient(180deg, #fff, var(--bg)); border-bottom: 1px solid var(--border); }
.ratgeber-kopf h1 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 780; letter-spacing: -.03em; margin: 12px 0 8px; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: .86rem; color: var(--muted); flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }
.ratgeber-meta { color: var(--muted); font-size: .88rem; margin-bottom: 20px; }
.kurzantwort { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; padding: 18px 22px; font-size: 1.04rem; color: var(--text-2); box-shadow: var(--shadow-sm); }
.kurzantwort p { margin: 0; }
.ratgeber-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.ratgeber-inhalt { padding-top: 34px; padding-bottom: 20px; }
.ratgeber-inhalt section { margin-bottom: 34px; }
.ratgeber-inhalt h2 { font-size: 1.4rem; font-weight: 740; letter-spacing: -.02em; margin-bottom: 12px; scroll-margin-top: 90px; }
.ratgeber-inhalt p { color: var(--text-2); }
.schritte { counter-reset: schritt; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.schritte li { counter-increment: schritt; position: relative; padding: 12px 16px 12px 56px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text-2); }
.schritte li::before { content: counter(schritt); position: absolute; left: 14px; top: 11px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-weight: 750; font-size: .9rem; }
.haken { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.haken li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.haken li svg { color: var(--accent); margin-top: 4px; width: 17px; height: 17px; stroke-width: 2.8; }
.ratgeber-tabelle { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin: 6px 0 14px; }
.ratgeber-tabelle td { vertical-align: top; }
.faq-offen { display: grid; gap: 12px; }
.faq-eintrag { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.faq-eintrag h3 { font-size: 1.02rem; margin-bottom: 6px; }
.faq-eintrag p { margin: 0; }
.quellen ul { padding-left: 1.2em; }
.weitere-ratgeber { margin-top: 40px; }
.weitere-ratgeber h2 { font-size: 1.15rem; }
.weitere-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.weiter-karte { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); }
.weiter-karte:hover { border-color: var(--primary-100); text-decoration: none; box-shadow: var(--shadow); }
.weiter-karte .service-icon { width: 42px; height: 42px; margin: 0; flex: none; }
.weiter-karte small { display: block; color: var(--muted); font-size: .85rem; }
@media (max-width: 640px) { .weitere-liste { grid-template-columns: 1fr; } .ratgeber-cta .btn { width: 100%; } }

/* Cookie-Hinweis (nur technisch notwendige Cookies → reiner Hinweis, keine Auswahl nötig) */
.cookie-hinweis {
  position: fixed; z-index: 60; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(760px, calc(100% - 32px)); display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); animation: hinweis-rein .3s ease-out; transition: opacity .2s, transform .2s;
}
.cookie-hinweis p { margin: 0; flex: 1; font-size: .92rem; color: var(--text-2); line-height: 1.5; }
.cookie-hinweis p strong { color: var(--text); }
.cookie-hinweis .btn { flex: none; }
.cookie-symbol { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.cookie-hinweis.weg { opacity: 0; transform: translate(-50%, 12px); }
@keyframes hinweis-rein { from { opacity: 0; transform: translate(-50%, 16px); } }
@media (max-width: 640px) {
  .cookie-hinweis { flex-wrap: wrap; gap: 12px; padding: 14px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .cookie-symbol { display: none; }
  .cookie-hinweis .btn { width: 100%; padding-top: .75em; padding-bottom: .75em; }
}
@media (prefers-reduced-motion: reduce) { .cookie-hinweis { animation: none; transition: none; } }
@media print { .cookie-hinweis { display: none; } }

/* Ratgeber-Karten auf der Startseite */
.ratgeber-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1020px) { .ratgeber-raster { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .ratgeber-raster { grid-template-columns: 1fr; } }
