:root {
    /* Brand Colors */
    --brand-yellow: #eea54e;
    --brand-light-green: #e7efee;
    --brand-green: #244941;
    --brand-pink: #fbc5b9;
    
    /* Transparent Variants */
    --brand-yellow-10: rgba(238, 165, 78, 0.1);
    --brand-yellow-20: rgba(238, 165, 78, 0.2);
    --brand-green-10: rgba(36, 73, 65, 0.1);
    --brand-green-20: rgba(36, 73, 65, 0.2);
    --brand-pink-10: rgba(251, 197, 185, 0.1);
    --brand-pink-20: rgba(251, 197, 185, 0.2);
    
    /* Highlight (accent for active states, hover, focus) */
    --highlight: #1eb97a;
    --highlight-10: rgba(30, 185, 122, 0.1);
    --highlight-20: rgba(30, 185, 122, 0.2);

    /* Complementary Colors */
    --accent-teal: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    
    /* Backgrounds */
    --bg-primary: #e7efee;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    --bg-soft: #f8f9fa;
    --bg-hover: #f3f4f6;
    
    /* Text */
    --text-primary: #1f2937;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --text-on-brand: #ffffff;
    
    /* Borders */
    --card-border: #e5e7eb;
    --border-subtle: #e5e7eb;
    --border-light: rgba(36, 73, 65, 0.1);
    
    /* Spacing Scale */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 48px;
    
    /* Elevation System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-success); }
.text-warning { color: var(--accent-warning); }
.text-danger { color: var(--accent-red); }

/* Header bar (Erstanalyse staff/preview, owner-dashboard-v7) */
:root {
    --header-float-top: 14px;
    --header-bar-inner-height: 50px;
    --header-float-scroll-padding: calc(var(--header-float-top) + var(--header-bar-inner-height) + 16px);
}

.has-sticky-float-header {
    scroll-padding-top: var(--header-float-scroll-padding);
}

.has-sticky-float-header .header-bar {
    position: sticky;
    top: var(--header-float-top);
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0;
    box-sizing: border-box;
    min-height: var(--header-bar-inner-height);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.header-bar {
    align-items: center;
}
.header-bar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
}
.header-address-trigger-wrap {
    margin-bottom: 0;
}

.header-right-divider {
    width: 1px;
    height: 24px;
    background: var(--border-subtle, #e5e7eb);
    margin: 0 4px;
    flex-shrink: 0;
}

/* Shared header chip box – light pill (matches .nav-menu) */
.header-address,
.header-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    box-sizing: border-box;
    padding: 0 16px;
    margin-bottom: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    min-width: 0;
    text-decoration: none;
    font: inherit;
    cursor: default;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.header-address--primary {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 16px;
}
.header-address .header-address-icon,
.header-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--highlight-10);
    color: var(--highlight);
    border: none;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}
.header-address--primary .header-address-icon,
.header-profile.header-address--primary .header-profile-avatar {
    width: 32px;
    height: 32px;
}
.header-address .header-address-icon .material-icons,
.header-profile-avatar .material-icons {
    font-size: 16px;
}
.header-address--primary .header-address-icon .material-icons,
.header-profile.header-address--primary .header-profile-avatar .material-icons {
    font-size: 18px;
}
.header-address-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-align: left;
}
.header-address-line1 {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark, #111827);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
}
.header-address-line2 {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted, #6b7280);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
    margin-top: 0;
}
.header-address-trigger-wrap .header-address {
    cursor: pointer;
    user-select: none;
}
.header-address-trigger-wrap .header-address:hover,
button.header-profile:hover,
a.header-profile:hover,
.header-profile.is-clickable:hover,
.header-address.is-clickable:hover {
    background: var(--bg-soft);
    border-color: rgba(0, 0, 0, 0.08);
}
.header-address-trigger-wrap .header-address[aria-expanded="true"] {
    border-color: var(--highlight);
    box-shadow: 0 0 0 2px rgba(30, 185, 122, 0.25);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.header-address-chevron {
    margin-left: 4px;
    font-size: 20px !important;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}
.header-address[aria-expanded="true"] .header-address-chevron {
    transform: rotate(180deg);
    color: var(--highlight);
}
button.header-profile,
a.header-profile,
.header-profile.is-clickable {
    cursor: pointer;
}
.header-profile-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-align: left;
}
.header-profile-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark, #111827);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
}
.header-profile-role {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted, #6b7280);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
    margin-top: 0;
}
/* Header icon chip – square box matching address/profile chips */
.header-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    box-sizing: border-box;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    color: var(--text-muted, #6b7280);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    font: inherit;
}
button.header-icon-chip {
    padding: 0;
    font: inherit;
}
.header-icon-chip:hover {
    background: var(--bg-soft);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--highlight);
}
.header-icon-chip:hover .material-icons {
    color: var(--highlight);
}
.header-icon-chip.active {
    background: var(--highlight-10);
    color: var(--highlight);
    border-color: var(--highlight);
}
.header-icon-chip.active .material-icons {
    color: var(--highlight);
}
.header-icon-chip .material-icons {
    font-size: 20px;
}
.header-icon-chip.has-notifications-badge {
    position: relative;
}
.owner-notifications-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
    pointer-events: none;
}

.nav-menu {
    height: 50px;
    box-sizing: border-box;
    align-items: center;
}

.header-nav-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.header-nav-mobile-toggle .material-icons {
    font-size: 22px;
}

.header-nav-mobile-toggle .close-icon {
    display: none;
}

.header-bar.is-nav-menu-open .header-nav-mobile-toggle .menu-icon {
    display: none;
}

.header-bar.is-nav-menu-open .header-nav-mobile-toggle .close-icon {
    display: inline-flex;
}

@media (max-width: 1024px) {
    .has-sticky-float-header .header-bar {
        flex-wrap: nowrap;
        align-items: center;
    }

    .header-bar-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .header-right-actions {
        flex-shrink: 0;
        margin-left: auto;
    }

    .header-nav-mobile-toggle {
        display: inline-flex;
    }

    .header-bar > .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: min(300px, calc(100vw - 28px));
        height: auto;
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 6px;
        z-index: 70;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 14px;
        box-shadow:
            0 8px 32px rgba(15, 23, 42, 0.12),
            0 2px 8px rgba(15, 23, 42, 0.06);
    }

    .header-bar.is-nav-menu-open > .nav-menu {
        display: flex;
    }

    .header-bar > .nav-menu .nav-link {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
        padding: 10px 14px;
        box-sizing: border-box;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    gap: var(--spacing-sm);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--brand-green);
    color: white;
}
.btn-primary:hover {
    background-color: #1a3630;
}

.btn-secondary {
    background-color: white;
    border-color: var(--card-border);
    color: #000;
}
.btn-secondary:hover {
    background-color: var(--bg-hover);
    border-color: var(--highlight);
    color: var(--highlight);
}

.btn-accent {
    background-color: var(--brand-yellow);
    color: #000;
}
.btn-accent:hover {
    background-color: #d99645;
    color: var(--highlight);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    border: 1px solid var(--card-border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Status Badges */
.status-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-active, .status-occupied {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}
.status-inactive, .status-vacant {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
}
.status-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
}
.status-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* Tables */
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 2px solid var(--bg-primary);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}
td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
}
tr:last-child td {
    border-bottom: none;
}

/* Material Icons helpers */
.material-icons {
    font-size: 20px;
    vertical-align: middle;
}
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }

/* Grid Layouts Helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--spacing-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--spacing-lg); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
/* Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Document download loading feedback */
.dokumente-item.is-downloading {
    pointer-events: none;
    opacity: 0.72;
}
.dokumente-item.is-downloading .dokumente-open .material-icons.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}
.dokumente-download-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(12px);
    z-index: 1400;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #1a3630;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.dokumente-download-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.dokumente-download-toast .material-icons {
    font-size: 20px;
    color: #1eb97a;
}
.dokumente-download-toast .material-icons.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}
.dokumente-download-toast.is-success .material-icons {
    color: #1eb97a;
}

/* Button Disabled State */
.disabled {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Chart Tab Active State */
.chart-tab.active {
    border-bottom: 2px solid var(--highlight);
    font-weight: 700;
    color: var(--highlight);
}
.chart-tab {
    color: var(--text-muted);
}

/* ==========================================================================
   Planung (Erstanalyse) - Fintech Layout
   ========================================================================== */

.planung-fintech-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 16px 0;
    width: 100%;
    max-width: 100%;
}

.planung-fintech-layout:has(.planung-control-panel--v1) {
    gap: 12px;
    padding: 12px 0 8px;
}

.planung-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Generic Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-content {
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    border: 1px solid var(--border-subtle, #e5e7eb);
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-subtle, #e5e7eb);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
}

.btn-close-modal {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-close-modal:hover {
    background: var(--bg-soft, #f9fafb);
    color: var(--text-primary, #111827);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    padding: 0 24px 24px;
    flex-shrink: 0;
}

/* Planung modal: keep checkbox/range rows clickable (override page-level .form-group input rules) */
#modalPlanungInputs .form-group input[type="checkbox"],
#modalPlanungInputs .form-group input[type="radio"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 4px;
    box-shadow: none;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--brand-green, #1EB97A);
}

#modalPlanungInputs .form-group[style*="display: flex"] label,
#modalPlanungInputs .form-group[style*="display:flex"] label {
    display: inline;
    margin-bottom: 0;
    width: auto;
    cursor: pointer;
}

#modalPlanungInputs .slider-with-input input[type="number"] {
    width: 88px;
    padding: 6px 8px;
}

#modalPlanungInputs .slider-with-input input[type="range"] {
    width: auto;
    flex: 1;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Custom Sliders */
.slider-with-input {
    display: flex;
    align-items: center;
    gap: 16px;
}

.custom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    margin: 0;
    flex: 1;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
}

.custom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
}

.variant-tab--base {
    cursor: pointer;
    user-select: none;
}

.variant-tab {
    border: 1.5px solid transparent;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.variant-tab.active {
    background: white;
    color: #0f172a;
    border-color: var(--highlight);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.variant-tab-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.variant-tab-wrap--dragging {
    opacity: 0.55;
}

.variant-tab-wrap--drop-target {
    outline: 1px dashed rgba(30, 185, 122, 0.55);
    outline-offset: 2px;
    border-radius: 6px;
}

.variant-drag-handle {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: grab;
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.variant-drag-handle:active {
    cursor: grabbing;
}

.variant-drag-handle:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.rename-variant {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.rename-variant:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.delete-variant {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.delete-variant:hover {
    color: #dc2626;
    background: #fef2f2;
}

.planung-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--brand-light-green);
    color: var(--brand-green);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    align-self: flex-start;
}

.planung-badge--inline {
    margin-left: 4px;
    vertical-align: middle;
}

/* Unified control panel: variant switcher + parameter overview */
.planung-control-panel {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 22px rgba(15, 23, 42, 0.06);
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.planung-control-panel.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.planung-control-panel__accent {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
    background: linear-gradient(
        90deg,
        rgba(36, 73, 65, 0.12) 0%,
        rgba(30, 185, 122, 0.22) 50%,
        rgba(36, 73, 65, 0.12) 100%
    );
}

.planung-control-panel__inner {
    padding: 0;
}

.planung-control-panel__zone {
    padding: 16px 20px;
}

.planung-control-panel__zone--variants {
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.planung-control-panel__zone--params {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.planung-control-panel__zone-label {
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.planung-control-panel__params-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.planung-control-panel__params-head .planung-control-panel__zone-label {
    margin-bottom: 0;
}

.planung-control-panel__params-head .planung-inputs-actions {
    margin-left: auto;
}

.planung-param-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.planung-param-group__label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

.planung-param-group__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.planung-control-panel__params {
    padding-top: 0;
}

.planung-section-nav--tabs {
    flex-wrap: nowrap;
    gap: 0;
    margin-top: 0;
    padding: 0 20px;
    border-top: none;
}

.planung-section-nav--tabs .planung-section-nav__link {
    flex: 1;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    margin-bottom: -1px;
}

.planung-section-nav--tabs .planung-section-nav__link:hover {
    background: rgba(30, 185, 122, 0.06);
    border-color: transparent;
}

.planung-section-nav--tabs .planung-section-nav__link.is-active {
    background: transparent;
    border-bottom-color: var(--highlight, #1eb97a);
    border-color: transparent;
    border-bottom: 2px solid var(--highlight, #1eb97a);
}

@media (max-width: 900px) {
    .planung-param-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .planung-section-nav--tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .planung-section-nav--tabs::-webkit-scrollbar {
        display: none;
    }

    .planung-section-nav--tabs .planung-section-nav__link {
        flex: 0 0 auto;
        min-width: max-content;
    }
}

/* V2 Split Header (staff trial) */
.planung-control-panel--v2 .planung-control-panel__inner--v2 {
    padding: 0;
}

.planung-v2-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.planung-v2-row--top {
    background: #f8fafc;
    padding: 8px 12px;
    gap: 10px;
}

.planung-v2-row__variants {
    flex: 1 1 200px;
    min-width: 0;
}

.planung-control-panel--v2 .planung-control-panel__variants {
    margin: 0;
}

.planung-control-panel--v2 .planung-variant-switcher__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    grid-template-columns: unset;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    align-items: center;
}

.planung-control-panel--v2 .planung-variant-switcher__tabs::-webkit-scrollbar {
    display: none;
}

.planung-v2-kpis {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.planung-v2-kpi {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.planung-v2-kpi-sep {
    color: #cbd5e1;
    font-weight: 700;
    user-select: none;
}

.planung-v2-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.planung-v2-row--params {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: #fff;
}

.planung-v2-params {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.planung-control-panel--v2 .planung-netto-disclaimer {
    margin: 0;
}

.planung-section-nav--segment {
    flex-wrap: nowrap;
    gap: 0;
    margin-top: 0;
    padding: 0;
    border-top: none;
}

.planung-section-nav--segment .planung-section-nav__link {
    flex: 1;
    justify-content: center;
    padding: 10px 8px;
    border-radius: 0;
    border: none;
    border-right: 1px solid rgba(15, 23, 42, 0.06);
    background: #fafbfc;
    font-size: 12px;
}

.planung-section-nav--segment .planung-section-nav__link:last-child {
    border-right: none;
}

.planung-section-nav--segment .planung-section-nav__link:hover {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.06);
    color: var(--highlight, #1eb97a);
}

.planung-section-nav--segment .planung-section-nav__link.is-active {
    background: #fff;
    color: #0d7a52;
    border-color: rgba(15, 23, 42, 0.06);
    box-shadow: inset 0 -2px 0 var(--highlight, #1eb97a);
}

.planung-section-nav-wrap {
    position: relative;
}

.planung-control-panel--v1 .cp-v1-section-nav-wrap.planung-section-nav-wrap--with-filter,
.planung-section-nav-wrap--with-filter {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    flex-wrap: wrap;
}

.planung-section-nav-wrap--with-filter > .planung-section-nav,
.planung-section-nav-wrap--with-filter > .cp-v1-section-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.planung-ext-filter {
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
}

.planung-ext-filter__bar {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.planung-ext-filter.is-filtered .planung-ext-filter__bar {
    border-color: rgba(100, 116, 139, 0.28);
    background: #f8fafc;
}

.planung-ext-filter__switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 8px;
    border: none;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: #475569;
    transition: background 0.15s ease, color 0.15s ease;
}

.planung-ext-filter__switch:hover,
.planung-ext-filter__switch:focus-visible {
    background: rgba(15, 23, 42, 0.04);
    outline: none;
}

.planung-ext-filter__track {
    position: relative;
    width: 32px;
    height: 18px;
    border-radius: 999px;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background 0.18s ease;
}

.planung-ext-filter__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform 0.18s ease;
}

.planung-ext-filter__switch.is-on .planung-ext-filter__track {
    background: #1eb97a;
}

.planung-ext-filter__switch.is-on .planung-ext-filter__thumb {
    transform: translateX(14px);
}

.planung-ext-filter__switch.is-partial .planung-ext-filter__track {
    background: linear-gradient(90deg, #94a3b8 0%, #1eb97a 100%);
}

.planung-ext-filter__switch-label {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.planung-ext-filter__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #475569;
    background: #e2e8f0;
}

.planung-ext-filter__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.planung-ext-filter__menu-btn:hover,
.planung-ext-filter__menu-btn:focus-visible,
.planung-ext-filter.is-open .planung-ext-filter__menu-btn {
    background: rgba(15, 23, 42, 0.05);
    color: #334155;
    outline: none;
}

.planung-ext-filter__menu-btn .material-icons {
    font-size: 18px;
}

.planung-ext-filter__popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1200;
    width: min(320px, calc(100vw - 32px));
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.14),
        0 2px 8px rgba(15, 23, 42, 0.06);
    animation: compInfoPanelIn 0.18s ease;
}

/* When open, allow the in-panel fallback layout to escape the frosted card clip.
   JS portals the popover to document.body (panel uses overflow:hidden + backdrop-filter). */
.planung-control-panel:has(.planung-ext-filter.is-open),
.planung-control-panel--v1:has(.planung-ext-filter.is-open) {
    overflow: visible;
}

.planung-ext-filter__popover-head {
    margin-bottom: 12px;
}

.planung-ext-filter__popover-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.planung-ext-filter__title-info {
    color: #9ca3af;
}

.planung-ext-filter__title-info:hover,
.planung-ext-filter__title-info:focus-visible {
    color: #1a5560;
    background: rgba(26, 85, 96, 0.08);
}

/* Supporting copy under the title — muted secondary, not a footnote asterisk. */
.planung-ext-filter__popover-hint {
    margin: 8px 0 0;
    padding: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: #64748b;
}

.planung-ext-filter__groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 280px;
    overflow: auto;
}

.planung-ext-filter__group-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 6px 2px;
}

.planung-ext-filter__option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin: 0 0 2px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.planung-ext-filter__option:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.04);
}

.planung-ext-filter__option:has(input:checked) {
    background: rgba(30, 185, 122, 0.07);
    border-color: rgba(30, 185, 122, 0.16);
}

.planung-ext-filter__option:has(input:checked):hover {
    background: rgba(30, 185, 122, 0.11);
    border-color: rgba(30, 185, 122, 0.22);
}

.planung-ext-filter__option:has(input:focus-visible) {
    outline: 2px solid rgba(30, 185, 122, 0.45);
    outline-offset: 1px;
}

.planung-ext-filter__option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.planung-ext-filter__option-box {
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}

.planung-ext-filter__option:hover .planung-ext-filter__option-box {
    border-color: #94a3b8;
}

.planung-ext-filter__option input:checked + .planung-ext-filter__option-box {
    background: #1eb97a;
    border-color: #1eb97a;
    box-shadow: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2L6.4 11.1L12.5 4.8' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.planung-ext-filter__option-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.planung-ext-filter__option:has(input:checked) .planung-ext-filter__option-name {
    color: #1a4d3a;
}

.planung-ext-filter__popover-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}

.planung-ext-filter__reset {
    border: none;
    background: transparent;
    color: #0e7490;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 2px;
}

.planung-ext-filter__reset:hover {
    color: #1eb97a;
}

.planung-ext-filter-hint {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.comp-card--filtered {
    box-shadow: 0 0 0 1px rgba(100, 116, 139, 0.12);
}

@media (max-width: 720px) {
    .planung-ext-filter {
        width: 100%;
        margin-left: 0;
    }

    .planung-ext-filter__bar {
        width: 100%;
        justify-content: space-between;
    }

    .planung-ext-filter__popover {
        left: 0;
        right: 0;
        width: auto;
    }
}

.planung-section-nav-compact {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #fafbfc;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.planung-section-nav-compact__label {
    font-size: 13px;
    font-weight: 600;
    color: #0d7a52;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planung-section-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
}

.planung-section-nav-toggle .material-icons {
    font-size: 22px;
}

.planung-section-nav-toggle .close-icon {
    display: none;
}

.planung-section-nav-wrap.is-section-nav-open .planung-section-nav-toggle .menu-icon {
    display: none;
}

.planung-section-nav-wrap.is-section-nav-open .planung-section-nav-toggle .close-icon {
    display: inline-flex;
}

@media (max-width: 1024px) {
    .planung-section-nav-compact {
        display: flex;
    }

    .planung-section-nav-toggle {
        display: inline-flex;
    }

    .planung-section-nav-wrap .planung-section-nav--segment {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        right: 10px;
        left: 10px;
        flex-direction: column;
        gap: 4px;
        padding: 6px;
        z-index: 40;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 14px;
        box-shadow:
            0 8px 32px rgba(15, 23, 42, 0.12),
            0 2px 8px rgba(15, 23, 42, 0.06);
    }

    .planung-section-nav-wrap.is-section-nav-open .planung-section-nav--segment {
        display: flex;
    }

    .planung-section-nav-wrap .planung-section-nav--segment .planung-section-nav__link {
        flex: none;
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
        border-right: none;
        padding: 10px 14px;
        box-shadow: none;
        background: #fff;
    }

    .planung-section-nav-wrap .planung-section-nav--segment .planung-section-nav__link.is-active {
        background: var(--highlight-10, rgba(30, 185, 122, 0.1));
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .planung-v2-row--top {
        flex-direction: column;
        align-items: stretch;
    }

    .planung-v2-kpis {
        order: 2;
    }

    .planung-v2-actions {
        order: 3;
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* V1 Frosted unified card (staff Erstanalyse) */
.planung-control-panel--v1 {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(15, 23, 42, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    overflow: hidden;
}

.planung-control-panel--v1 .cp-v1__zone {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.planung-control-panel--v1 .cp-v1__zone--variants {
    padding-top: 12px;
    padding-bottom: 10px;
}

.planung-control-panel--v1 .cp-v1-section-nav-wrap {
    padding-top: 8px;
    padding-bottom: 8px;
}

.planung-control-panel--v1 .cp-v1__zone:last-child {
    border-bottom: none;
}

.planung-control-panel--v1 .cp-v1__zone--variants {
    background: rgba(248, 250, 252, 0.6);
}

.planung-control-panel--v1 .cp-v1__row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.planung-control-panel--v1 .cp-v1__row__variants {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

.planung-control-panel--v1 .cp-v1__row__actions {
    margin-left: auto;
    flex-shrink: 0;
}

.planung-control-panel--v1 .cp-v1__row--variants-top {
    flex-wrap: nowrap;
}

.planung-control-panel--v1 .cp-v1__row--variants-top .cp-v1__row__variants {
    flex: 1 1 auto;
    min-width: 0;
}

.planung-control-panel--v1 .cp-v1-variant-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
}

.planung-control-panel--v1 .cp-v1-variant-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    min-height: 50px;
    height: auto;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    color: #334155;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: normal;
    text-align: left;
    transition: all 0.2s;
}

.planung-control-panel--v1 .cp-v1-variant-btn:hover {
    border-color: rgba(30, 185, 122, 0.25);
    color: var(--highlight, #1eb97a);
}

.planung-control-panel--v1 .cp-v1-variant-btn.active {
    background: rgba(30, 185, 122, 0.06);
    color: #166534;
    border: 1px solid rgba(30, 185, 122, 0.22);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    font-weight: 600;
}

.planung-control-panel--v1 .cp-v1-variant-btn__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 800;
}

.planung-control-panel--v1 .cp-v1-variant-btn.active .cp-v1-variant-btn__num {
    background: rgba(30, 185, 122, 0.12);
    color: #166534;
    box-shadow: none;
}

.planung-control-panel--v1 .cp-v1-params {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 80px;
    row-gap: 8px;
    align-items: center;
}

.planung-control-panel--v1 .cp-v1-params .cp-param-group {
    display: grid;
    grid-template-columns: 5.75rem minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
}

.planung-control-panel--v1 .cp-param-group__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    min-width: 0;
    text-align: right;
}

.planung-control-panel--v1 .cp-param-group__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.planung-control-panel--v1 .planung-param-pill__body {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    min-width: 0;
}

.planung-control-panel--v1 .planung-param-pill__name {
    display: inline;
}

@media (max-width: 1024px) {
    .planung-control-panel--v1 .planung-param-pill__name {
        display: none;
    }

    .planung-control-panel--v1 .planung-section-nav-compact,
    .planung-control-panel--v1 .cp-v1-section-nav-compact {
        display: none !important;
    }

    .planung-control-panel--v1 .planung-section-nav-toggle,
    .planung-control-panel--v1 .cp-v1-section-nav-toggle {
        display: none !important;
    }

    .planung-control-panel--v1 .planung-section-nav-wrap .cp-v1-section-nav {
        display: flex;
        position: static;
        top: auto;
        right: auto;
        left: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0;
        z-index: auto;
        background: rgba(248, 250, 252, 0.5);
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .planung-control-panel--v1 .planung-section-nav-wrap .cp-v1-section-nav__link {
        flex: 0 1 auto;
        width: auto;
        justify-content: center;
        border-radius: 999px;
    }
}

.planung-control-panel--v1 .cp-v1-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: transparent;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.planung-control-panel--v1 .cp-v1-section-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.15s;
    cursor: pointer;
    font-family: inherit;
}

.planung-control-panel--v1 .cp-v1-section-nav__link .material-icons {
    font-size: 16px;
}

.planung-control-panel--v1 .cp-v1-section-nav__link:hover {
    color: var(--highlight, #1eb97a);
    border-color: rgba(30, 185, 122, 0.25);
}

.planung-control-panel--v1 .cp-v1-section-nav__link.is-active {
    background: var(--highlight-10, rgba(30, 185, 122, 0.1));
    color: #0d7a52;
    border-color: rgba(30, 185, 122, 0.35);
}

/* Same pill nav on Anlage / Zähler (outside control panel) */
#page-energie .cp-v1-section-nav,
#page-mieter .cp-v1-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: transparent;
}
#page-energie .cp-v1-section-nav__link,
#page-mieter .cp-v1-section-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.15s;
    cursor: pointer;
    font-family: inherit;
}
#page-energie .cp-v1-section-nav__link .material-icons,
#page-mieter .cp-v1-section-nav__link .material-icons {
    font-size: 16px;
}
#page-energie .cp-v1-section-nav__link:hover,
#page-mieter .cp-v1-section-nav__link:hover {
    color: var(--highlight, #1eb97a);
    border-color: rgba(30, 185, 122, 0.25);
}
#page-energie .cp-v1-section-nav__link.is-active,
#page-mieter .cp-v1-section-nav__link.is-active {
    background: var(--highlight-10, rgba(30, 185, 122, 0.1));
    color: #0d7a52;
    border-color: rgba(30, 185, 122, 0.35);
}

.planung-control-panel--v1 .cp-v1-section-nav-compact {
    background: rgba(248, 250, 252, 0.5);
    border-top: none;
}

@media (max-width: 640px) {
    .planung-control-panel--v1 .cp-v1__row__actions {
        width: 100%;
        margin-left: 0;
    }

    .planung-control-panel--v1 .cp-v1-params {
        grid-template-columns: 1fr;
        column-gap: 0;
    }
}

.planung-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.planung-section-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.planung-section-nav__link .material-icons {
    font-size: 15px;
    width: 15px;
    height: 15px;
}

.planung-section-nav__link:hover {
    color: var(--highlight);
    background: rgba(30, 185, 122, 0.08);
    border-color: rgba(30, 185, 122, 0.2);
}

.planung-section-nav__link.is-active {
    color: #0d7a52;
    background: rgba(30, 185, 122, 0.12);
    border-color: rgba(30, 185, 122, 0.3);
}

.planung-section-anchor {
    scroll-margin-top: 20px;
}

#page-planung.planung-sections-tabbed .planung-section-anchor:not(.is-planung-section-open) {
    display: none !important;
}

#page-planung.planung-sections-tabbed #planungSectionWirtschaft.is-planung-section-open {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#planungSectionWirtschaft {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (max-width: 640px) {
    .planung-section-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .planung-section-nav::-webkit-scrollbar {
        display: none;
    }
}

.planung-control-panel__variants-save {
    margin-left: auto;
    flex-shrink: 0;
}

/* Owner / preview: prominent variant tab switcher */
.planung-variant-switcher {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: opacity 0.2s ease;
}

.planung-variant-switcher.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.planung-variant-switcher__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.planung-variant-switcher__save {
    margin-left: auto;
    flex-shrink: 0;
    align-self: center;
}

.planung-variant-switcher__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--highlight-10);
    color: var(--highlight);
    font-size: 20px;
    flex-shrink: 0;
}

.planung-variant-switcher__title {
    margin: 0 0 2px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    line-height: 1.3;
}

.planung-variant-switcher__hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
}

.planung-variant-switcher__tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
}

.planung-control-panel .planung-variant-tab,
.planung-control-panel .variant-tab-wrap .planung-variant-tab {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    cursor: pointer;
    white-space: normal;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.planung-control-panel .planung-variant-tab::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: transparent;
    transition: background 0.2s ease;
}

.planung-control-panel .planung-variant-tab__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 20px;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.planung-control-panel .planung-variant-tab__icon.planung-variant-tab__rank {
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}

.planung-control-panel .planung-variant-tab__label {
    overflow: visible;
    text-overflow: clip;
    display: block;
    text-align: left;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
}

.planung-control-panel .planung-variant-tab:hover:not(.active) {
    background: #fafbfc;
    border-color: rgba(30, 185, 122, 0.28);
    color: #1e293b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

.planung-control-panel .planung-variant-tab:hover:not(.active) .planung-variant-tab__icon {
    background: rgba(30, 185, 122, 0.12);
    color: var(--highlight);
}

.planung-control-panel .planung-variant-tab.active {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 48%, #ecfdf5 100%);
    color: #14532d;
    border-color: rgba(30, 185, 122, 0.55);
    font-weight: 700;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 6px 20px rgba(30, 185, 122, 0.16);
    transform: none;
}

.planung-control-panel .planung-variant-tab.active::before {
    background: var(--highlight);
}

.planung-control-panel .planung-variant-tab.active .planung-variant-tab__icon {
    background: var(--highlight);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(30, 185, 122, 0.35);
}

.planung-control-panel .planung-variant-tab--best:not(.active) .planung-variant-tab__icon {
    background: rgba(30, 185, 122, 0.1);
    color: #059669;
}

.planung-control-panel .planung-variant-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 185, 122, 0.28);
}

.planung-control-panel .variant-tab-wrap {
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    overflow: hidden;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.planung-control-panel .variant-tab-wrap:has(.planung-variant-tab.active),
.planung-control-panel .variant-tab-wrap:has(.variant-tab.active) {
    border-color: rgba(30, 185, 122, 0.55);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 48%, #ecfdf5 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 6px 20px rgba(30, 185, 122, 0.14);
}

.planung-control-panel .variant-tab-wrap .planung-variant-tab,
.planung-control-panel .variant-tab-wrap .variant-tab {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 12px 10px 12px 14px;
    box-shadow: none;
    border-radius: 0;
}

.planung-control-panel .variant-tab-wrap .planung-variant-tab.active,
.planung-control-panel .variant-tab-wrap .variant-tab.active {
    border: none;
    background: transparent;
    box-shadow: none;
}

.planung-control-panel .variant-tab-wrap .variant-drag-handle {
    align-self: center;
    margin-left: 2px;
    opacity: 0.45;
}

.planung-control-panel .variant-tab-wrap:hover .variant-drag-handle {
    opacity: 0.85;
}

.planung-control-panel .variant-tab-wrap .rename-variant,
.planung-control-panel .variant-tab-wrap .delete-variant {
    align-self: center;
    margin-right: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.planung-control-panel .variant-tab-wrap:hover .rename-variant,
.planung-control-panel .variant-tab-wrap:hover .delete-variant {
    opacity: 0.65;
}

.planung-control-panel .variant-tab-wrap:hover .rename-variant:hover,
.planung-control-panel .variant-tab-wrap:hover .delete-variant:hover {
    opacity: 1;
}

/* V2 staff: compact variant chips (must follow default panel variant rules) */
.planung-control-panel.planung-control-panel--v2 .planung-variant-switcher__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    min-height: 0;
}

.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap {
    flex: 0 0 auto;
    max-width: min(200px, 38vw);
    border-radius: 8px;
    align-items: center;
    min-height: 0;
    height: auto;
}

.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap:has(.planung-variant-tab.active),
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap:has(.variant-tab.active) {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 2px 6px rgba(30, 185, 122, 0.1);
}

.planung-control-panel.planung-control-panel--v2 .planung-variant-tab,
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .planung-variant-tab,
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .variant-tab {
    gap: 5px;
    padding: 4px 8px 4px 5px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    min-height: 0;
    white-space: nowrap;
    flex: 0 1 auto;
}

.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .planung-variant-tab,
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .variant-tab {
    padding: 3px 6px 3px 2px;
    border: none;
    background: transparent;
    box-shadow: none;
}

.planung-control-panel.planung-control-panel--v2 .planung-variant-tab::before {
    top: 4px;
    bottom: 4px;
    width: 2px;
}

.planung-control-panel.planung-control-panel--v2 .planung-variant-tab__icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    font-size: 14px;
}

.planung-control-panel.planung-control-panel--v2 .planung-variant-tab__icon.planung-variant-tab__rank {
    font-size: 10px;
    font-weight: 800;
}

.planung-control-panel.planung-control-panel--v2 .planung-variant-tab__label {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.planung-control-panel.planung-control-panel--v2 .planung-variant-tab:hover:not(.active) {
    transform: none;
    box-shadow: none;
}

.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .variant-drag-handle,
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .rename-variant,
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .delete-variant {
    align-self: center;
    padding: 0;
    margin: 0 1px;
    line-height: 1;
}

.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .variant-drag-handle .material-icons,
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .rename-variant .material-icons,
.planung-control-panel.planung-control-panel--v2 .variant-tab-wrap .delete-variant .material-icons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

/* V1 staff: numbered variant pills in white boxes */
.planung-control-panel.planung-control-panel--v1 .planung-variant-switcher__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 0;
}

.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0 4px 0 0;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    max-width: none;
    min-height: 50px;
    height: auto;
    box-sizing: border-box;
}

.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap:has(.active) {
    background: rgba(30, 185, 122, 0.06);
    border: 1px solid rgba(30, 185, 122, 0.22);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap .cp-v1-variant-btn,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap .variant-tab {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 8px 8px 8px 12px;
    height: auto;
    min-height: 50px;
    flex: 1 1 auto;
    max-width: none;
    white-space: normal;
    text-align: left;
}

.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap .cp-v1-variant-btn.active,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap .variant-tab.active {
    background: transparent;
    color: #166534;
}

.planung-control-panel.planung-control-panel--v1 .planung-variant-tab,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-btn.planung-variant-tab {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    max-width: none;
    gap: 8px;
    padding: 8px 16px;
    min-height: 50px;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
    text-align: left;
}

.planung-control-panel.planung-control-panel--v1 .planung-variant-tab.active,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-btn.planung-variant-tab.active {
    background: rgba(30, 185, 122, 0.06);
    color: #166534;
    border: 1px solid rgba(30, 185, 122, 0.22);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    font-weight: 600;
    transform: none;
}

.planung-control-panel.planung-control-panel--v1 .planung-variant-tab.active::before {
    display: none;
}

.planung-control-panel.planung-control-panel--v1 .planung-variant-tab::before {
    display: none;
}

.planung-control-panel.planung-control-panel--v1 .planung-variant-tab__icon,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-btn__num {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 800;
    color: inherit;
}

.planung-control-panel.planung-control-panel--v1 .planung-variant-tab.active .planung-variant-tab__icon,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-btn.active .cp-v1-variant-btn__num {
    background: rgba(30, 185, 122, 0.12);
    color: #166534;
    box-shadow: none;
}

.planung-control-panel.planung-control-panel--v1 .planung-variant-tab__label,
.planung-control-panel.planung-control-panel--v1 .variant-tab__label {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap .variant-drag-handle,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap .rename-variant,
.planung-control-panel.planung-control-panel--v1 .cp-v1-variant-wrap .delete-variant {
    align-self: center;
    padding: 0 2px;
    margin: 0;
}

/* Legacy standalone switcher (if used elsewhere) */
.planung-variant-switcher .planung-variant-tab {
    flex: 1 1 0;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.planung-variant-switcher .planung-variant-tab__icon {
    font-size: 18px;
    color: #94a3b8;
    flex-shrink: 0;
}

.planung-variant-switcher .planung-variant-tab__icon.planung-variant-tab__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.planung-variant-switcher .planung-variant-tab__label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
}

.planung-variant-switcher .planung-variant-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.65);
    color: var(--highlight);
}

.planung-variant-switcher .planung-variant-tab:hover:not(.active) .planung-variant-tab__icon {
    color: var(--highlight);
}

.planung-variant-switcher .planung-variant-tab.active {
    background: #ffffff;
    color: var(--highlight);
    border-color: var(--highlight);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(30, 185, 122, 0.18);
}

.planung-variant-switcher .planung-variant-tab.active .planung-variant-tab__icon {
    color: var(--highlight);
}

.planung-variant-switcher .planung-variant-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--highlight-20);
}

@media (max-width: 640px) {
    .planung-control-panel .planung-variant-switcher__tabs,
    .planung-variant-switcher__tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        gap: 10px;
    }

    .planung-control-panel .planung-variant-switcher__tabs::-webkit-scrollbar,
    .planung-variant-switcher__tabs::-webkit-scrollbar {
        display: none;
    }

    .planung-control-panel .planung-variant-tab,
    .planung-control-panel .variant-tab-wrap {
        flex: 0 0 min(78vw, 260px);
        min-width: min(78vw, 260px);
    }
}

.btn-planung-edit {
    margin-left: auto;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid rgba(30, 185, 122, 0.35);
    color: var(--brand-green);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    line-height: 1.25;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
    box-shadow: 0 1px 2px rgba(36, 73, 65, 0.06);
}

.btn-planung-edit .material-icons {
    font-size: 16px;
    color: var(--highlight);
}

.btn-planung-edit:hover {
    background: var(--highlight-10);
    border-color: var(--highlight);
    box-shadow: 0 2px 6px rgba(30, 185, 122, 0.14);
}

.btn-planung-edit:focus-visible {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px var(--highlight-20), 0 1px 2px rgba(36, 73, 65, 0.06);
}

.btn-planung-edit:active {
    background: var(--highlight-20);
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(36, 73, 65, 0.06);
}

.btn-planung-edit:disabled,
.btn-planung-edit[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f1f5f9;
    box-shadow: none;
    transform: none;
}

.btn-planung-edit:disabled:hover,
.btn-planung-edit[aria-disabled="true"]:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    box-shadow: none;
}

.btn-planung-edit:disabled .material-icons,
.btn-planung-edit[aria-disabled="true"] .material-icons {
    color: #94a3b8;
}

.planung-inputs-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.planung-inputs-bar--embedded {
    margin-top: 0;
    padding: 14px 16px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 55%, #eef2f7 100%);
    border: 1px solid rgba(30, 185, 122, 0.12);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.planung-inputs-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.planung-inputs-row--primary .btn-planung-edit {
    margin-left: 0;
}

.planung-inputs-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.planung-param-pill {
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
}

.planung-param-pill .material-icons {
    font-size: 16px;
    color: #64748b;
}

.planung-param-pill.is-planned {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.planung-param-pill.is-planned .material-icons {
    color: #16a34a;
}

.planung-param-pill.is-unplanned {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
}

.planung-param-pill.is-unplanned .material-icons {
    color: #cbd5e1;
}

.planung-param-pill.supply-vollversorgung {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.planung-param-pill.supply-vollversorgung .material-icons {
    color: #3b82f6;
}

.planung-param-pill.supply-ggv {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.planung-param-pill.supply-ggv .material-icons {
    color: #16a34a;
}

.planung-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.planung-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.planung-title {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

.planung-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.planung-kpi-grid,
.planung-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.planung-kpi-card,
.planung-hero-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.planung-hero-card {
    min-height: 148px;
}

.planung-kpi-card:hover,
.planung-hero-card:hover {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.planung-kpi-card__accent {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
    background: linear-gradient(
        90deg,
        rgba(36, 73, 65, 0.12) 0%,
        rgba(30, 185, 122, 0.22) 50%,
        rgba(36, 73, 65, 0.12) 100%
    );
}

.planung-kpi-card__body {
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    background: #ffffff;
}

.planung-kpi-card__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.planung-kpi-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: transparent;
    border: none;
    color: #94a3b8;
    white-space: nowrap;
}

.planung-kpi-card__label,
.planung-hero-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.3;
}

.planung-kpi-card__value,
.planung-hero-value {
    margin: 6px 0 4px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: var(--text-dark, #0f172a);
}

.planung-kpi-card__value {
    margin: 0;
    font-size: 38px;
    line-height: 1;
    flex-shrink: 0;
}

.planung-hero-value.success,
.planung-hero-value.info {
    color: var(--text-dark, #0f172a);
}

.planung-kpi-card__sub,
.planung-hero-sub {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.4;
}

.planung-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.planung-header + .planung-details-grid {
    margin-top: -20px;
}

.planung-kpi-grid + .planung-details-grid {
    margin-top: -20px;
}

.planung-netto-disclaimer {
    margin: 0;
    padding-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.planung-details-col {
    display: flex;
    flex-direction: column;
}

.planung-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-dark);
}

.planung-section-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.planung-section-card__accent {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
    background: linear-gradient(
        90deg,
        rgba(36, 73, 65, 0.12) 0%,
        rgba(30, 185, 122, 0.22) 50%,
        rgba(36, 73, 65, 0.12) 100%
    );
}

.planung-section-card__inner {
    padding: 20px 24px 24px;
}

.planung-section-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.planung-section-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.planung-section-card__body {
    min-width: 0;
}

.planung-scenarios-section {
    min-width: 0;
}

.planung-scenarios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .planung-scenarios-grid {
        grid-template-columns: 1fr;
    }
}

.planung-data-list {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex: 1;
}

.planung-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.planung-data-row.total {
    border-bottom: none;
    margin-top: 4px;
}

.planung-data-label {
    font-size: 14px;
    color: var(--text-muted);
}

.planung-data-row.total .planung-data-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 16px;
}

.planung-data-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.planung-data-row.total .planung-data-value {
    font-weight: 700;
    font-size: 16px;
}

.planung-data-value.success {
    color: var(--accent-success);
}

/* Composition breakdown cards (Kapitalbedarf / Erlöse / Kosten) */
.comp-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    border: 1px solid var(--border-subtle, #e5e7eb);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.comp-card:hover {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.comp-card-accent {
    height: 4px;
    width: 100%;
    background: linear-gradient(
        90deg,
        rgba(36, 73, 65, 0.12) 0%,
        rgba(30, 185, 122, 0.22) 50%,
        rgba(36, 73, 65, 0.12) 100%
    );
}

.comp-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.comp-card-body::after {
    content: '';
    flex: 1 1 auto;
    min-height: 0;
}

.comp-card.is-collapsed .comp-card-body::after {
    display: none;
}

.comp-card-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 12px 0 0;
    padding: 10px 0 0;
    border: none;
    border-top: 1px solid #f3f4f6;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.comp-card-toggle:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 2px;
    border-radius: 8px;
}

.comp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.comp-card-expand-hint-text {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    transition: color 0.15s ease;
}

.comp-card-top-main {
    flex: 1;
    min-width: 0;
}

.comp-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.comp-card-toggle-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.comp-card.is-expanded .comp-card-toggle-icon {
    transform: rotate(180deg);
    background: rgba(30, 185, 122, 0.12);
    color: var(--highlight);
}

.comp-card--collapsible.is-collapsed:hover .comp-card-expand-hint-text,
.comp-card--collapsible.is-collapsed:hover .comp-card-toggle-icon {
    color: var(--highlight);
}

.comp-card--collapsible.is-collapsed:hover .comp-card-toggle-icon {
    background: rgba(30, 185, 122, 0.1);
}

.comp-card-details {
    margin-top: 14px;
}

.comp-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 6px 0;
}

.comp-card-total {
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.comp-card-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.comp-strip {
    display: flex;
    gap: 3px;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0;
    background: #f3f4f6;
}

.comp-strip-seg {
    height: 100%;
    border-radius: 999px;
    min-width: 4px;
    transition: opacity 0.15s ease;
}

.comp-card:hover .comp-strip-seg {
    opacity: 0.85;
}

.comp-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.comp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.comp-row:hover {
    border-color: rgba(0, 0, 0, 0.06);
}

.comp-row--info {
    cursor: pointer;
}

.comp-row--info:hover {
    border-color: rgba(30, 185, 122, 0.22);
}

.comp-row--info:focus-visible {
    outline: 2px solid rgba(30, 185, 122, 0.45);
    outline-offset: 2px;
}

.comp-row--info:hover .comp-row-info {
    color: #1a5560;
    background: rgba(26, 85, 96, 0.08);
}

.comp-row-left {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    overflow: hidden;
}

.comp-row-fill {
    position: absolute;
    inset: 0;
    width: var(--pct, 0%);
    max-width: 100%;
    opacity: 0.16;
    border-radius: 10px;
    pointer-events: none;
}

.comp-row-dot {
    position: relative;
    z-index: 1;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comp-row-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
}

.comp-row-name {
    font-size: 13px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comp-row-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.comp-row-info .material-icons {
    font-size: 15px;
    line-height: 1;
}

.comp-row-info:hover,
.comp-row-info:focus-visible {
    color: #1a5560;
    background: rgba(26, 85, 96, 0.08);
    outline: none;
}

.comp-info-popup {
    backdrop-filter: blur(2px);
    background: rgba(15, 23, 42, 0.38);
    z-index: 1200;
    animation: compInfoFadeIn 0.18s ease;
}

.comp-info-popup.is-open .comp-info-popup__panel {
    animation: compInfoPanelIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.comp-info-popup__panel {
    position: relative;
    max-width: 420px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.comp-info-popup__accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: #64748b;
}

.comp-info-popup__accent--external {
    background: linear-gradient(180deg, #64748b 0%, #94a3b8 100%);
}

.comp-info-popup__accent--panely {
    background: linear-gradient(180deg, #1eb97a 0%, #0e7490 100%);
}

.comp-info-popup__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 0 24px;
}

.comp-info-popup__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-top: 4px;
}

.comp-info-popup__category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
}

.comp-info-popup__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    background: #f1f5f9;
}

.comp-info-popup__badge--panely {
    color: #0f766e;
    background: rgba(30, 185, 122, 0.14);
}

.comp-info-popup__body {
    padding: 8px 28px 8px 28px;
}

.comp-info-popup__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(30, 185, 122, 0.12), rgba(14, 116, 144, 0.1));
    color: #0e7490;
}

.comp-info-popup__icon .material-icons {
    font-size: 22px;
}

.comp-info-popup__title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
    line-height: 1.25;
}

.comp-info-popup__summary {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    color: #1f2937;
}

.comp-info-popup__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #4b5563;
}

.comp-info-popup__actions {
    display: flex;
    justify-content: flex-end;
    padding: 8px 24px 24px;
}

.comp-info-popup__actions .btn {
    min-width: 120px;
}

@keyframes compInfoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes compInfoPanelIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .comp-info-popup__panel {
        max-width: 100%;
    }

    .comp-info-popup__body {
        padding-left: 22px;
        padding-right: 22px;
    }
}

.comp-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.comp-row-pct {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}

.comp-row-val {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-dark);
    min-width: 72px;
    text-align: right;
}

.comp-row-val.is-credit {
    color: var(--highlight);
}

.comp-row--external .comp-row-name {
    color: #64748b;
}

.comp-row--external .comp-row-val {
    color: #64748b;
    font-weight: 600;
}

.comp-row--external .comp-row-fill {
    opacity: 0.12;
}

.comp-row--external .comp-row-info {
    color: #cbd5e1;
}

.comp-row--credit .comp-row-left {
    border: 1px dashed rgba(30, 185, 122, 0.35);
    background: rgba(30, 185, 122, 0.04);
}

.comp-row--credit .comp-row-fill {
    opacity: 0.1;
}

.comp-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light, #9ca3af);
    margin: 2px 2px 0;
}

.comp-group-label--panely {
    color: var(--highlight);
}

.comp-group-divider {
    height: 1px;
    background: #eef0f2;
    margin: 4px 0;
}

.comp-footnote {
    margin: 10px 2px 0;
    padding-top: 8px;
    border-top: 1px solid #eef2f7;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: #64748b;
}

.planung-external-mark {
    font-size: 0.7em;
    margin-left: 2px;
    color: var(--text-muted);
}

.planung-chart-section {
    min-width: 0;
}

.planung-chart-section .planung-section-card__inner {
    padding-bottom: 55px;
}

.planung-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.planung-chart-header .planung-section-title,
.planung-section-card__header .planung-section-title {
    margin: 0;
}

.planung-cf-legend {
    display: flex;
    align-items: center;
    gap: 16px;
}

.planung-cf-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.planung-cf-legend-item::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.planung-cf-legend-item.is-negative::before {
    background: rgba(248, 113, 113, 0.55);
}

.planung-cf-legend-item.is-positive::before {
    background: rgba(30, 185, 122, 0.55);
}

.planung-chart-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.planung-cf-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: none;
}

.planung-cf-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.planung-cf-stat {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--fill-secondary, #f8fafc);
    border: 1px solid transparent;
}

.planung-cf-stat.is-highlight {
    background: linear-gradient(135deg, rgba(30, 185, 122, 0.08), rgba(30, 185, 122, 0.02));
    border-color: rgba(30, 185, 122, 0.2);
}

.planung-cf-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.planung-cf-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.planung-cf-stat-value.success {
    color: var(--accent-success, #1eb97a);
}

.planung-cf-chart-wrap {
    position: relative;
    height: 260px;
}

.planung-cf-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.planung-cf-ruler {
    padding-top: 4px;
}

.planung-cf-ruler-track {
    position: relative;
    height: 6px;
    border-radius: 999px;
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.25) 0%, rgba(248, 113, 113, 0.08) 35%, rgba(30, 185, 122, 0.08) 65%, rgba(30, 185, 122, 0.25) 100%);
    overflow: visible;
}

.planung-cf-ruler-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #f87171, #1eb97a);
    opacity: 0.85;
    transition: width 0.6s ease;
}

.planung-cf-ruler-marker {
    position: absolute;
    top: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 0;
    margin-bottom: 0;
    z-index: 1;
}

.planung-cf-ruler-marker-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #1eb97a;
    box-shadow: 0 2px 8px rgba(30, 185, 122, 0.35);
    transform: translateY(-50%);
    flex-shrink: 0;
}

.planung-cf-ruler-marker-label {
    font-size: 11px;
    font-weight: 600;
    color: #0f766e;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(30, 185, 122, 0.1);
    margin-top: 10px;
    margin-bottom: 0;
}

.planung-cf-ruler-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .planung-section-card__inner {
        padding: 16px 18px 20px;
    }

    .planung-section-card__header {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .planung-kpi-grid,
    .planung-hero-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .planung-kpi-card__value {
        font-size: 32px;
    }
    .planung-details-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .planung-energiebilanz-grid {
        grid-template-columns: 1fr;
    }
    .planung-cf-stats {
        grid-template-columns: 1fr;
    }
    .planung-cf-stat-value {
        font-size: 18px;
    }
}

/* Energiebilanz */
.planung-energiebilanz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.energiebilanz-progress-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-soft, #f3f4f6);
    overflow: hidden;
    margin-top: 8px;
}

.energiebilanz-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--highlight, #1EB97A);
    position: relative;
    overflow: hidden;
}

.comp-strip-seg.planung-bar-animate,
.energiebilanz-progress-fill.planung-bar-animate,
.comp-row-fill.planung-bar-animate {
    transition: width 0.95s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.planung-section-animating .planung-kpi-card {
    animation: planungKpiReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.planung-section-animating .planung-kpi-card:nth-child(2) {
    animation-delay: 0.08s;
}

.planung-section-animating .planung-kpi-card:nth-child(3) {
    animation-delay: 0.16s;
}

@keyframes planungKpiReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .comp-strip-seg.planung-bar-animate,
    .energiebilanz-progress-fill.planung-bar-animate,
    .comp-row-fill.planung-bar-animate,
    .planung-section-animating .planung-kpi-card {
        transition: none;
        animation: none;
    }
}

.energiebilanz-progress-fill.grey {
    background: #9ca3af;
}

.energiebilanz-indent {
    padding-left: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.energiebilanz-divider {
    border: none;
    border-top: 1px solid var(--border-subtle, #e5e7eb);
    margin: 12px 0;
}
