/* Theme-Variablen sind in css/themes.css definiert */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background: #0f172a;
    min-height: 100vh;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--primary-text);
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
    }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--secondary-color);
}

.content {
    padding-top: 1.1rem;
    background-image:
        linear-gradient(to bottom, transparent 0%, transparent 70%, rgba(176, 224, 182, 0.3) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(176, 224, 182, 0.06) 40px,
            rgba(176, 224, 182, 0.06) 80px
        );
    background-color: #ffffff;
    min-height: calc(100vh - 15vh - 40vh);
    padding-bottom: 2rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ===== GEMEINSAME KOMPONENTEN ===== */

/* Card Styles */
.card {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 6px 6px rgba(0, 0, 0, 0.23) !important;
}

[data-theme="light"] .hero-section,
[data-theme="light"] .section-card,
[data-theme="light"] .service-section,
[data-theme="light"] .intro-section {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--bg-lighter) 0%, var(--secondary-light) 100%);
    border-radius: 10px;
    padding: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.page-title {
    color: var(--primary-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

/* Info Card */
.info-card {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    box-shadow: 0 4px 12px var(--primary-transparent-20);
}

.info-card-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.info-card-content {
    flex: 1;
}

.info-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1.5em;
    font-weight: 600;
    color: white;
    border: none;
    padding: 0;
}

.info-card p {
    margin: 0;
    line-height: 1.7;
    font-size: 1.05em;
    opacity: 0.95;
}

/* Success Card */
.success-card {
    background: var(--primary-color);
    color: white;
    padding: 3rem;
    border-radius: 10px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    box-shadow: 0 8px 20px var(--primary-transparent-30);
    animation: slideIn 0.5s ease-out;
}

.success-card-icon {
    font-size: 3.5em;
    flex-shrink: 0;
    animation: bounceIn 0.8s ease-out;
}

.success-card-content {
    flex: 1;
}

.success-card h4 {
    margin: 0 0 1.5rem 0;
    font-size: 2em;
    font-weight: 700;
    color: white;
    border: none;
    padding: 0;
}

.success-card p {
    margin: 0;
    line-height: 1.8;
    font-size: 1.15em;
    opacity: 0.95;
}

/* Alert Styles */
.alert-success {
    background-color: var(--primary-transparent-15);
    border-left: 4px solid var(--primary-color);
    color: var(--primary-dark);
    padding: 0.8rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.15);
    border-left: 4px solid #dc3545;
    color: #dc3545;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Warnung neben .alert-error: gleiche Form, aber kein Fehler — die Anzeige stimmt,
   nur der gespeicherte Stand hinkt hinterher (B-93). Farben aus den S01-Tokens,
   damit Hell und Dunkel mitlaufen. */
.alert-warning {
    background-color: var(--miss-soft);
    border-left: 4px solid var(--miss);
    color: var(--miss);
    padding: 0.8rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
}

/* Form Styles */
.form-section {
    background-color: var(--bg-white);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

    .form-section:hover {
        box-shadow: 0 4px 12px var(--primary-transparent-15);
    }

    .form-section h4 {
        margin-top: 0;
        margin-bottom: 1rem;
        color: var(--primary-heading);
        font-size: 1.3rem;
        font-weight: 600;
        border-bottom: 2px solid var(--primary-light);
        padding-bottom: 0.5rem;
    }

    .form-section h5 {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
        color: var(--primary-dark);
        font-size: 1.1em;
        font-weight: 600;
        padding-left: 0.75rem;
        border-left: 3px solid var(--secondary-color);
    }

    .form-section.collapsed {
        padding: 1rem 1.5rem;
    }

.form-group {
    margin-bottom: 1.2rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--text-dark);
    }

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--bg-light);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-white);
    color: #e5e7eb;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem var(--primary-transparent-15);
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    .form-control:not(:focus) {
        color: #e5e7eb;
    }

    .form-control:hover {
        border-color: var(--primary-light);
    }

input.form-control:not(:focus) {
    color: #e5e7eb;
}

select.form-control:not(:focus) {
    color: #e5e7eb;
}

/* Accordion Styles */
.accordion-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 1rem -0.5rem;
    border-radius: 4px;
}

    .accordion-header:hover {
        background-color: var(--primary-transparent-10);
    }

.accordion-icon {
    display: inline-block;
    margin-right: 0.75rem;
    font-size: 0.9em;
    transition: transform 0.3s ease;
    color: var(--primary-text);
    font-weight: bold;
}

.accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Button Styles */
.btn-submit {
    background: var(--primary-color);
    color: #0f172a;
    padding: 1rem 2.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--primary-transparent-20);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px var(--primary-transparent-30);
        background: var(--primary-dark);
    }

    .btn-submit:active:not(:disabled) {
        border: 2px solid transparent;
        transform: translateY(0);
    }

    .btn-submit:disabled {
        background: var(--text-light);
        cursor: not-allowed;
        transform: none;
        opacity: 0.6;
    }

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--secondary-light);
    color: var(--text-dark);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

    .back-button:hover {
        background-color: var(--primary-dark);
        color: white;
        transform: translateX(-5px);
        box-shadow: 0 5px 15px var(--primary-transparent-10);
    }

/* Action Button */
.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--secondary-light);
    color: var(--text-dark);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

    .action-button:hover {
        background-color: var(--primary-dark);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px var(--primary-transparent-10);
    }

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.slide-in-up {
    transform: translateY(50px);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== MOBILE OPTIMIERUNGEN ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1.5rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .form-section {
        padding: 1rem;
    }

        .form-section h4 {
            font-size: 1.1rem;
        }

        .form-section h5 {
            font-size: 1rem;
        }

    .info-card,
    .success-card {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }

    .info-card-icon,
    .success-card-icon {
        font-size: 2em;
    }

    .btn-submit,
    .action-button {
        width: 100%;
        justify-content: center;
    }

    .back-button {
        width: 100%;
        justify-content: center;
    }
}

/* Tablet Optimierungen */
@media (min-width: 769px) and (max-width: 1024px) {
    .page-title {
        font-size: 2.2rem;
    }

    .form-section h4 {
        font-size: 1.5rem;
    }
}

/* ===== BLAZOR ERROR UI ===== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ===== LOADING INDICATOR ===== */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--primary-color);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* ===== MISC ===== */
code {
    color: #c02d76;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Readable Container */
.readable-container {
    max-width: 1600px;
    margin: 2rem auto;
    margin-left: 2rem;
    margin-right: 2rem;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--card-border);
    min-height: 50vh;
    color: var(--text-dark);
}

.readable-container h1,
.readable-container h2,
.readable-container h3 {
    color: var(--primary-heading);
}

.readable-container p {
    color: var(--text-dark);
}

/* Analysis Page Specific Styles */
.analysis-header {
    text-align: center;
    margin-bottom: 2rem;
}

.analysis-header h1 {
    color: var(--primary-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.analysis-header p {
    color: var(--text-dark);
    font-size: 1.2rem;
    opacity: 0.8;
}

.progress-section {
    margin-bottom: 2.5rem;
    text-align: center;
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 2.5rem;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.progress-section.scrolled {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.progress-section.bonus-active {
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.5);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    border: 2px solid var(--card-border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
    border-radius: 10px;
    box-shadow: 0 0 10px var(--primary-transparent-50);
}

.progress-text {
    color: var(--primary-text);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Cost Progress Bar Styles */
.cost-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cost-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

.bonus-label {
    color: #ffd700;
    font-weight: 700;
    font-size: 1.1rem;
    animation: sparkle 1s ease-in-out infinite alternate;
}

@keyframes sparkle {
    from { opacity: 0.8; }
    to { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
}

.cost-amount {
    font-size: 1rem;
    color: var(--text-secondary);
}

.original-price {
    color: #ef4444;
    text-decoration: line-through;
}

.discounted-price {
    color: #22c55e;
    font-size: 1.2rem;
}

.cost-hint {
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
}

.continuous-progress-bar-track {
    width: 100%;
    height: 18px;
    background: rgba(255,255,255,0.08);
    border-radius: 9px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.continuous-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22d3ee);
    border-radius: 9px;
    transition: width 0.4s ease;
    min-width: 0%;
}

.progress-category-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.cost-amount-right {
    font-size: 0.9rem;
    color: #4ade80;
    font-weight: 600;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Analysis Tabs */
.analysis-tabs {
    margin-bottom: 2rem;
}

.analysis-tab-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--card-border);
    margin-bottom: 0;
    flex-wrap: wrap;
    align-items: flex-end;
}

.analysis-tab-nav .tab-group-label {
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 0.5rem 0.75rem 0.25rem;
    white-space: nowrap;
    align-self: center;
}

.analysis-tab-nav .tab-group-divider-label {
    flex-basis: 100%;
    border-left: none;
    margin-left: 0;
    padding-left: 0;
    margin-top: 0.25rem;
}

.analysis-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.1rem;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
}

.analysis-tab-btn:hover {
    background: var(--primary-transparent-10);
    color: var(--primary-text);
}

.analysis-tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-text);
    border-color: var(--card-border);
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.analysis-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-bg);
}

.analysis-tab-btn.tab-completed {
    color: var(--primary-color);
}

.analysis-tab-btn.tab-completed-required {
    color: #667eea;
}

.tab-label {
    display: inline;
}

.tab-check {
    font-size: 0.75rem;
    color: var(--primary-color);
}

.tab-check.required {
    color: #667eea;
}

.analysis-tab-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    background: transparent;
}

.tab-panel {
    animation: tabFadeIn 0.25s ease;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--card-border);
    background: var(--card-header-bg);
}

.tab-panel-header h3 {
    margin: 0;
    color: var(--primary-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

.tab-panel-header p {
    margin: 0.2rem 0 0;
    color: var(--text-dark);
    opacity: 0.7;
    font-size: 0.9rem;
}

.tab-panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tab-panel-icon.general { background: linear-gradient(135deg, #667eea, #764ba2); }
.tab-panel-icon.roof { background: linear-gradient(135deg, #f093fb, #f5576c); }
.tab-panel-icon.walls { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.tab-panel-icon.windows { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.tab-panel-icon.heating { background: linear-gradient(135deg, #fa709a, #fee140); }
.tab-panel-icon.basement { background: linear-gradient(135deg, #30cfd0, #330867); }
.tab-panel-icon.zones { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

.tab-panel-body {
    padding: 1.5rem;
}

.tab-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--card-border);
    background: var(--card-header-bg);
    border-radius: 0 0 14px 14px;
}

@media (max-width: 768px) {
    .analysis-tab-nav {
        gap: 0.15rem;
    }

    .analysis-tab-btn {
        padding: 0.6rem 0.7rem;
        font-size: 0.8rem;
    }

    .tab-label {
        display: none;
    }

    .analysis-tab-btn {
        font-size: 1.1rem;
        justify-content: center;
        flex: 1;
    }

    .tab-panel-body {
        padding: 1rem;
    }

    .tab-panel-footer {
        padding: 0.75rem 1rem;
    }
}

.analysis-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    border: 2px solid var(--card-border);
    overflow: hidden;
}

.analysis-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.analysis-card.completed {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px var(--primary-transparent-30);
    background: var(--card-bg-completed);
}

.analysis-card.required-complete {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.analysis-card.required-complete:hover {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-header-bg);
    border-bottom: 2px solid var(--card-border);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-icon.general { background: linear-gradient(135deg, #667eea, #764ba2); }
.card-icon.roof { background: linear-gradient(135deg, #f093fb, #f5576c); }
.card-icon.walls { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.card-icon.windows { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.card-icon.heating { background: linear-gradient(135deg, #fa709a, #fee140); }
.card-icon.basement { background: linear-gradient(135deg, #30cfd0, #330867); }

.card-title-section {
    flex: 1;
}

.card-title-section h3 {
    margin: 0;
    color: var(--primary-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.card-title-section p {
    margin: 0.3rem 0 0 0;
    color: var(--text-dark);
    opacity: 0.7;
    font-size: 0.95rem;
}

.completion-badge {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px var(--secondary-transparent-40);
}

.completion-badge.required-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.required-card-hint {
    display: block;
    margin-top: 0.25rem;
    color: #a78bfa;
    font-size: 0.78rem;
    font-style: italic;
}

.card-body {
    padding: 1.5rem;
    background-color: var(--card-body-bg);
}

.subsection-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-text);
    font-weight: 600;
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--card-border);
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.input-group small {
    display: block;
    color: var(--text-medium);
    opacity: 0.7;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    font-style: italic;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--card-border);
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-transparent-20);
    background-color: var(--bg-lighter);
}

.form-input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background-color: var(--primary-transparent-10);
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    background-color: var(--primary-transparent-10);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-top: 1rem;
}

.info-box i {
    color: var(--primary-heading);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.action-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.btn-primary, .btn-secondary, .btn-success {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-dark));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-transparent-40);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background-color: var(--border-color);
    color: var(--primary-text);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-dark));
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--secondary-transparent-40);
}

.btn-primary:disabled, .btn-success:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: var(--bg-white);
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .action-section {
        flex-direction: column;
        padding: 1.5rem;
    }

    .btn-primary, .btn-secondary, .btn-success {
        width: 100%;
        justify-content: center;
    }

    .tab-panel-header {
        padding: 1rem;
    }

    .tab-panel-header h3 {
        font-size: 1.1rem;
    }
}

/* Buildings Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.buildings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.building-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px solid var(--card-border);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.building-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px var(--primary-transparent-20);
    transform: translateY(-2px);
}

.building-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--card-border);
}

.building-card-header h3 {
    color: var(--primary-heading);
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.building-date {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.building-updated {
    color: var(--text-medium);
    font-size: 0.75rem;
    font-style: italic;
}

.building-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.info-item i {
    color: var(--primary-heading);
    font-size: 1.1rem;
}

.info-item strong {
    color: var(--primary-text);
    font-weight: 600;
}

.building-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.btn-danger {
    padding: 0.6rem 1.2rem;
    background-color: rgba(220, 53, 69, 0.2);
    color: #ef4444;
    border: 2px solid #ef4444;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background-color: #ef4444;
    color: white;
    transform: translateY(-2px);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    /* Inhaltsreiche Dialoge (Kauf-/PDF-Bestätigung mit Prüfwahl, Token-Split und
       Rechtshinweisen) wurden höher als der Viewport. Ohne Scroll-Möglichkeit
       schnitt das zentrierte Flex-Layout oben und unten ab — die Aktions-Buttons
       im Footer waren nicht mehr erreichbar. */
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

/* Override Bootstrap's .modal (display:none, position:fixed, width:100%, height:100%).
   Einheitliches, helles, eckiges Design (passend zu den neuen Gebäude-Seiten),
   themen-unabhängig gut lesbar. */
.modal {
    display: block;
    position: static;
    top: auto;
    left: auto;
    width: 90%;
    height: auto;
    max-width: 640px;
    /* `margin:auto` zentriert den Dialog im scrollbaren Overlay, solange er
       hineinpasst; wird er höher, scrollt er in sich selbst (Kopf und Footer
       inklusive), statt aus dem Viewport zu wachsen. */
    margin: auto;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    z-index: auto;
    background: #ffffff;
    color: #1f2937;
    border-radius: 2px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid #e2e8f0;
    outline: none;
}

.modal h3 {
    color: #1e4d2b;
    margin-bottom: 1rem;
}

.modal p,
.modal label,
.modal li {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* Inputs/Selects in Modals hell & lesbar */
.modal .form-input,
.modal input,
.modal select,
.modal textarea {
    background: #fff;
    color: #1f2937;
    border: 1px solid #cbd5e1;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.consent-checkbox-row {
    background: var(--primary-transparent-10);
    border: 1px solid var(--primary-transparent-20);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.checkbox-label-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: #1f2937;
    line-height: 1.5;
}

.checkbox-label-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

@media (max-width: 768px) {
    .buildings-grid {
        grid-template-columns: 1fr;
    }

    .building-info {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
}


/* ===== AUTH / ACCOUNT / PROFILE PAGES ===== */

.auth-container,
.account-container,
.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

.profile-container {
    align-items: flex-start;
}

.auth-card,
.account-card,
.profile-card {
    background-color: #0f172a;
    border-radius: 10px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-card h2,
.account-card h2,
.profile-card h2 {
    color: var(--primary-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

.btn-auth,
.btn-save {
    width: 100%;
    padding: 0.85rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.btn-auth:hover:not(:disabled),
.btn-save:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-auth:disabled,
.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 1.2rem;
    color: var(--text-dark);
}

.auth-switch a {
    color: var(--primary-text);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.btn-back-link {
    display: block;
    text-align: center;
    margin-top: 0.8rem;
}

.service-section,
.intro-section,
.impressum-section {
    background-color: var(--secondary-light);
    border-radius: 10px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.service-section:hover,
.intro-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-section h2,
.impressum-section h2 {
    color: var(--primary-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.impressum-section h2 {
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.service-section h3,
.impressum-section h3 {
    color: var(--text-dark);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.service-section h4 {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
}

.service-section p,
.intro-section p,
.impressum-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.impressum-section p strong {
    color: var(--primary-text);
    font-weight: 600;
}

.service-section ul {
    list-style: none;
    padding-left: 0;
}

.service-section ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.service-section ul li:before {
    content: "\25B8";
    color: var(--primary-text);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* WIP Notice */
.wip-notice {
    background-color: var(--primary-transparent-10);
    border-left: 4px solid var(--secondary-color);
    padding: 1.2rem;
    margin: 1.5rem 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wip-notice .wip-badge,
.wip-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.wip-notice p {
    margin: 0;
    font-style: italic;
    color: var(--text-medium);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background-color: var(--bg-lighter);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px var(--primary-transparent-10);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-heading);
    margin-bottom: 1rem;
    display: block;
}

.contact-card h4 {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* ===== HOME PAGE STYLES ===== */

.hero-section {
    background-color: var(--secondary-light);
    border-radius: 10px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.hero-section h1 {
    color: var(--primary-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.section-card {
    background-color: var(--secondary-light);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.section-card h2 {
    color: var(--primary-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.section-card h4 {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
}

.section-card p,
.section-card ul {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-card ul {
    list-style: none;
    padding-left: 0;
}

.section-card ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
}

.section-card ul li:before {
    content: "\25B8";
    color: var(--primary-text);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ===== AGB PAGE STYLES ===== */

.agb-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.agb-content {
    background-color: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.agb-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bg-light);
}

.agb-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.agb-section h2 {
    color: var(--primary-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light);
}

.agb-section p {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.agb-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.agb-section li {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.agb-section strong {
    color: var(--primary-dark);
    font-weight: 600;
}

@media (max-width: 768px) {
    .auth-container,
    .account-container,
    .profile-container {
        align-items: flex-start;
        padding: 1rem;
    }

    .auth-card,
    .account-card,
    .profile-card {
        padding: 1.5rem;
    }

    .service-section,
    .intro-section,
    .impressum-section {
        padding: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .agb-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .agb-content {
        padding: 2rem 1.5rem;
    }

    .agb-section h2 {
        font-size: 1.3rem;
    }

    .agb-section p,
    .agb-section li {
        font-size: 0.95rem;
        text-align: left;
    }
}

/* ===== Multi-Heating (BuildingHeating) Styles ===== */
.heizung-block {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.heizung-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.heizung-block-title {
    color: #4ade80;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-remove-heizung {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.btn-remove-heizung:hover {
    background: rgba(239, 68, 68, 0.15);
}

.btn-add-heizung {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px dashed #4ade80;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-add-heizung:hover {
    background: rgba(74, 222, 128, 0.2);
    border-style: solid;
}

/* Heating input info boxes */
.heating-info-box {
    background: #0f172a;
    border: 1px solid #4ade80;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.heating-info-box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f1f5f9;
    font-size: 0.9rem;
}

.heating-info-box-header i {
    color: #4ade80;
    font-size: 1.1rem;
}

.heating-modes-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.heating-mode-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.heating-mode-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.heating-mode-card strong {
    color: #f1f5f9;
    display: block;
    margin-bottom: 0.25rem;
}

.heating-mode-card p {
    color: #94a3b8;
    font-size: 0.83rem;
    margin: 0;
}

.optional-hint {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 400;
}

.gaube-card {
    border: 1px solid var(--card-border, #334155);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: var(--card-bg, #1e293b);
}

.zone-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.wall-sub-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wall-sub-tab {
    background: transparent;
    border: 1px solid var(--border-color, #334155);
    border-radius: 6px;
    color: var(--text-light, #94a3b8);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.wall-sub-tab:hover {
    border-color: var(--primary-color, #2D6A4F);
    color: var(--primary-text, #4ade80);
}

.wall-sub-tab.active {
    background: rgba(45, 106, 79, 0.2);
    border-color: var(--primary-color, #2D6A4F);
    color: var(--primary-text, #4ade80);
    font-weight: 600;
}

/* Heating badge on result cards */
.heating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.4);
    color: #fb923c;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* ===== CONTRACTOR LIST / ORGANIZATION STYLES ===== */

.contractors-header {
    margin-bottom: 1.5rem;
}

.contractors-header h1 {
    margin: 0 0 .25rem;
}

.contractors-header p {
    margin: 0;
    color: var(--muted-color, #6c757d);
}

.contractor-filter-bar {
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #dee2e6);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.contractor-filter-bar .filter-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.contractor-filter-bar .filter-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex: 1;
    min-width: 180px;
}

.contractor-filter-bar .filter-group label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-dark, #212529);
}

.contractor-filter-bar .filter-input-row {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.contractor-filter-bar .filter-input {
    padding: .45rem .75rem;
    border: 1px solid var(--card-border, #dee2e6);
    border-radius: 6px;
    background: var(--bg-primary, #fff);
    color: var(--text-dark, #212529);
    font-size: .9rem;
    width: 100%;
}

.contractor-filter-bar .filter-input:focus {
    outline: none;
    border-color: var(--primary-color, #3B82F6);
    box-shadow: 0 0 0 2px var(--primary-transparent-30, rgba(59, 130, 246, .3));
}

.contractor-filter-bar .search-info {
    margin-top: .75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .85rem;
    color: var(--muted-color, #6c757d);
}

.contractor-filter-bar .btn-link {
    background: none;
    border: none;
    color: var(--primary-color, #3B82F6);
    cursor: pointer;
    font-size: .85rem;
    text-decoration: underline;
    padding: 0;
}

.contractor-filter-bar .btn-link:hover {
    color: var(--primary-hover, #2563EB);
}

.contractor-map {
    height: 400px;
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--card-border, #dee2e6);
}

.result-count {
    font-size: .9rem;
    color: var(--muted-color, #6c757d);
    margin-bottom: 1rem;
}

.contractor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.org-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #dee2e6);
    border-radius: 10px;
    padding: 1.25rem;
    transition: box-shadow .2s, transform .15s;
}

.org-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}

.org-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
}

.org-card-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark, #212529);
}

.org-badges {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-shrink: 0;
}

.distance-badge {
    background: var(--primary-transparent-30, rgba(59, 130, 246, .15));
    color: var(--primary-color, #3B82F6);
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

.verified-badge {
    background: rgba(34, 197, 94, .15);
    color: #16a34a;
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

.org-owner {
    font-size: .85rem;
    color: var(--muted-color, #6c757d);
    display: block;
    margin-top: .25rem;
}

.org-description {
    margin: .5rem 0;
    color: var(--muted-color, #6c757d);
    font-size: .9rem;
    line-height: 1.45;
}

.org-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: .5rem 0;
    font-size: .85rem;
}

.org-meta a,
.org-meta span {
    color: white;
    text-decoration: none;
}

.org-meta a:hover {
    color: var(--primary-color, #3B82F6);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .5rem;
}

.service-tag {
    background: var(--secondary-light, #f0f4f8);
    color: var(--text-dark, #212529);
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 500;
    border: 1px solid var(--card-border, #dee2e6);
}

.contractor-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted-color, #6c757d);
}

.contractor-empty-state p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

@media (max-width: 640px) {
    .contractor-filter-bar .filter-row {
        flex-direction: column;
    }

    .contractor-grid {
        grid-template-columns: 1fr;
    }

    .contractor-map {
        height: 280px;
    }
}

/* === Map Pin Marker Styles === */

/* Project Selector above map */
.project-selector {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.project-selector-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-heading);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.project-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--card-border);
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.project-pill:hover {
    border-color: var(--primary-color);
    background: var(--primary-transparent-10);
    color: var(--primary-text);
}

.project-pill.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: rgba(30, 41, 59, 0.98);
    box-shadow: 0 2px 8px var(--primary-transparent-30);
}

.pill-title {
    font-weight: 600;
}

.pill-location {
    font-size: 0.8rem;
    opacity: 0.7;
}

.pill-category {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
}

.project-pill:not(.active) .pill-category {
    background: var(--primary-transparent-10);
    color: var(--primary-text);
}

.project-selector-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--primary-transparent-10);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--primary-text);
    border-left: 3px solid var(--primary-color);
}

@media (max-width: 768px) {
    .project-pills {
        flex-direction: column;
    }

    .project-pill {
        width: 100%;
        justify-content: center;
    }
}

/* === Map Pin Marker Styles === */
.numbered-pin-wrapper {
    background: transparent;
    border: none;
}

.map-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-pin-highlight {
    transform: rotate(-45deg) scale(1.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.map-pin .pin-number {
    transform: rotate(45deg);
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    line-height: 1;
    user-select: none;
}

.pin-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #EF4444;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.pin-number-badge.orange {
    background: #F97316;
}


/* ================================================================
   LANDING PAGE STYLES – Dark Theme
   Für öffentliche (nicht-authentifizierte) Seiten
   ================================================================ */

/* Landing Page Struktur */
.lp-hero { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); padding: 4rem 2rem; }
.lp-hero .logos-row { display: flex; gap: 4rem; align-items: center; justify-content: center; margin-bottom: 3rem; }
.lp-hero .logo-img { max-height: 180px; width: auto; filter: drop-shadow(0 0 30px rgba(176,224,182,0.2)); }
.lp-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; color: #e5e7eb; max-width: 800px; line-height: 1.2; margin-bottom: 1.5rem; }
.lp-hero .tagline { font-size: 1.25rem; color: #94a3b8; max-width: 600px; line-height: 1.7; margin-bottom: 2.5rem; }
.lp-hero .hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-bottom: 3rem; }
.lp-hero-bg { min-height: 80vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; position: relative; padding: 4rem 2rem; background-size: cover; background-position: center; }
.lp-hero-bg::before { content: ''; position: absolute; inset: 0; background: rgba(15,23,42,0.75); }
.lp-hero-bg > * { position: relative; z-index: 1; }
.lp-hero-bg h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; color: #e5e7eb; max-width: 800px; line-height: 1.2; margin-bottom: 1rem; }
.lp-hero-bg .tagline { font-size: 1.25rem; color: #cbd5e1; max-width: 600px; line-height: 1.7; margin-bottom: 2rem; }
.lp-hero-short { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); padding: 4rem 2rem; margin-bottom: 2rem; }
.lp-hero-short h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; color: #e5e7eb; max-width: 700px; line-height: 1.2; margin-bottom: 1rem; }
.lp-hero-short .tagline { font-size: 1.1rem; color: #94a3b8; max-width: 500px; line-height: 1.7; margin-bottom: 2rem; }

.scroll-teaser { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: #94a3b8; font-size: 0.9rem; animation: lp-bounce 2s infinite; position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); cursor: pointer; }
.scroll-teaser i { font-size: 1.5rem; color: #B0E0B6; }
@keyframes lp-bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* Sektionen */
.lp-section { padding: 5rem 0; background-color: #ffffff; border-bottom: 1px solid #e5e7eb; }
.lp-section-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.lp-section-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #2B7A40; margin-bottom: 1rem; }
.lp-section h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: #000000; margin-bottom: 1.5rem; }
.lp-section p { font-size: 1.1rem; color: #000000; line-height: 1.8; max-width: 700px; }
.lp-section-inner p { color: #000000; }
/* Zielgruppen der Startseite: eine Zeile Chips unter "Für wen ist EasyBakus?" */
.lp-zielgruppen-intro { margin-bottom: 1rem; }
.lp-zielgruppen { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 0 0 4rem 0; }
.lp-zielgruppen li { padding: 0.45rem 1rem; border-radius: 999px; background: #f0fdf4; border: 1px solid #b7e4c7; color: #14532d; font-size: 0.95rem; font-weight: 600; }
.lp-section ul, .lp-section ol, .lp-section ul li, .lp-section ol li, .lp-section ul li strong, .lp-section ol li strong, .lp-section ul li code, .lp-section ol li code { color: #000000; }

/* Preisseite (/preise) */
.preis-table-wrap { overflow-x: auto; margin: 1.5rem 0; max-width: 900px; }
.preis-table { width: 100%; border-collapse: collapse; font-size: 1rem; color: #000000; }
.preis-table th { text-align: left; background: #f0fdf4; color: #166534; font-weight: 700; padding: 0.7rem 0.9rem; border-bottom: 2px solid var(--primary-color); }
.preis-table td { padding: 0.6rem 0.9rem; border-bottom: 1px solid #e5e7eb; vertical-align: top; color: #000000; }
.preis-table td.num, .preis-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.preis-table tbody tr td:first-child { font-weight: 600; }
.preis-table tr.preis-total td { background: #f0fdf4; font-weight: 700; color: #166534; }
.preis-table tr.preis-geplant td { color: #475569; }
.preis-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #166534; background: #dcfce7; border: 1px solid var(--primary-color); border-radius: 999px; padding: 0.05rem 0.5rem; margin-left: 0.35rem; vertical-align: middle; }
.preis-note { background: #f0fdf4; border-left: 4px solid var(--primary-color); border-radius: 6px; padding: 1rem 1.25rem; margin: 1.25rem 0; max-width: 800px; color: #000000; line-height: 1.7; }

/* Prüferbereich: überfällige Zeile hervorheben */
.pruef-ueberfaellig td { background: #fef2f2; }

/* Alternating Image-Text Layout */
.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.lp-split.reverse { direction: rtl; }
.lp-split.reverse > * { direction: ltr; }
.lp-split-img { border-radius: 16px; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,0.5); }
.lp-split-img img { width: 100%; height: 360px; object-fit: cover; display: block; transition: transform 0.6s ease; }
.lp-split-img:hover img { transform: scale(1.04); }
.lp-split-text { display: flex; flex-direction: column; gap: 1.5rem; }
.lp-split-text h3 { font-size: 2rem; font-weight: 700; color: #000000; }
.lp-split-text p { font-size: 1.1rem; color: #000000; line-height: 1.8; }
.lp-split-text ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.lp-split-text ul li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 1rem; color: #000000; line-height: 1.6; }
.lp-split-text ul li::before { content: '→'; color: #2B7A40; font-weight: 700; flex-shrink: 0; margin-top: 0.1rem; }

/* Feature Icons Row */
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; margin-top: 3rem; }
.lp-features-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 1.5rem; }
.lp-feature { display: flex; flex-direction: column; gap: 1rem; }
.lp-feature-icon { width: 56px; height: 56px; border-radius: 12px; background: rgba(43,122,64,0.1); border: 1px solid rgba(43,122,64,0.25); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #2B7A40; }
.lp-feature h4 { font-size: 1.1rem; font-weight: 600; color: #000000; margin: 0; }
.lp-feature p { font-size: 0.95rem; color: #000000; margin: 0; line-height: 1.6; }

/* CTA Banner */
.lp-cta-banner { background: #f0fdf4; border: 1px solid #b7e4c7; border-radius: 16px; padding: 4rem 2rem; text-align: center; margin: 3rem 0; }
.lp-cta-banner h2 { font-size: 2.2rem; font-weight: 700; color: #000000; margin-bottom: 1rem; text-align: center; }
.lp-cta-banner p { color: #000000; font-size: 1.1rem; margin: 0 auto 2rem auto; text-align: center; max-width: 700px; }
.lp-cta-banner ul, .lp-cta-banner ol, .lp-cta-banner li { color: #000000; text-align: center; }
.lp-cta-banner ul, .lp-cta-banner ol { list-style-position: inside; padding-left: 0; margin-left: auto; margin-right: auto; max-width: 700px; }
.lp-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* Buttons */
.btn-primary-lp { display: inline-flex; align-items: center; gap: 0.5rem; background: #B0E0B6; color: #0f172a; padding: 0.9rem 2rem; border-radius: 8px; font-weight: 700; font-size: 1rem; text-decoration: none; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-primary-lp:hover { background: #8BC894; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(176,224,182,0.3); color: #0f172a; }
.btn-secondary-lp { display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; color: #1e293b; padding: 0.9rem 2rem; border-radius: 8px; font-weight: 600; font-size: 1rem; text-decoration: none; transition: all 0.3s ease; border: 1px solid #1e293b; cursor: pointer; }
.btn-secondary-lp:hover { border-color: #2B7A40; color: #2B7A40; transform: translateY(-2px); }
/* Secondary button in hero (dark bg) */
.lp-hero .btn-secondary-lp, .lp-hero-short .btn-secondary-lp, .lp-hero-bg .btn-secondary-lp { color: #e5e7eb; border-color: #475569; }
.lp-hero .btn-secondary-lp:hover, .lp-hero-short .btn-secondary-lp:hover, .lp-hero-bg .btn-secondary-lp:hover { border-color: #B0E0B6; color: #B0E0B6; }

/* Karussell */
.lp-carousel { position: relative; overflow: hidden; border-radius: 16px; }
.lp-carousel-track { display: flex; transition: transform 0.5s ease; }
.lp-carousel-slide { min-width: 100%; position: relative; }
.lp-carousel-slide img { width: 100%; height: 400px; object-fit: cover; display: block; }
.lp-carousel-slide .slide-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); color: white; padding: 2rem; font-size: 1.1rem; font-weight: 600; }
.lp-carousel-controls { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.lp-carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: #475569; border: none; cursor: pointer; transition: all 0.3s; padding: 0; }
.lp-carousel-dot.active { background: #B0E0B6; width: 24px; border-radius: 4px; }
.lp-carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); border: 1px solid #475569; color: white; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; backdrop-filter: blur(4px); z-index: 10; }
.lp-carousel-btn:hover { background: rgba(176,224,182,0.2); border-color: #B0E0B6; }
.lp-carousel-btn.prev { left: 1rem; }
.lp-carousel-btn.next { right: 1rem; }

/* Scroll Animationen */
.slide-from-left { opacity: 0; transform: translateX(-60px); transition: opacity 0.7s ease, transform 0.7s ease; }
.slide-from-right { opacity: 0; transform: translateX(60px); transition: opacity 0.7s ease, transform 0.7s ease; }
.slide-from-bottom { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.slide-from-left.in-view, .slide-from-right.in-view, .slide-from-bottom.in-view { opacity: 1; transform: translate(0); }

/* Divider mit Akzent */
.lp-accent-line { width: 60px; height: 3px; background: #2B7A40; border-radius: 2px; margin-bottom: 1.5rem; }

/* Statistiken/Numbers */
.lp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; margin: 3rem 0; text-align: center; }
.lp-stat-number { font-size: 2.5rem; font-weight: 800; color: #2B7A40; line-height: 1; }
.lp-stat-label { font-size: 0.9rem; color: #000000; margin-top: 0.5rem; }

/* WIP Infobar */
.lp-wip-bar { display: flex; align-items: center; gap: 1rem; background: #f0fdf4; border: 1px solid #b7e4c7; border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 3rem; color: #000000; font-size: 0.95rem; }
.lp-wip-bar i { color: #2B7A40; font-size: 1.2rem; flex-shrink: 0; }
.lp-wip-bar span { color: #000000; }

/* Formular Grid (CalculationForm) */
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.form-grid-full { grid-column: 1 / -1; }

/* Dark Theme Form Controls */
.form-control-dark { background: rgba(30,41,59,0.8); border: 1px solid #475569; color: #e5e7eb; border-radius: 8px; padding: 0.75rem 1rem; width: 100%; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.form-control-dark:focus { outline: none; border-color: #B0E0B6; box-shadow: 0 0 0 3px rgba(176,224,182,0.15); }

/* Mobile */
@media (max-width: 768px) {
    .lp-hero .logos-row { gap: 2rem; flex-direction: column; }
    .lp-hero .logo-img { max-height: 120px; }
    .lp-split { grid-template-columns: 1fr; gap: 2rem; }
    .lp-split.reverse { direction: ltr; }
    .lp-carousel-slide img { height: 250px; }
    .form-grid-3 { grid-template-columns: 1fr; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .lp-section { padding: 3rem 0; }
    .lp-cta-banner { padding: 2.5rem 1.5rem; }
    .hero-cta-group { flex-direction: column; align-items: center; }

    /* Scroll-Teaser ist position:absolute; bottom:2rem (~5rem Höhe).
       Padding-bottom stellt sicher, dass der statische Inhalt nicht
       in den Bereich des animierten Teasers ragt. */
    .lp-hero     { padding-bottom: 6rem; }
    .lp-hero-bg  { padding: 3rem 1.5rem 6rem 1.5rem; }
    .lp-hero-short { padding-bottom: 6rem; }

    /* Mobile Overflow Prevention */
    .lp-hero h1,
    .lp-hero-short h1,
    .lp-hero-bg h1,
    .lp-section h2,
    .lp-section h3,
    .lp-split-text h3,
    .lp-feature h4,
    .lp-section-inner p,
    .lp-split-text p,
    .lp-feature p,
    .lp-cta-banner h2,
    .lp-cta-banner p {
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: manual;
        max-width: 100%;
    }

    .lp-section-inner {
        overflow: hidden;
        padding: 0 1rem;
    }

    .lp-features {
        overflow: hidden;
    }

    .lp-features-compact {
        grid-template-columns: 1fr;
    }

    .lp-feature {
        min-width: 0;
        overflow: hidden;
    }

    .lp-split-text {
        overflow: hidden;
        min-width: 0;
    }

    .lp-hero .tagline,
    .lp-hero-short .tagline {
        overflow-wrap: break-word;
        max-width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .calculation-form-container {
        padding: 1rem;
        overflow: hidden;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .lp-split { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* DIN 18599 Eingabe-UX Styles */
.wp-detail-section {
    border-left: 3px solid #4ade80;
    background: rgba(30, 41, 59, 0.7);
    padding: 1rem;
    margin-top: 0.75rem;
    border-radius: 0.5rem;
}

.norm-ref-tag {
    display: inline-block;
    font-size: 0.65rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.15);
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    margin-left: 0.25rem;
    font-family: monospace;
}

.validation-warning {
    color: #fbbf24;
    font-size: 0.8rem;
    padding: 0.5rem;
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid #fbbf24;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.validation-info {
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 0.5rem;
    background: rgba(148, 163, 184, 0.1);
    border-left: 3px solid #94a3b8;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.erzeugertyp-group {
    background: rgba(30, 41, 59, 0.5);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

/* ====================================================
   Tab-Gruppen Styles (CalculationResultsPage)
   ==================================================== */

.calculation-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.tab-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tab-group-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    padding: 0 0.25rem;
}

.tab-group-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tab-group-divider {
    width: 1px;
    min-height: 48px;
    background: rgba(51, 65, 85, 0.6);
    align-self: stretch;
    margin: 0 0.25rem;
}

.tab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}

.tab-button.active {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
    font-weight: 600;
}

.tab-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ====================================================
   Result Card Styles (Anlagentechnik-Ergebnisse)
   ==================================================== */

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.6);
    border-radius: 0.75rem;
    overflow: hidden;
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.result-card-header .result-name {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.95rem;
}

.result-card-header .result-date {
    font-size: 0.75rem;
    color: #64748b;
}

.result-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

.result-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.result-stat label {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.result-stat span {
    font-size: 0.88rem;
    color: #e2e8f0;
    font-weight: 600;
}

.result-stat.result-stat-highlight label {
    color: #4ade80;
}

.result-stat.result-stat-highlight span {
    color: #4ade80;
}

.result-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(51, 65, 85, 0.4);
    background: rgba(15, 23, 42, 0.2);
}

/* Responsive: Stack tab groups on small screens */
@media (max-width: 768px) {
    .calculation-tabs {
        flex-direction: column;
    }

    .tab-group-divider {
        width: 100%;
        min-height: 1px;
        height: 1px;
        margin: 0.25rem 0;
    }

    .result-card-body {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .result-card-body {
        grid-template-columns: 1fr;
    }
}

/* ===== ZONEN-CRUD STYLES ===== */
.zones-list { display: flex; flex-direction: column; gap: 1rem; }
.zone-card { background: rgba(30, 41, 59, 0.8); border: 1px solid #334155; border-radius: 8px; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.zone-card-info { flex: 1; }
.zone-card-info h4 { margin: 0 0 0.5rem 0; font-size: 1.1rem; color: #e2e8f0; }
.zone-card-info p { margin: 0; font-size: 0.9rem; color: #94a3b8; }
.zone-card-actions { display: flex; gap: 0.5rem; }
.zone-card-actions button { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.zone-edit-form { background: rgba(15, 23, 42, 0.6); border-radius: 8px; padding: 1.5rem; margin-top: 1rem; border: 1px solid #334155; }
.zone-edit-form .input-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* Wärmeverlust-Balkendiagramm */
.heat-loss-bar-chart { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.heat-loss-bar-item { display: flex; align-items: center; gap: 1rem; }
.heat-loss-bar-label { min-width: 120px; font-size: 0.9rem; color: #e2e8f0; }
.heat-loss-bar-container { flex: 1; background: rgba(15, 23, 42, 0.5); border-radius: 4px; height: 24px; overflow: hidden; }
.heat-loss-bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s ease; }
.heat-loss-bar-fill.transmission { background: #3b82f6; }
.heat-loss-bar-fill.lueftung { background: #10b981; }
.heat-loss-bar-fill.waermebruecken { background: #f59e0b; }
.heat-loss-bar-value { min-width: 100px; text-align: right; font-size: 0.9rem; font-weight: 600; color: #e2e8f0; }

/* ===== NEW ANALYSIS PAGE - TWO-COLUMN LAYOUT ===== */
/* Top stepper bar (full width above the layout) */
/* ===== Analysis page: one cohesive container; fixed viewport on desktop,
   only the input fields scroll, footer stays pinned bottom-right ===== */
.analysis-page {
    /* S03: Die AnalysisPage folgt jetzt dem app-weiten Theme-Toggle (statt wie
       früher immer hell erzwungen). Im DUNKLEN Modus greifen die globalen
       Slate-Tokens (dunkle Fläche, heller Text); die kontraststarken Hell-Werte
       stehen weiter unten themebedingt in `[data-theme="light"] .analysis-page`. */
    display: flex;
    flex-direction: column;
    background: var(--body-bg);
    color: var(--text-dark);
    /* Flush, edge-to-edge: no own card chrome, the content fills the area
       between the navbar and the breadcrumb without gaps or rounded corners. */
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

/* Hell: weiße, kontraststarke Oberfläche für maximale Formular-Lesbarkeit
   (blasses Corporate-Mint #B0E0B6 hätte auf Weiß zu wenig Kontrast → gesättigtes
   Grün). Gleiche Werte wie das frühere forced-light, nur jetzt nur im Hell-Modus. */
:root[data-theme="light"] .analysis-page {
    --bg-light: #ffffff;
    --bg-lighter: #f8fafc;
    --bg-white: #ffffff;
    --card-bg: #ffffff;
    --card-bg-completed: #f3faf4;
    --card-border: #e2e8f0;
    --card-header-bg: #ffffff;
    --card-body-bg: #ffffff;
    --secondary-light: #f8fafc;
    --text-dark: #1f2937;
    --text-medium: #475569;
    --text-light: #64748b;
    --primary-heading: #1e4d2b;
    --primary-text: #2b5e38;
    --primary-color: #3aa655;
    --primary-dark: #2b7a40;
    --secondary-color: #2f8c47;
    --border-color: #cbd5e1;
    /* eb-Tokens ebenfalls kontraststark auf Weiß */
    --bg: #ffffff;
    --surface: #ffffff;
    --surface2: #f8fafc;
    --ink: #1f2937;
    --ink2: #64748b;
    --line: #e2e8f0;
    --accent: #3aa655;
    --accent-ink: #1e4d2b;
    --accent-contrast: #ffffff;
}

/* S03: schlanke Konfigurator-Kopfzeile (Mockup-Topbar-Anmutung). */
.analysis-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--card-header-bg);
    border-bottom: 1px solid var(--card-border, #e2e8f0);
}

.analysis-topbar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-heading);
}

.analysis-topbar-title .bi {
    color: var(--primary-color);
}

.analysis-topbar-step {
    font-size: 0.8rem;
    color: var(--text-light);
}

.analysis-stepper-bar {
    flex-shrink: 0;
    padding: 0.7rem 1rem;
    /* Flache Navbar-Farbe (kein Verlauf) — sitzt bündig zur Sidebar (.app-sidebar
       nutzt ebenfalls var(--secondary-light)), statt des störenden Slate-Gradienten. */
    background: var(--secondary-light);
    border-bottom: 1px solid var(--card-border, #e2e8f0);
}

.analysis-layout {
    display: grid;
    /* Mockup-.main-Muster: Viewer links dominant, Kontext-Panel rechts.
       1.4:1 gibt den horizontalen Formularzeilen (Label|Eingabe|Einheit) mehr
       Platz, ohne den Viewer aus seiner dominanten Rolle zu nehmen. */
    grid-template-columns: minmax(0, 1.4fr) minmax(380px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    flex: 1;
}

.analysis-sketch-col {
    min-height: 0;
    height: 100%;
    border-right: 1px solid var(--card-border, #e2e8f0);
}

.analysis-form-col {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* S03: Das schmale Kontext-Panel ist einspaltig — die horizontalen eb-frow-Zeilen
   (Label · Eingabe · Einheit) stapeln sich untereinander wie im Mockup-Panel.
   Gilt auch für noch nicht migrierte Tabs (deren Felder werden vollbreit gestapelt). */
.analysis-form-col .input-row {
    grid-template-columns: 1fr;
}

/* Footer pinned at the bottom of the form column */
.analysis-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--card-border, #e2e8f0);
    padding: 0.6rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--card-bg, #fff);
}

/* S03: Element-Leiste im Footer — kompakt, damit die 5 Chips in der schmalen
   Panel-Spalte Platz finden (Basis-Optik kommt aus .eb-rail/.eb-rchip). */
.analysis-rail {
    padding: 0 0 .4rem;
    gap: 6px;
}

.analysis-rail .eb-rchip {
    padding: 4px 10px;
    font-size: 12px;
}

.analysis-footer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.analysis-footer-nav .step-counter {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.9rem;
}

.analysis-footer-nav .bottombar-spacer {
    display: inline-block;
    min-width: 1px;
}

.analysis-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.analysis-actions .btn-calc {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.footer-msg {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
}

.footer-msg.success { color: #16a34a; background: rgba(34, 197, 94, 0.12); }
.footer-msg.error { color: #dc2626; background: rgba(239, 68, 68, 0.12); }

/* Category cards have no icon in the Mockup */
.tab-panel-header .tab-panel-icon {
    display: none;
}

/* Edge-to-edge: drop the content-area padding for the analysis page only so it
   sits flush against the navbar and breadcrumb (no left/right/top gaps).
   `!important` + the higher `:has()` specificity overrides MainLayout's scoped
   `article { padding-left/right: …!important }` rule (≥769px) — but, thanks to
   `:has(.analysis-page)`, only on the analysis page; other pages keep padding. */
.content-area:has(.analysis-page) {
    padding: 0 !important;
}

@media (min-width: 1025px) {
    /* Pin the analysis page to the viewport: the app-main column becomes a fixed
       100vh flex container, the breadcrumb keeps its height and the content area
       (and the analysis page inside it) fills the rest with no leftover margin. */
    .app-main:has(.analysis-page) {
        height: 100vh;
        overflow: hidden;
    }
    .content-area:has(.analysis-page) {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .analysis-page {
        flex: 1 1 auto;
        min-height: 0;
    }
}

/* Carousel position dots (mobile only; revealed in the ≤768px media query) */
.carousel-dots {
    display: none;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.carousel-dot.active {
    width: 22px;
    border-radius: 999px;
    background: var(--primary-color, #3aa655);
}

/* Ergebnisse step summary */
.ergebnis-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.ergebnis-summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.92rem;
}

.ergebnis-summary-item.done {
    border-color: var(--primary-color, #3aa655);
    color: #0f172a;
}

.ergebnis-summary-item.done i {
    color: var(--primary-color, #3aa655);
}

.ergebnis-summary-item.todo {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
    flex-direction: column;
    align-items: flex-start;
}

.ergebnis-summary-item.todo i {
    color: #ef4444;
}

.ergebnis-missing {
    font-size: 0.78rem;
    color: #b91c1c;
    margin-top: 0.25rem;
    line-height: 1.35;
}

/* Building Sketch */
.building-sketch-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.building-sketch-svg {
    width: 100%;
    height: auto;
    cursor: pointer;
}

/* Building 3D viewer — fills the left column flush (no own card chrome) */
.building-3d-container {
    background: #eff6ff;
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.building-3d-host {
    width: 100%;
    height: 100%;
    min-height: 280px;
    overflow: hidden;
    background: #eff6ff;
    cursor: grab;
}

.building-3d-host:active {
    cursor: grabbing;
}

.building-3d-canvas {
    display: block;
}

.building-3d-hint {
    position: absolute;
    bottom: 0.6rem;
    right: 0.8rem;
    font-size: 0.7rem;
    color: #64748b;
    background: rgba(255,255,255,0.85);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    pointer-events: none;
    user-select: none;
}

/* View-mode toolbar (realistic / mesh) overlaying the 3D viewer */
.building-3d-toolbar {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 2;
}

.b3d-tool-btn {
    width: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.4rem 0.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.b3d-tool-btn span {
    font-size: 0.62rem;
    line-height: 1;
}

.b3d-tool-btn:hover {
    background: #fff;
    color: #0f172a;
}

.b3d-tool-btn.active {
    background: var(--primary-color, #3aa655);
    border-color: var(--primary-color, #3aa655);
    color: #fff;
}

/* Bottom-left icon controls (light / screenshot / fullscreen) */
.building-3d-bottombar {
    position: absolute;
    bottom: 0.8rem;
    left: 0.8rem;
    display: flex;
    gap: 0.4rem;
    z-index: 2;
}

.b3d-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.b3d-icon-btn:hover {
    background: #fff;
    color: #0f172a;
}

.b3d-icon-btn.active {
    background: var(--primary-color, #3aa655);
    border-color: var(--primary-color, #3aa655);
    color: #fff;
}

[data-theme="dark"] .b3d-tool-btn,
[data-theme="dark"] .b3d-icon-btn {
    background: rgba(30, 41, 59, 0.92);
    border-color: #334155;
    color: #cbd5e1;
}

.sketch-part {
    cursor: pointer;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.sketch-part:hover {
    opacity: 0.85;
    filter: brightness(1.08);
}

.sketch-part.highlighted > polygon,
.sketch-part.highlighted > rect:first-of-type {
    stroke: #22c55e;
    stroke-width: 3;
    filter: drop-shadow(0 0 6px rgba(34,197,94,0.5));
}

.sketch-part.highlighted > rect {
    stroke: #22c55e;
    stroke-width: 3;
}

/* Sketch Legend */
.sketch-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #64748b;
}

.legend-item.completed {
    color: #16a34a;
    font-weight: 600;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}

.legend-dot.dot-completed {
    background: #22c55e;
}

/* Wall sub-tabs */
.wall-subtabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wall-subtab {
    padding: 0.4rem 1rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    color: #475569;
}

.wall-subtab:hover {
    background: #e2e8f0;
}

.wall-subtab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.wall-add-btn {
    border-style: dashed;
    color: #94a3b8;
}

.wall-add-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Gaube / Heizung cards */
/* Mehrfach-Einträge (Gauben/Heizungen) blenden sich in die Eingabe-Kategorie
   ein – kein eigener (im Dark-Theme dunkler) gefüllter, runder Card-Kasten,
   sondern nur ein dezenter Trenner zwischen mehreren Einträgen. */
.gaube-card, .heizung-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.gaube-card + .gaube-card,
.heizung-card + .heizung-card {
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    margin-top: 0.5rem;
    padding-top: 1.25rem;
}

.gaube-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #334155;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: #fef2f2;
}

/* Validation summary in tabs */
.validation-summary {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

@media (max-width: 1024px) {
    /* Stacked layout: 3D on top, form below; page scrolls naturally */
    .analysis-page {
        height: auto;
    }
    .analysis-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .analysis-sketch-col {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--card-border, #e2e8f0);
    }
    .building-3d-container {
        height: auto;
    }
    .building-3d-host {
        height: clamp(300px, 45vh, 520px);
    }
    .analysis-tab-content {
        overflow-y: visible;
    }
    .analysis-footer {
        position: sticky;
        bottom: 0;
        z-index: 5;
    }
}

/* Touch refinements for tablet + mobile (F2/F3/F4) */
@media (max-width: 1024px) {
    .analysis-stepper-bar {
        padding: 0.5rem 0.6rem;
    }

    /* Reveal the swipe carousel dots */
    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 0.25rem 0;
    }

    /* Larger tap targets for touch */
    .analysis-tab-content .form-input {
        min-height: 44px;
        font-size: 16px; /* avoids iOS zoom-on-focus */
    }

    .analysis-tab-content .checkbox-label {
        min-height: 40px;
    }

    .analysis-tab-content .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .analysis-footer-nav .btn-sm,
    .analysis-actions .btn-sm {
        min-height: 44px;
    }

    /* Slightly smaller viewer controls so they don't dominate the canvas */
    .b3d-tool-btn {
        width: 48px;
    }

    .b3d-icon-btn {
        width: 36px;
        height: 36px;
    }
}

/* Dark mode adjustments for building sketch */
[data-theme="dark"] .building-sketch-container {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .building-3d-container {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .building-3d-host {
    background: #0f172a;
}

[data-theme="dark"] .sketch-legend {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .legend-item {
    color: #94a3b8;
}

/* Wand-Subtabs bleiben auch im Dark-Theme im hellen Analyse-Design (#39). */

[data-theme="dark"] .gaube-card,
[data-theme="dark"] .heizung-card {
    background: transparent;
}

[data-theme="dark"] .gaube-card-header {
    color: #e2e8f0;
}
