.cls-app-container {
    max-width: 980px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.cls-app-container * {
    box-sizing: border-box;
}

/* 1. Hauptsuchkarte */
.cls-search-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 36px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 45px;
}

.cls-label {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.cls-input-row {
    display: flex;
    gap: 12px;
}

#cls-query-input {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #0f172a;
}

#cls-query-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

#cls-submit-btn {
    padding: 0 28px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, #60a5fa 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

#cls-submit-btn:hover {
    opacity: 0.93;
}

#cls-submit-btn:active {
    transform: translateY(1px);
}

#cls-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.cls-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Status */
.cls-status {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}
.cls-status.is-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.cls-status.is-info {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* 2. Timeline */
.cls-timeline-section {
    position: relative;
    padding-top: 10px;
}

.cls-timeline-header {
    margin-bottom: 25px;
    padding-left: 110px;
}

.cls-timeline-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.cls-timeline-header p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.cls-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cls-timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    bottom: 25px;
    left: 95px;
    width: 2px;
    background: #cbd5e1;
    z-index: 1;
}

.cls-timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    z-index: 2;
}

/* Linke Timeline-Spalte: Datum & Knoten */
.cls-timeline-meta {
    width: 95px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    flex-shrink: 0;
}

.cls-meta-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-align: right;
    white-space: nowrap;
}

.cls-meta-node {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #6366f1;
    color: #6366f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
    padding: 0;
    margin: 0;
}

.cls-meta-node svg {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    display: block;
    flex-shrink: 0;
}

/* 3. Ergebniskarte */
.cls-card {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cls-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cls-card-body {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
}

.cls-card-main {
    flex: 1;
}

.cls-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.cls-card-summary {
    font-size: 0.92rem;
    color: #475569;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

.cls-card-timestamp {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 14px;
}

.cls-text-cyan {
    color: #0891b2;
    font-weight: 600;
}

/* Badges */
.cls-card-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cls-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cls-badge-update {
    background: #ecfeff;
    color: #0891b2;
    border: 1px solid #a5f3fc;
}

/* --- Matched Groups & Akkordeon --- */
.cls-matched-groups-wrapper {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.cls-groups-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.cls-groups-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cls-btn-toggle-details {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.cls-btn-toggle-details:hover {
    background: #eef2ff;
    color: #4f46e5;
}

.cls-toggle-icon {
    transition: transform 0.2s ease;
}

.cls-btn-toggle-details.is-open .cls-toggle-icon {
    transform: rotate(180deg);
}

.cls-groups-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cls-group-pill {
    display: inline-block;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
    cursor: help;
}

.cls-group-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Akkordeon Inhalt */
.cls-groups-accordion {
    margin-top: 12px;
}

.cls-accordion-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}

.cls-group-detail-row {
    padding-bottom: 8px;
    border-bottom: 1px solid #edf2f7;
}

.cls-group-detail-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.cls-gdr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.cls-gdr-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
}

.cls-gdr-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.cls-gdr-badge.is-high {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.cls-gdr-badge.is-medium {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.cls-gdr-reason {
    font-size: 0.78rem;
    color: #475569;
    margin: 0;
    line-height: 1.4;
}

/* Rechte Kartenspalte: Zähler & Einzelkauf-Button */
.cls-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.cls-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cls-metric-solutions {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0284c7;
    white-space: nowrap;
}

.cls-metric-circle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid #06b6d4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    background: #f0fdfa;
}

/* Einzelkauf-Button */
.cls-single-buy-wrapper {
    margin-top: auto;
}

.cls-btn-single-buy {
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
    color: #0369a1;
    border: 1.5px solid #38bdf8;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.12);
    transition: all 0.2s ease;
}

.cls-btn-single-buy strong {
    color: #0284c7;
    font-weight: 700;
    font-size: 0.95rem;
}

.cls-btn-single-buy:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.22);
    transform: translateY(-1px);
}

.cls-btn-single-buy:active {
    transform: translateY(0);
}

/* Footer & Aktionen */
.cls-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}

.cls-actions-right {
    display: flex;
    gap: 10px;
}

.cls-btn {
    padding: 9px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cls-btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.cls-btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.cls-btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #60a5fa 0%, #7c3aed 100%);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

.cls-btn-primary:hover {
    opacity: 0.93;
}

/* Spinner */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: cls-spin 0.8s linear infinite;
}

@keyframes cls-spin {
    to { transform: rotate(360deg); }
}

/* Responsiv */
@media (max-width: 768px) {
    .cls-timeline::before {
        left: 15px;
    }
    .cls-timeline-item {
        flex-direction: column;
        gap: 10px;
        padding-left: 35px;
    }
    .cls-timeline-meta {
        width: auto;
        padding-top: 0;
        position: absolute;
        left: 0;
        top: 20px;
    }
    .cls-meta-date {
        display: none;
    }
    .cls-timeline-header {
        padding-left: 0;
    }
    .cls-card-body {
        flex-direction: column;
    }
    .cls-card-right {
        align-items: flex-start;
        width: 100%;
        gap: 14px;
        margin-top: 8px;
    }
    .cls-card-stats {
        align-self: flex-start;
    }
    .cls-single-buy-wrapper {
        width: 100%;
    }
    .cls-btn-single-buy {
        width: 100%;
        justify-content: center;
    }
    .cls-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .cls-actions-right {
        flex-direction: column;
    }
    .cls-btn {
        width: 100%;
        text-align: center;
    }
}

/* --- 4. Report Preview Modal --- */
.cls-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cls-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.cls-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    z-index: 10;
    animation: cls-modal-in 0.2s ease-out;
}

@keyframes cls-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cls-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid #f1f5f9;
}

.cls-modal-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.cls-modal-header-titles h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.cls-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.cls-modal-close:hover {
    color: #0f172a;
}

.cls-modal-body {
    padding: 24px 28px;
}

.cls-modal-summary {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.cls-modal-groups-box h4,
.cls-modal-products-box h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.cls-modal-groups-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}

/* Teaser-Grid */
.cls-modal-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.cls-modal-product-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.cls-prod-company {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.cls-prod-name {
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 6px;
}

.cls-prod-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.cls-modal-product-placeholder {
    padding: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

/* Paywall CTA im Modal-Footer */
.cls-modal-paywall-cta {
    background: linear-gradient(135deg, #f0fdfa 0%, #eef2ff 100%);
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cls-paywall-text strong {
    display: block;
    font-size: 0.95rem;
    color: #0f172a;
}

.cls-paywall-text span {
    font-size: 0.8rem;
    color: #475569;
}

.cls-paywall-actions {
    display: flex;
    gap: 10px;
}/* --- 4. Report Preview Modal --- */
.cls-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cls-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.cls-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    z-index: 10;
    animation: cls-modal-in 0.2s ease-out;
}

@keyframes cls-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cls-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid #f1f5f9;
}

.cls-modal-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.cls-modal-header-titles h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.cls-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.cls-modal-close:hover {
    color: #0f172a;
}

.cls-modal-body {
    padding: 24px 28px;
}

.cls-modal-summary {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.cls-modal-groups-box h4,
.cls-modal-products-box h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.cls-modal-groups-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}

/* Teaser-Grid */
.cls-modal-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.cls-modal-product-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.cls-prod-company {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.cls-prod-name {
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 6px;
}

.cls-prod-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.cls-modal-product-placeholder {
    padding: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

/* Paywall CTA im Modal-Footer */
.cls-modal-paywall-cta {
    background: linear-gradient(135deg, #f0fdfa 0%, #eef2ff 100%);
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cls-paywall-text strong {
    display: block;
    font-size: 0.95rem;
    color: #0f172a;
}

.cls-paywall-text span {
    font-size: 0.8rem;
    color: #475569;
}

.cls-paywall-actions {
    display: flex;
    gap: 10px;
}

/* --- PROZESSKETTE IM MODAL --- */
.cls-modal-process-box {
    margin: 20px 0;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.cls-modal-process-box h4 {
    margin: 0 0 14px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.cls-process-flow {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
}

.cls-flow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cls-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6366f1;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cls-step-title {
    font-size: 0.85rem;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 4px;
}

.cls-step-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.cls-flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 0 4px;
}

@media (max-width: 768px) {
    .cls-process-flow {
        flex-direction: column;
        gap: 12px;
    }
    .cls-flow-arrow {
        transform: rotate(90deg);
        padding: 4px 0;
    }
}
