/* =========================================================
   Businessplan-Generator - services.hwk-berlin.de/businessplan/
   Gestaltung aus assistenten.zdh.de/businessplan.php übernommen und auf die
   HWK-Farbpalette aus css/style.css umgestellt. Kopf, Fuß, Schrift und Buttons
   (.btn, .btn-primary, .btn-outline, .btn-lg, .btn-sm) kommen aus css/style.css.
   Unten: Übersicht im Admin (admin/businessplaene.php).
   Developed by Toni Sciacca - mail@tonisciacca.com
   ========================================================= */

:root {
    --primary: var(--hwk-blue-dark);
    --primary-light: rgba(7, 48, 112, 0.1);
    --bg-light: var(--bg-body);
    --text-primary: var(--hwk-black);
    --text-secondary: var(--hwk-grey-dark);
    --text-muted: var(--hwk-grey);
    --border-color: var(--hwk-blue-light-25);
    --success: var(--hwk-green-dark);
    --warning: var(--hwk-orange);
    --danger: var(--hwk-red-dark);
}

/* style.css setzt Abstände an Überschriften und Absätzen - im Werkzeug gelten die eigenen */
.bp h1, .bp h2, .bp h3, .bp h4, .bp h5, .bp p { margin: 0; padding: 0; }
.bp { display: block; width: 100%; color: var(--text-primary); }

/* ---------- Kopfband (wie Resilienz-Check) ---------- */
.bp-hero {
    background: linear-gradient(135deg, var(--hwk-blue-dark) 0%, var(--hwk-blue-light) 100%);
    color: #fff;
    padding: 24px 40px 26px;
}
.bp-hero-inner { max-width: 1320px; margin: 0 auto; }
.bp-hero-kicker {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 600;
    margin-bottom: 12px;
}
.bp-hero-kicker svg { width: 15px; height: 15px; }
.bp-hero h1 { color: #fff; font-size: 28px; line-height: 1.2; margin-bottom: 14px; }
.bp-hero-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }

.user-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.94); }
.user-name svg { width: 16px; height: 16px; }
.btn-header { padding: 8px 16px; height: 38px; background: white; color: var(--hwk-blue-dark); border: 1px solid rgba(255,255,255,.6); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; }
.btn-header:hover { background: var(--hwk-blue-light-25); }
.btn-header svg { width: 16px; height: 16px; }
.badge-berater { background: var(--warning); color: white; padding: 4px 10px; font-size: 11px; font-weight: 700; }

.main-container { max-width: 1400px; margin: 0 auto; padding: 24px 40px; }

/* Karten wie .tt-card im Portal: weiß mit Schatten */
.card { background: white; box-shadow: var(--shadow-default); margin-bottom: 24px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.card-header i { color: var(--primary); width: 20px; height: 20px; }
.card-body { padding: 24px; }

/* Bereichs-Trenner */
.section-divider { margin: 32px 0 24px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.section-divider h4 { font-size: 14px; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.section-divider h4 i { width: 18px; height: 18px; }

/* Typ-Auswahl */
.type-selection { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto 24px; }
.type-card { border: 3px solid var(--border-color); padding: 32px 24px; cursor: pointer; transition: all 0.3s; text-align: center; background: white; }
.type-card:hover { border-color: var(--primary); background: #f8fbff; transform: translateY(-2px); }
.type-card.selected { border-color: var(--primary); background: linear-gradient(135deg, #e3f0ff 0%, #f0f7ff 100%); }
.type-card .type-icon { width: 80px; height: 80px; margin: 0 auto 20px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--primary); }
.type-card .type-icon i, .type-card .type-icon svg { width: 40px; height: 40px; color: inherit; stroke: currentColor; }
.type-card.selected .type-icon { background: var(--primary); color: #ffffff; }
.type-card.selected .type-icon i, .type-card.selected .type-icon svg, .type-card.selected .type-icon svg * { color: #ffffff !important; stroke: #ffffff !important; }
.type-card h3 { font-size: 18px; margin-bottom: 10px; }
.type-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* Formular */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 16px; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.form-label .mandatory { color: var(--danger); margin-left: 2px; }
.form-label .optional { color: var(--text-muted); font-weight: 400; font-size: 11px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 12px 14px; font-size: 14px; border: 1px solid var(--border-color); background: white; font-family: inherit; color: var(--text-primary); border-radius: 0; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--hwk-blue-light); box-shadow: 0 0 0 3px var(--primary-light); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-select optgroup { font-weight: 700; color: var(--primary); background: var(--bg-light); }
.form-select option { font-weight: 400; color: var(--text-primary); }

/* Meisterpflicht-Anzeige */
.meister-info { padding: 12px 16px; margin-top: 8px; font-size: 12px; display: none; }
.meister-info.anlage-a { background: #fbe1ea; border-left: 4px solid var(--danger); color: var(--hwk-red-dark); display: block; }
.meister-info.anlage-b1 { background: #e7f4d9; border-left: 4px solid var(--success); color: var(--hwk-green-dark); display: block; }
.meister-info.anlage-b2 { background: var(--hwk-blue-light-25); border-left: 4px solid var(--hwk-blue-light); color: var(--hwk-blue-dark); display: block; }

/* Meisterbrief-Bereich (nur bei Anlage A) */
.meister-section { display: none; padding: 16px; background: #fff1dc; border: 1px solid var(--hwk-orange-75); margin-top: 16px; }
.meister-section.show { display: block; }

/* Buttons: Aussehen aus style.css, hier nur Abstände und Symbolgröße */
.section-nav { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-color); }
.btn i { width: 18px; height: 18px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Businessplan-ID */
.customer-id-box { background: #f2f8ff; border: 1px solid var(--hwk-blue-light-50); padding: 16px; text-align: center; margin-bottom: 24px; }
.customer-id-box label { font-size: 12px; color: var(--hwk-blue-dark); display: block; margin-bottom: 4px; }
.customer-id-box .id-value { font-size: 18px; font-weight: 700; font-family: monospace; color: var(--hwk-blue-dark); }
.customer-id-box .copy-link { font-size: 11px; color: var(--hwk-blue-light); margin-top: 8px; cursor: pointer; text-decoration: underline; }

/* Hinweiskasten */
.info-box { background: linear-gradient(135deg, #e3f0ff 0%, #d1e8ff 100%); border-left: 4px solid var(--primary); padding: 14px 18px; margin-bottom: 20px; }
.info-box h4 { font-size: 13px; color: var(--primary); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.info-box h4 i { width: 16px; height: 16px; }
.info-box p { font-size: 12px; color: var(--primary); line-height: 1.5; }

/* Fortschritt */
.progress-container { background: white; box-shadow: var(--shadow-default); padding: 20px 24px; margin-bottom: 24px; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.progress-title { font-size: 14px; font-weight: 600; }
.progress-status { font-size: 12px; color: var(--text-muted); }
.progress-bar { height: 8px; background: #e0e0e0; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%); transition: width 0.5s ease; }

/* Schrittleiste */
.stepper-container { display: flex; align-items: center; justify-content: center; background: white; box-shadow: var(--shadow-default); padding: 20px 16px; margin-bottom: 24px; overflow-x: auto; gap: 0; }
.step { display: flex; flex-direction: column; align-items: center; cursor: pointer; min-width: 70px; transition: all 0.3s; }
.step:hover { transform: translateY(-2px); }
.step-icon { width: 40px; height: 40px; border-radius: 50%; background: #e0e0e0; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; transition: all 0.3s; color: var(--text-muted); }
.step-icon i, .step-icon svg { width: 18px; height: 18px; color: inherit; stroke: currentColor; }
.step-label { font-size: 10px; color: var(--text-muted); text-align: center; max-width: 70px; line-height: 1.2; }
.step.active .step-icon { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); color: #ffffff; }
.step.active .step-icon i, .step.active .step-icon svg, .step.active .step-icon svg * { color: #ffffff !important; stroke: #ffffff !important; }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.complete .step-icon { background: var(--success); color: #ffffff; }
.step.complete .step-icon i, .step.complete .step-icon svg, .step.complete .step-icon svg * { color: #ffffff !important; stroke: #ffffff !important; }
.step.complete .step-label { color: var(--success); }
.step-line { flex: 1; height: 3px; background: #e0e0e0; min-width: 20px; max-width: 60px; }
.step-line.complete { background: var(--success); }

/* Kommentar-Zähler an der Schrittleiste */
.comment-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.step-icon { position: relative; }

/* Schrittleiste komplett grün, wenn alle Abschnitte fertig sind */
.stepper-container.all-complete .step-icon { background: var(--success) !important; }
.stepper-container.all-complete .step-icon i, .stepper-container.all-complete .step-icon svg, .stepper-container.all-complete .step-icon svg * { color: #ffffff !important; stroke: #ffffff !important; }
.stepper-container.all-complete .step-line { background: var(--success) !important; }
.stepper-container.all-complete .step-label { color: var(--success) !important; }

/* Zusammenfassung */
.summary-progress { margin-bottom: 32px; }
.summary-progress h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--primary); }
.summary-sections { display: flex; flex-direction: column; gap: 8px; }
.summary-section-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #f9f9f9; border-radius: 8px; transition: all 0.2s; }
.summary-section-item:hover { background: #f0f0f0; }
.summary-section-item.complete { background: #e7f4d9; }
.summary-section-item.incomplete { background: #fff1dc; }
.summary-icon { width: 24px; }
.summary-title { flex: 1; font-weight: 500; }
.summary-badge { background: var(--danger); color: white; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.summary-stats { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 120px; padding: 20px; background: var(--primary-light); border-radius: 12px; text-align: center; }
.stat-value { display: block; font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); }

.success-banner, .warning-banner { padding: 24px; border-radius: 12px; text-align: center; margin-bottom: 24px; }
.success-banner { background: #e7f4d9; border: 2px solid var(--success); }
.success-banner i, .success-banner svg { width: 48px; height: 48px; color: var(--success); margin-bottom: 12px; }
.success-banner h3 { color: var(--success); margin-bottom: 8px; }
.warning-banner { background: #fff1dc; border: 2px solid var(--hwk-orange); }
.warning-banner i, .warning-banner svg { width: 48px; height: 48px; color: var(--hwk-orange); margin-bottom: 12px; }
.warning-banner h3 { color: #8a4d10; margin-bottom: 8px; }

.action-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Abschnitte - nur der aktive ist sichtbar; Abstand zur festen Kopfzeile beim Scrollen */
.section-card { display: none; scroll-margin-top: 84px; }
.section-card.active { display: block; }

/* Ladeanzeige */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Finanz-Reiter */
.finanz-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: #f5f5f5; padding: 8px; margin-bottom: 24px; border-radius: 4px; }
.finanz-tab { padding: 8px 12px; background: white; border: 1px solid var(--border-color); font-size: 11px; cursor: pointer; transition: all 0.2s; white-space: nowrap; color: var(--text-primary); }
.finanz-tab:hover { background: var(--primary-light); }
.finanz-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Finanz-Bereiche */
.finanz-panel { display: none; scroll-margin-top: 84px; }
.finanz-panel.active { display: block; }
.panel-info { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; padding: 12px; background: #f9f9f9; border-left: 3px solid var(--primary); }

/* Weiter/Zurück innerhalb der Reiter */
.panel-nav { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-color); gap: 12px; }
.panel-nav .btn { min-width: 140px; }

/* Finanz-Gruppen */
.finanz-gruppe { margin-bottom: 24px; padding: 16px; background: #fafafa; border: 1px solid #eee; }
.finanz-gruppe h5 { margin: 0 0 16px 0; font-size: 13px; color: var(--primary); font-weight: 600; }

/* Umschalter Euro/Prozent */
.input-toggle-group { display: flex; flex-direction: column; gap: 8px; }
.toggle-btns { display: flex; gap: 0; }
.toggle-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-primary);
}
.toggle-btn:first-child { border-radius: 4px 0 0 4px; }
.toggle-btn:last-child { border-radius: 0 4px 4px 0; border-left: none; }
.toggle-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.toggle-btn:hover:not(.active) { background: var(--primary-light); }
.input-with-suffix { display: flex; align-items: center; gap: 0; }
.input-with-suffix .form-input { border-radius: 4px 0 0 4px; }
.input-suffix {
    padding: 10px 14px;
    background: #f0f0f0;
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}
.form-hint { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* Finanz-Summen */
.finanz-summe-box { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #f2f8ff; border: 1px solid var(--primary); margin: 16px 0; gap: 12px; }
.finanz-summe-box.highlight { background: var(--primary); color: white; }
.finanz-summe-box .summe-wert { font-size: 20px; font-weight: 700; }

/* Finanz-Prüfung (Kapitalbedarf = Finanzierung) */
.finanz-check { padding: 12px 16px; margin: 12px 0; font-size: 13px; }
.finanz-check.ok { background: #e7f4d9; border: 1px solid var(--success); color: var(--hwk-green-dark); }
.finanz-check.error { background: #fbe1ea; border: 1px solid var(--danger); color: var(--hwk-red-dark); }

/* Finanz-Hinweis */
.finanz-info-box { padding: 12px 16px; background: #f2f8ff; border: 1px solid var(--primary-light); font-size: 12px; margin: 12px 0; }

/* Finanz-Tabelle */
.finanz-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.finanz-table th, .finanz-table td { padding: 10px 12px; border: 1px solid var(--border-color); text-align: right; }
.finanz-table th { background: var(--primary); color: white; font-weight: 600; }
.finanz-table td:first-child { text-align: left; background: #f9f9f9; }
.finanz-table tr.subtotal td { background: #f2f8ff; font-weight: 500; }
.finanz-table tr.total td { background: var(--primary-light); font-weight: 700; }
.finanz-table input { width: 100%; padding: 6px; border: 1px solid #ddd; text-align: right; font-size: 12px; }

/* Break-even */
.breakeven-box { background: white; border: 2px solid var(--primary); padding: 20px; }
.breakeven-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eee; gap: 12px; }
.breakeven-item:last-child { border-bottom: none; }
.breakeven-item.total { background: var(--primary-light); margin: 12px -20px -20px; padding: 16px 20px; border-bottom: none; }
.breakeven-label { color: var(--text-secondary); }
.breakeven-value { font-weight: 600; font-size: 16px; }
.breakeven-item.total .breakeven-value { font-size: 20px; color: var(--primary); }

/* Hinweis Sozialversicherung */
.sv-hinweis { font-size: 10px; color: var(--text-muted); font-weight: 400; }

/* Berater-Kommentare */
.field-wrapper { position: relative; }
.field-comment-btn { position: absolute; top: -2px; right: -2px; width: 14px; height: 14px; background: var(--primary); color: white; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0.9; transition: all 0.2s; padding: 0; }
.field-comment-btn i, .field-comment-btn svg { width: 6px !important; height: 6px !important; color: white !important; stroke: white !important; }
.field-comment-btn:hover { opacity: 1; transform: scale(1.3); }
.field-comment-btn.has-comment { background: var(--danger); opacity: 1; }
.field-comment { background: #fff1dc; border-left: 3px solid var(--warning); padding: 10px 12px; margin-top: 8px; font-size: 12px; }
.field-comment.resolved { background: #f5f5f5; border-left-color: #ccc; opacity: 0.7; }

/* Kommentar-Verlauf */
.comment-thread { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-message { padding: 12px 14px; font-size: 13px; position: relative; }
.comment-message.berater { background: #fff1dc; border-left: 3px solid var(--warning); }
.comment-message.berater.resolved { background: #e7f4d9; border-left-color: var(--success); }
.comment-message.kunde { background: #f2f8ff; border-left: 3px solid var(--hwk-blue-light); margin-left: 20px; }
.comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { font-weight: 600; font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.comment-icon { font-style: normal; }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.comment-status.bearbeitet { background: #e7f4d9; color: var(--success); }
.comment-text { color: var(--text-primary); line-height: 1.5; }

/* Antwort des Kunden */
.comment-reply-form { margin-top: 10px; padding: 12px; background: #f8f9fa; border: 1px dashed var(--border-color); }
.comment-reply-input { width: 100%; min-height: 60px; padding: 10px; border: 1px solid var(--border-color); font-family: inherit; font-size: 13px; resize: vertical; }
.comment-reply-input:focus { outline: none; border-color: var(--hwk-blue-light); }
.comment-reply-actions { margin-top: 8px; display: flex; gap: 8px; }
.btn-reply { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--hwk-blue-light); color: white; border: none; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; }
.btn-reply:hover { background: var(--hwk-blue-dark); }
.btn-reply svg { width: 14px; height: 14px; }
.field-comment .comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.field-comment .comment-author { font-weight: 600; color: #8a4d10; font-size: 11px; }
.field-comment .comment-date { color: var(--text-muted); font-size: 10px; }
.field-comment .comment-text { color: #8a4d10; line-height: 1.4; }
.field-comment-input { width: 100%; padding: 8px; border: 1px solid var(--warning); font-size: 12px; font-family: inherit; margin-top: 8px; min-height: 60px; resize: vertical; }
.field-comment-actions { display: flex; gap: 8px; margin-top: 8px; }
.field-comment-actions button { padding: 6px 12px; font-size: 11px; cursor: pointer; border: none; }
.field-comment-actions .btn-save { background: var(--success); color: white; }
.field-comment-actions .btn-cancel { background: #e0e0e0; color: var(--text-primary); }
.field-comment-actions .btn-delete { background: var(--danger); color: white; }

/* Feld-Hilfe (Tooltip) */
.field-help { position: relative; display: inline-block; margin-left: 6px; cursor: help; }
.field-help i, .field-help svg { width: 14px; height: 14px; color: var(--primary); opacity: 0.6; vertical-align: middle; }
.field-help:hover i, .field-help:hover svg { opacity: 1; }
.field-help .help-tooltip { display: none; position: absolute; left: 0; top: 20px; background: white; border: 1px solid var(--border-color); padding: 12px 14px; width: 320px; max-width: 80vw; font-size: 12px; line-height: 1.5; color: var(--text-secondary); box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100; font-weight: 400; }
.field-help:hover .help-tooltip { display: block; }

@media (max-width: 768px) {
    .bp-hero { padding: 20px 16px 22px; }
    .bp-hero h1 { font-size: 24px; }
    .main-container { padding: 16px; }
    /* mittig + überlaufend schneidet die ersten Schritte links ab - auf schmalen Geräten links beginnen */
    .stepper-container { justify-content: flex-start; }
    .type-selection { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .section-nav { flex-direction: column; gap: 12px; }
    .section-nav .btn { width: 100%; justify-content: center; white-space: normal; }
    .panel-nav .btn { min-width: 0; white-space: normal; }
    .action-buttons .btn { width: 100%; white-space: normal; }
}

/* =========================================================
   Admin: Übersicht der Businesspläne (admin/businessplaene.php)
   ========================================================= */
.bp-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.bp-stats .tt-admin-stat { cursor: pointer; border: 2px solid transparent; border-top: 4px solid var(--hwk-blue-light); transition: border-color 0.2s; }
.bp-stats .tt-admin-stat:hover, .bp-stats .tt-admin-stat.active { border-color: var(--hwk-blue-dark); }
.bp-stats .tt-admin-stat.active { background: var(--hwk-blue-light-25); }
.bp-stats .bp-stat-danger .tt-admin-stat-value { color: var(--hwk-red-dark); }
.bp-stats .bp-stat-warning .tt-admin-stat-value { color: var(--hwk-orange); }
.bp-stats .bp-stat-success .tt-admin-stat-value { color: var(--hwk-green-dark); }

.bp-filter { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.bp-filter .tt-form-control { flex: 0 1 180px; }
.bp-filter .bp-filter-suche { flex: 1 1 260px; }

.bp-tabelle-wrap { overflow-x: auto; max-width: calc(100vw - 92px); } /* 2x 24px Hauptbereich + 2x 22px Karte */
.bp-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.bp-tabelle th { text-align: left; color: var(--hwk-grey); font-size: 12px; text-transform: uppercase; padding: 8px 6px; font-weight: 700; }
.bp-tabelle td { padding: 10px 6px; border-top: 1px solid var(--hwk-blue-light-25); vertical-align: middle; }
.bp-tabelle tr.hidden { display: none; }
.bp-tabelle tbody tr:hover { background: #f7fbff; }
.bp-aktionen { text-align: right; white-space: nowrap; }
.bp-aktionen .bp-ok { color: var(--hwk-green-dark); }

.tt-badge.bp-muted { background: #eef2f7; color: var(--hwk-grey-dark); }
.bp-anlage { display: inline-block; padding: 3px 8px; font-size: 11px; font-weight: 700; }
.bp-anlage-a { background: var(--hwk-blue-light-25); color: var(--hwk-blue-dark); }
.bp-anlage-b1 { background: #e7f4d9; color: var(--hwk-green-dark); }
.bp-anlage-b2 { background: #fff1dc; color: #8a4d10; }
.bp-anlage-x { background: #eef2f7; color: var(--hwk-grey-dark); }

.bp-kommentare { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; background: var(--hwk-red-dark); color: white; font-size: 11px; font-weight: 700; }
.bp-kommentare.none { background: #e0e0e0; color: var(--hwk-grey); }

.bp-fortschritt { width: 80px; height: 6px; background: #e0e0e0; overflow: hidden; }
.bp-fortschritt div { height: 100%; background: var(--hwk-green-dark); }
.bp-fortschritt-text { font-size: 11px; color: var(--hwk-grey); margin-top: 4px; }

.bp-toast { position: fixed; bottom: 24px; right: 24px; padding: 16px 24px; background: var(--hwk-black); color: white; font-size: 14px; box-shadow: var(--shadow-hover); z-index: 1000; display: none; }
.bp-toast.success { background: var(--hwk-green-dark); }
.bp-toast.error { background: var(--hwk-red-dark); }
.bp-toast.show { display: block; }

@media (max-width: 768px) {
    .bp-tabelle .hide-mobile { display: none; }
    .bp-tabelle th, .bp-tabelle td { padding: 8px 4px; font-size: 13px; }
    .bp-filter .tt-form-control, .bp-filter .btn { flex: 1 1 100%; }
}
