/* Tool-Seite und Druck-Layout */

.tool { padding: 48px 0 80px; }
.tool h1 { letter-spacing: -0.02em; margin-bottom: 8px; }
.tool-intro { color: var(--muted); max-width: 70ch; margin-bottom: 32px; }

.beta-pill { background: rgba(16,201,143,0.18); color: #7ff0cf; border: 1px solid rgba(16,201,143,0.4); padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }

/* Stepper */
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 36px; flex-wrap: wrap; }
.stepper li {
  display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
}
.stepper li span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #e5e9f2; color: var(--muted); font-size: 0.75rem; font-weight: 800;
}
.stepper li.aktiv { color: var(--text); border-color: var(--accent); }
.stepper li.aktiv span { background: var(--accent); color: #04281c; }
.stepper li.fertig span { background: #d9f7ec; color: var(--accent-ink); }

/* Fortschritt */
.fortschritt {
  display: flex; align-items: center; gap: 18px; margin-top: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid #e5e9f2; border-top-color: var(--accent);
  animation: drehen 0.9s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }
.fortschritt-text { flex: 1; }
.fortschritt-text small { color: var(--muted); display: block; margin-top: 2px; }
.balken { height: 6px; border-radius: 999px; background: #e5e9f2; overflow: hidden; margin-top: 10px; }
.balken-fuellung {
  height: 100%; width: 40%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: laufen 1.4s ease-in-out infinite;
}
@keyframes laufen { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 2px dashed #b9c3d8; border-radius: var(--radius); background: var(--card);
  padding: 56px 24px; cursor: pointer; text-align: center; transition: border-color .15s ease;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone.drag { border-color: var(--accent); background: #ecfdf6; }
.dropzone strong { font-size: 1.1rem; }
.dropzone span { color: var(--muted); font-size: 0.9rem; }

.text-alternativ { margin-top: 20px; }
.text-alternativ summary { cursor: pointer; font-weight: 600; color: #0d9d70; }
.text-alternativ textarea {
  width: 100%; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font: inherit; font-size: 0.9rem; background: var(--card);
}
.knopfzeile { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.btn-ghost-dunkel { color: var(--text); border: 1px solid #c3cbdd; background: var(--card); }
button.btn { cursor: pointer; font-family: inherit; }

#status { min-height: 1.4em; font-weight: 600; color: #0d9d70; }
#status.fehler { color: #be123c; }

/* Schritt 3: Formular-Karten und Ergebnis */
.finale { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.finale-formulare { display: grid; gap: 18px; }
.karte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.karte h2 { margin: 0 0 14px; font-size: 1.05rem; letter-spacing: -0.01em; }
.karte label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.karte label.radio { color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.karte input:not([type="radio"]) {
  display: block; width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; font: inherit; font-size: 0.95rem; background: #fbfcfe;
}
.karte input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.karte input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.feldzeile { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.erklaerbox {
  background: #f0fdf7; border: 1px solid #bbecd9; border-radius: 10px;
  padding: 12px 14px; font-size: 0.85rem; color: #14532d; margin: 0 0 14px;
}
.feld-hinweis { font-size: 0.78rem; color: var(--muted); }
.feld-hinweis.fehler { color: #be123c; font-weight: 600; }
.feld-hinweis.warnung { color: #92400e; font-weight: 600; }
.feld-hinweis.warnung:empty, .feld-hinweis.fehler:empty { display: none; }

.karte.wichtig { border: 2px solid var(--accent); }
.karte select {
  display: block; width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; font: inherit; font-size: 0.95rem; background: #fbfcfe;
}
.karte select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.erg-hinweis { color: #8d99b2; font-size: 0.8rem; margin-top: 10px; }

.finale-ergebnis { position: sticky; top: 84px; display: grid; gap: 12px; }
.ergebnis-karte { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; }
.ergebnis-karte h2 { margin: 0 0 16px; font-size: 1.05rem; }
.erg-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.erg-zeile span { color: #aeb9cf; font-size: 0.82rem; }
.erg-zeile strong { font-variant-numeric: tabular-nums; }
.erg-zeile.saldo { border-bottom: none; padding-top: 14px; }
.erg-zeile.saldo strong { font-size: 1.25rem; color: #fda4af; }
.erg-zeile.saldo strong.guthaben { color: #7ff0cf; }
.ergebnis-karte .btn { margin-top: 16px; }
.ergebnis-karte .feld-hinweis { color: #8d99b2; margin-top: 12px; }
.btn-breit { display: block; width: 100%; text-align: center; }

/* Schritt-2-Fußzeile */
.schritt-fuss { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.zwischensumme { font-size: 0.95rem; color: var(--muted); }
.zwischensumme strong { color: var(--text); font-size: 1.1rem; }
.zwischensumme small { display: block; }

/* Inline-Erklärungen */
.info-knopf {
  border: 1px solid var(--line); background: #fbfcfe; color: #0d9d70; border-radius: 50%;
  width: 24px; height: 24px; font-size: 0.85rem; cursor: pointer; vertical-align: middle; line-height: 1;
}
.info-knopf:hover, .info-knopf.offen { background: var(--accent); color: #04281c; border-color: var(--accent); }
.zeile-erklaerung td { background: #f4faf8; }
.erklaerung-inhalt { font-size: 0.87rem; color: #33415e; padding: 4px 8px; }
.erklaerung-inhalt p { margin: 6px 0; }
.erklaerung-inhalt a { color: #0d9d70; }
.erklaerung-fuss { color: var(--muted); font-size: 0.75rem; }

.pruef-tabelle { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.92rem; }
.pruef-tabelle th { text-align: left; background: var(--ink); color: #dbe3f0; padding: 12px 14px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.pruef-tabelle td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pruef-tabelle td.betrag { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pruef-tabelle tr.aus td { opacity: 0.45; }
.pruef-tabelle small { color: var(--muted); }
.pruef-tabelle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

.pill { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-umlagefaehig { background: #d9f7ec; color: var(--accent-ink); }
.pill-nicht_umlagefaehig { background: #ffe4ea; color: #9f1239; }
.pill-bedingt { background: #fef3c7; color: #92400e; }
.pill-strittig { background: #e0e7ff; color: #3730a3; }
.pill-unbekannt { background: #e5e9f2; color: #475069; }

.warnbanner {
  background: #fff7ed; border: 1px solid #fdba74; color: #9a3412;
  border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; font-size: 0.9rem;
}

.info-bloecke { margin-top: 22px; display: grid; gap: 10px; }
.info-block { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.info-block summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; color: var(--muted); }
.info-block p { font-size: 0.85rem; color: var(--muted); margin: 10px 0; }
.info-block table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.info-block td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.info-block td.betrag { text-align: right; font-variant-numeric: tabular-nums; }

.ergebnis { display: flex; gap: 18px; justify-content: flex-end; margin: 24px 0; flex-wrap: wrap; }
.ergebnis div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; min-width: 220px; }
.ergebnis span { display: block; font-size: 0.78rem; color: var(--muted); }
.ergebnis strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ergebnis .saldo { border-color: var(--accent); }
.ergebnis .saldo strong { color: #b91c1c; }
.ergebnis .saldo strong.guthaben { color: var(--accent-ink); }

@media (max-width: 900px) {
  .finale { grid-template-columns: 1fr; }
  .finale-ergebnis { position: static; }
  .pruef-tabelle { font-size: 0.82rem; }
  .feldzeile { grid-template-columns: 1fr; }
}

/* ---------- Schritt 4: Dokumente & Gate ---------- */
.fertig-raster { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.dokumente { display: grid; gap: 16px; }

.doc-karte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.doc-karte summary {
  cursor: pointer; font-weight: 700; padding: 16px 22px; font-size: 0.98rem;
  background: var(--ink); color: #dbe3f0; list-style-position: inside;
}
.doc-karte[open] summary { border-bottom: 1px solid var(--line); }
.papier { background: #fff; padding: 34px 38px; font-size: 0.92rem; line-height: 1.65; color: #1a2233; }
.papier p { margin: 0 0 14px; }
.d-meta { color: #55607a; font-size: 0.82rem; margin-bottom: 20px; }

/* Anschreiben im Briefstil */
.d-datum { text-align: right; color: #55607a; font-size: 0.85rem; margin-bottom: 4px; }
.d-absender { color: #55607a; font-size: 0.8rem; border-bottom: 1px solid #d6dbe6; padding-bottom: 6px; margin-bottom: 26px; }
.d-empfaenger { margin-bottom: 34px; }
.d-betreff { margin-bottom: 22px; }
.d-betreff strong { font-size: 1.05rem; }
.d-betreff small { color: #55607a; }
.d-ergebnisbox {
  background: #f4f6f9; border: 1px solid #d6dbe6; border-left: 4px solid #10c98f;
  border-radius: 6px; padding: 14px 18px; margin: 0 0 16px;
}
.d-ergebnisbox div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.d-ergebnisbox span { color: #55607a; font-size: 0.85rem; }
.d-ergebnisbox strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.d-ergebnisbox small { color: #55607a; font-size: 0.78rem; }
.d-gruss { margin-bottom: 48px; }
.d-unterschrift { border-top: 1px solid #8a93a8; display: inline-block; padding-top: 4px; color: #55607a; font-size: 0.8rem; min-width: 220px; margin-bottom: 18px; }
.tab-scroll { overflow-x: auto; }
.d-tabelle { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.d-tabelle th { text-align: left; border-bottom: 2px solid #1a2233; padding: 8px 6px; white-space: nowrap; }
.d-tabelle td { border-bottom: 1px solid #d6dbe6; padding: 8px 6px; vertical-align: top; }
.d-tabelle td.betrag, .d-tabelle th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-tabelle tfoot td { font-weight: 700; border-bottom: none; padding-top: 12px; }
.d-saldo td { font-size: 1.02rem; border-top: 2px solid #1a2233; }
.d-fuss { font-size: 0.74rem; color: #55607a; margin-top: 20px; }
.d-raus td { color: #8a93a8; }
.d-raus td:first-child { text-decoration: line-through; }

.fertig-seite { position: sticky; top: 84px; display: grid; gap: 14px; }
.gate-karte { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; }
.gate-karte h2 { margin: 0 0 8px; font-size: 1.05rem; }
.gate-karte > p { color: #aeb9cf; font-size: 0.88rem; margin: 0 0 16px; }
.gate-label { display: block; font-size: 0.82rem; color: #aeb9cf; margin-bottom: 12px; }
.gate-label input {
  display: block; width: 100%; margin-top: 6px; border: 1px solid rgba(255,255,255,0.25); border-radius: 9px;
  padding: 11px 12px; font: inherit; font-size: 0.95rem; background: rgba(255,255,255,0.08); color: #fff;
}
.gate-label input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.gate-checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 0.78rem; color: #aeb9cf; line-height: 1.5; margin-bottom: 14px; cursor: pointer; }
.gate-checkbox input { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.gate-checkbox a { color: #7ff0cf; }
.versand-status { min-height: 1.3em; font-size: 0.85rem; margin-top: 12px; color: #aeb9cf; }
.versand-status.ok { color: #7ff0cf; font-weight: 700; }
.versand-status.fehler { color: #fda4af; font-weight: 700; }

.upsell-karte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.upsell-karte h3 { margin: 0 0 6px; font-size: 0.98rem; letter-spacing: -0.01em; }
.upsell-karte p { font-size: 0.85rem; color: var(--muted); margin: 0 0 12px; }
.upsell-karte.demnaechst { border-style: dashed; }
.upsell-karte.demnaechst p { margin-bottom: 0; }

@media (max-width: 900px) {
  .fertig-raster { grid-template-columns: 1fr; }
  .fertig-seite { position: static; }
  .papier { padding: 22px 18px; }
}
