/* Businessplan-Generator – eigenes Styling auf Bootstrap 5.3, Farben und Formen wie die Startseite (index.html) */

:root {
    --bp-ink: #102033;
    --bp-primary: #075eea;
    --bp-primary-dark: #063b8e;
    --bp-accent: #12b886;
    --bp-accent-soft: #e7fbf4;
    --bp-soft: #eaf2ff;
    --bp-dark: #071629;
    --bp-muted: #5d6b7c;
    --bp-surface: #ffffff;
    --bp-bg: #f6f8fc;
    --bp-line: #dce5f2;

    --bs-body-color: var(--bp-ink);
    --bs-body-bg: var(--bp-bg);
    --bs-primary: var(--bp-primary);
    --bs-primary-rgb: 7, 94, 234;
    --bs-link-color: var(--bp-primary);
    --bs-link-color-rgb: 7, 94, 234;
    --bs-link-hover-color: var(--bp-primary-dark);
    --bs-border-radius: .5rem;
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-primary {
    --bs-btn-bg: var(--bp-primary);
    --bs-btn-border-color: var(--bp-primary);
    --bs-btn-hover-bg: var(--bp-primary-dark);
    --bs-btn-hover-border-color: var(--bp-primary-dark);
    --bs-btn-active-bg: var(--bp-primary-dark);
    --bs-btn-active-border-color: var(--bp-primary-dark);
    --bs-btn-disabled-bg: var(--bp-primary);
    --bs-btn-disabled-border-color: var(--bp-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--bp-primary);
    --bs-btn-border-color: var(--bp-primary);
    --bs-btn-hover-bg: var(--bp-soft);
    --bs-btn-hover-color: var(--bp-primary);
    --bs-btn-hover-border-color: #bfd4ff;
    --bs-btn-active-bg: var(--bp-soft);
    --bs-btn-active-color: var(--bp-primary);
}
/* Buttons wie auf der Startseite: rund und kräftig */
.btn-primary, .btn-outline-primary, .btn-lg { border-radius: 999px; font-weight: 700; }
.btn-primary { box-shadow: 0 12px 25px rgba(7, 94, 234, .24); }
.btn-primary.btn-sm, .btn-primary:disabled { box-shadow: none; }

.progress-bar { background-color: var(--bp-accent); }

/* Hinweisleiste über der Navigation (wie Startseite) */
.bp-topbar { background: var(--bp-dark); color: #fff; font-size: .9rem; padding: .55rem 0; }
.bp-topbar strong { color: #b8ffd8; }

/* Navigation */
.bp-navbar {
    background: var(--bp-surface);
    border-bottom: 1px solid var(--bp-line);
}
.bp-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--bp-ink);
    white-space: normal;
}
.bp-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--bp-primary), var(--bp-accent));
    color: #fff;
    font-weight: 900;
    font-size: .9rem;
    letter-spacing: .03em;
    flex-shrink: 0;
}
.bp-brand-title { font-weight: 900; font-size: 1.05rem; line-height: 1.2; letter-spacing: -.025em; }
.bp-brand-sub { font-size: .8rem; color: #6b7280; line-height: 1.2; }

/* Hero */
.bp-hero {
    background: linear-gradient(180deg, #ffffff 0%, var(--bp-bg) 100%);
    border-bottom: 1px solid var(--bp-line);
}
.bp-hero h1 { color: var(--bp-ink); letter-spacing: -.01em; }
.bp-eyebrow {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bp-accent);
    margin-bottom: .75rem;
}

/* Karten */
.bp-card {
    background: var(--bp-surface);
    border: 1px solid var(--bp-line);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(16, 32, 51, .04);
    overflow: hidden;
}

/* Paketkarten (Schritt 10, Stellungnahme) wie die Preistabelle der Startseite */
.bp-package { border-radius: 22px; }
.bp-package-featured { border: 2px solid var(--bp-primary); box-shadow: 0 20px 55px rgba(16, 32, 51, .10); }
.bp-package-badge {
    display: inline-block;
    align-self: flex-start;
    background: var(--bp-accent-soft);
    color: #087f5b;
    border-radius: 999px;
    padding: .15rem .7rem;
    font-size: .78rem;
    font-weight: 700;
}

/* Ablauf-Timeline */
.bp-timeline { counter-reset: step; }
.bp-timeline li {
    position: relative;
    padding: 0 0 1.1rem 2.75rem;
    counter-increment: step;
}
.bp-timeline li:last-child { padding-bottom: 0; }
.bp-timeline li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e8f1fb;
    color: var(--bp-primary);
    font-weight: 600;
    font-size: .85rem;
}
.bp-timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: .95rem;
    top: 2.1rem;
    bottom: .2rem;
    width: 1px;
    background: var(--bp-line);
}
.bp-timeline strong { display: block; color: var(--bp-ink); }
.bp-timeline span { display: block; font-size: .9rem; color: #6b7280; }

/* Wizard-Schritte */
.bp-steps .list-group-item { padding: .85rem 1.25rem; }
.bp-steps .list-group-item.is-current {
    background: #f0f6fd;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--bp-primary);
}

/* Footer */
.bp-footer {
    background: var(--bp-surface);
    border-top: 1px solid var(--bp-line);
    font-size: .875rem;
    color: #6b7280;
}
.bp-footer a { color: inherit; text-decoration: none; }
.bp-footer a:hover { color: var(--bp-primary); text-decoration: underline; }

/* Einwilligung Reichweitenmessung (Google Analytics) – beide Schaltflächen gleichwertig */
.bp-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: #fff;
    border-top: 1px solid var(--bp-line);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .12);
}
.bp-consent[hidden] { display: none; }
.bp-consent .btn { min-width: 9.5rem; }

/* ---------- Gründungszuschuss-Check ---------- */

/* Ohne JS: alle Fragen untereinander, keine Schritt-Navigation */
html:not(.js) [data-back],
html:not(.js) [data-next],
html:not(.js) .bp-stepper-head { display: none !important; }
html:not(.js) .bp-q + .bp-q { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--bp-line); }

/* Mit JS: nur die aktive Frage (vor der Initialisierung nur die erste) */
.js [data-stepper]:not(.is-stepper) .bp-q:not(:first-of-type),
.js [data-stepper].is-stepper .bp-q:not(.is-active) { display: none; }
.js [data-stepper]:not(.is-stepper) [data-submit] { display: none; }

.bp-q { border: 0; padding: 0; margin: 0; min-width: 0; }
.bp-q.is-active { animation: bp-fade .25s ease-out; }
@keyframes bp-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.bp-q-title {
    float: none;
    width: 100%;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--bp-ink);
    margin-bottom: .5rem;
}
.bp-q-help { color: #6b7280; margin-bottom: 1.25rem; }
.bp-q-sub { font-weight: 500; margin-bottom: .75rem; }
.bp-q legend:focus { outline: none; }

/* Antwortkarten */
.bp-options { display: grid; gap: .5rem; }
.bp-option {
    display: block;
    padding: .85rem 1rem .85rem 2.75rem;
    border: 1px solid var(--bp-line);
    border-radius: .6rem;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.bp-option::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: -.525rem;
    border: 2px solid #c3ccd8;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.bp-option:hover { border-color: #b8c7da; background: #fafcff; }
.btn-check:checked + .bp-option {
    border-color: var(--bp-primary);
    background: #f0f6fd;
    box-shadow: 0 0 0 1px var(--bp-primary);
}
.btn-check:checked + .bp-option::before {
    border-color: var(--bp-primary);
    box-shadow: inset 0 0 0 3px #fff;
    background: var(--bp-primary);
}
.btn-check:focus-visible + .bp-option { outline: 3px solid rgba(29, 78, 137, .35); outline-offset: 2px; }
.bp-options.is-invalid .bp-option { border-color: var(--bs-danger); }

/* Ampel */
.bp-dot {
    display: inline-block;
    flex-shrink: 0;
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
}
.bp-dot-lg { width: 1.6rem; height: 1.6rem; margin-top: .2rem; }
.bp-level-green { background: #2f9e44; box-shadow: 0 0 0 3px #d3f0da; }
.bp-level-yellow { background: #f0a500; box-shadow: 0 0 0 3px #fcebc0; }
.bp-level-red { background: #d63939; box-shadow: 0 0 0 3px #f8d4d4; }
.bp-level-info { background: #8da2bb; box-shadow: 0 0 0 3px #e3e9f1; }

.bp-verdict { border-left-width: 4px; }
.bp-verdict-green { border-left-color: #2f9e44; }
.bp-verdict-yellow { border-left-color: #f0a500; }
.bp-verdict-red { border-left-color: #d63939; }

.bp-results li + li { border-top: 1px solid var(--bp-line); }
.bp-cta { border-color: #bcd3ec; background: linear-gradient(180deg, #f5f9fe 0%, #fff 100%); }

/* ---------- Wizard ---------- */

.bp-req { color: #c2410c; }

/* Schritt-Navigation */
.bp-stepnav ol { padding: .25rem 0 .5rem; }
.bp-stepnav-item {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .5rem 1rem;
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: .925rem;
    line-height: 1.3;
}
a.bp-stepnav-item:hover { background: #f5f8fc; color: var(--bp-ink); }
.bp-stepnav-item.is-current { background: #eef4fc; font-weight: 600; box-shadow: inset 3px 0 0 var(--bp-primary); }
.bp-stepnav-item.is-locked { color: #9aa5b4; cursor: not-allowed; }
.bp-stepnav-title { padding-top: .1rem; }
.bp-stepnav-no {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 600;
    border: 1.5px solid #c9d3e0;
    color: #6b7280;
    background: #fff;
}
.bp-status-complete { background: #2f9e44; border-color: #2f9e44; color: #fff; }
.bp-status-started, .bp-status-unconfirmed { border-color: #f0a500; color: #9a6700; background: #fff8e6; }
.bp-status-locked { border-style: dashed; color: #b0b9c6; }

/* Übersicht */
.bp-overview li { position: relative; }
.bp-overview li + li { border-top: 1px solid var(--bp-line); }
.bp-overview li.is-next { background: #f5f9fe; }
.bp-overview li:hover { background: #f8fafc; }
.bp-badge-complete { background: #e3f4e8; color: #23733a; }
.bp-badge-started, .bp-badge-unconfirmed { background: #fff3d6; color: #8a5a00; }
.bp-badge-open { background: #eef2f7; color: #5b6676; }
.bp-badge-locked { background: transparent; color: #9aa5b4; border: 1px dashed #c9d3e0; }

/* Formulargruppen */
.bp-form-group h2 { color: var(--bp-ink); }
.bp-field .form-label { font-weight: 500; }
.bp-field legend.form-label { font-size: 1rem; float: none; }
.bp-choices.is-invalid { border-left: 3px solid var(--bs-danger); padding-left: .6rem; }
.bp-choices-inline .form-check-inline { margin-right: 1.5rem; }

/* Wiederholungszeilen */
.bp-repeat-rows { display: grid; gap: .75rem; }
.bp-repeat-row {
    border: 1px solid var(--bp-line);
    border-radius: .6rem;
    padding: .85rem 1rem 1rem;
    background: #fbfcfe;
}

/* Matrix (Kostenarten, Kanäle) */
.bp-matrix th[scope="row"] { min-width: 13rem; }
.bp-matrix .bp-matrix-col { min-width: 9.5rem; font-weight: 500; font-size: .875rem; color: #4b5563; }
.bp-matrix td, .bp-matrix th { padding-top: .35rem; padding-bottom: .35rem; }
.bp-matrix tr.is-off td { opacity: .45; }
.bp-matrix tr.is-off:focus-within td { opacity: 1; }

/* Live-Berechnung */
.bp-output-label { font-size: .875rem; color: #4b5563; margin-bottom: .25rem; font-weight: 500; }
.bp-output {
    padding: .55rem .8rem;
    border-radius: .5rem;
    background: #f1f5fa;
    font-weight: 600;
    color: var(--bp-ink);
    font-variant-numeric: tabular-nums;
}
.bp-output-sm { padding: .375rem .6rem; font-size: .925rem; min-height: calc(1.5em + .75rem + 2px); }
.bp-output[data-level="ok"] { background: #e7f6ec; color: #1d6b34; }
.bp-output[data-level="bad"] { background: #fdeaea; color: #a32020; }

/* Zusammenfassung */
.bp-summary > div + div { border-top: 1px solid var(--bp-line); }

/* Aktionsleiste */
.bp-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    margin: 0 -1rem;
    background: rgba(245, 247, 250, .94);
    backdrop-filter: blur(4px);
    border-top: 1px solid var(--bp-line);
}
@media (min-width: 992px) { .bp-actionbar { margin: 0; border: 1px solid var(--bp-line); border-radius: .75rem; } }
.bp-save-status[data-level="ok"] { color: #23733a !important; }
.bp-save-status[data-level="error"] { color: #a32020 !important; font-weight: 600; }

/* Wiederholungszeilen: Eingabefelder bündig, auch wenn ein Label umbricht */
.bp-repeat-row .row > .bp-field { display: flex; flex-direction: column; }
.bp-repeat-row .row > .bp-field > .form-label { margin-top: auto; }
.bp-actionbar .btn { white-space: nowrap; }
@media (max-width: 575.98px) { .bp-save-status { font-size: .75rem; text-align: center; } }

/* ---------- Plausibilitätsprüfung & Finanzpläne ---------- */

.bp-ampel {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem;
    border-radius: .6rem;
    border: 1px solid var(--bp-line);
    height: 100%;
}
.bp-ampel-red { background: #fdf1f1; border-color: #f3c9c9; }
.bp-ampel-yellow { background: #fffaeb; border-color: #f6e2a8; }
.bp-ampel-green { background: #f1faf3; border-color: #cbe9d3; }

.bp-findings li + li { border-top: 1px solid var(--bp-line); }
.bp-finding-red { box-shadow: inset 3px 0 0 #d63939; }
.bp-finding-yellow { box-shadow: inset 3px 0 0 #f0a500; }

.bp-kpi {
    height: 100%;
    padding: .9rem 1rem;
    border-radius: .75rem;
    background: var(--bp-surface);
    border: 1px solid var(--bp-line);
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.bp-kpi span { font-size: .8rem; color: #6b7280; }
.bp-kpi strong { font-size: 1.15rem; color: var(--bp-ink); font-variant-numeric: tabular-nums; }
.bp-kpi small { color: #6b7280; }
.bp-kpi.is-bad { border-color: #f3c9c9; background: #fdf6f6; }
.bp-kpi.is-bad strong { color: #a32020; }

.bp-plan-table { font-size: .875rem; font-variant-numeric: tabular-nums; }
.bp-plan-table th[scope="row"] { font-weight: 400; white-space: nowrap; }
.bp-plan-table td { white-space: nowrap; }
.bp-plan-table thead th { font-weight: 600; color: #4b5563; white-space: nowrap; }
.bp-plan-table .bp-sum th, .bp-plan-table .bp-sum td { font-weight: 600; background: #f6f8fb; }
.bp-plan-table .bp-sub th, .bp-plan-table .bp-sub td { font-weight: 600; }
.bp-plan-table .bp-total th, .bp-plan-table .bp-total td { font-weight: 700; border-top: 2px solid #c9d3e0; background: #eef3f9; }
.bp-plan-table .bp-gap th, .bp-plan-table .bp-gap td { font-weight: 700; color: #a32020; background: #fdeaea; }
.bp-plan-table .bp-ok th, .bp-plan-table .bp-ok td { color: #1d6b34; }
.bp-neg { color: #a32020; }

/* Liquiditätsplan: erste Spalte beim horizontalen Scrollen fixiert */
.bp-liquidity th[scope="row"], .bp-liquidity thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bp-surface);
    box-shadow: 1px 0 0 var(--bp-line);
}
.bp-liquidity .bp-sum th[scope="row"] { background: #f6f8fb; }
.bp-liquidity .bp-total th[scope="row"] { background: #eef3f9; }

/* ---------- Businessplan-Kapitel ---------- */
.bp-chapter-state { white-space: nowrap; font-weight: 500; }
.bp-chapter-done { color: #23733a; }
.bp-chapter-open { color: #6b7280; }
.bp-chapter-warn { color: #8a5a00; }
.bp-chapter-error { color: #a32020; }
.bp-chapter-text { max-width: 46rem; line-height: 1.65; }
.bp-chapter-text p { margin-bottom: .9rem; }
.bp-chapter-text ul { margin-bottom: .9rem; }
.bp-chapter details summary { cursor: pointer; color: var(--bp-primary); }

/* Rechtstexte */
.bp-legal h2 { font-size: 1.15rem; margin-top: 2rem; }
.bp-legal h3 { font-size: 1rem; margin-top: 1.25rem; }
.bp-legal ol, .bp-legal ul { padding-left: 1.25rem; }
.bp-legal li { margin-bottom: .35rem; }
mark.bp-todo { background: #fff3bf; color: #7c2d12; padding: 0 .2em; font-size: .9em; }
.bp-withdraw-button { font-weight: 600; }


/* App-Startseite (/generator/): Bausteine wie auf der index.html */
.bp-band { background: var(--bp-surface); border-top: 1px solid var(--bp-line); border-bottom: 1px solid var(--bp-line); }
.bp-note { border-radius: 1rem; padding: 1rem 1.25rem; margin-bottom: 1rem; border: 1px solid transparent; }
.bp-note-info { background: var(--bp-soft); border-color: #bfd4ff; }
.bp-note-success { background: var(--bp-accent-soft); border-color: #b2f2d7; }
.bp-note-warning { background: #fff7e6; border-color: #ffe0a3; }
.bp-note-danger { background: #fff0f0; border-color: #ffc9c9; }
.bp-checklist { list-style: none; padding-left: 0; }
.bp-checklist li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.bp-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--bp-accent); font-weight: 900; }
.bp-checklist-negative li::before { content: "✕"; color: #e03131; }
.bp-micro-trust li { background: var(--bp-surface); border: 1px solid var(--bp-line); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; }
.bp-icon {
    display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 13px; margin-bottom: .75rem;
    background: linear-gradient(135deg, var(--bp-primary), var(--bp-accent)); color: #fff; font-weight: 900;
}
.bp-cta-band { border-radius: 22px; background: linear-gradient(135deg, var(--bp-primary-dark), var(--bp-primary)); color: #fff; }
.bp-cta-band .btn-light { border-radius: 999px; font-weight: 700; color: var(--bp-primary-dark); }
.bp-steps-flow .bp-card { border-top: 4px solid var(--bp-accent); }
