.stats-header {
           /* text-align: center;*/
            margin-bottom: 40px;
            padding-bottom: 20px;
            border-bottom: 2px solid var(--color-tinte-rezept);
        }
        
        .hero-stats {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            font-size: 1.1rem;
            color: var(--color-tinte-rezept);
        }
        
        .hero-stats strong {
            font-size: 1.8rem;
        }
        
        
        /* Grid Layout */
        .stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-bottom: 30px;
        }
        
       .xxxstat-card {
            background: #ffffff;
            padding: 24px;
            border-radius: 12px;
            border: 1px solid #f1e0cc;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            transition: box-shadow 0.3s ease, border-color 0.3s ease;
        }
        
        .xxxstat-card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            border-color: #e1bc90;
        }
        
        .xxxstat-card h3 {
            font-size: 1.1rem;
            color: #a37339;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid #f9f2ea;
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
        }
        
        
        /* Donut Chart Placeholder */
        .donut-container {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px 0;
        }
        
        .donut-placeholder {
            width: 180px;
            height: 180px;
            border-radius: 50%;
            background: conic-gradient(
                #F1E0CC 0deg 288deg, /* =var(--color-paper-darker)*/
                #E1BC90 288deg 360deg /* =var(--color-paper-darkest) */
            );
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        
        .donut-placeholder::before {
            content: '';
            width: 100px;
            height: 100px;
            background: white;
            border-radius: 50%;
            position: absolute;
        }
        
        .donut-center {
            position: relative;
            z-index: 1;
            text-align: center;
        }
        
        .donut-center .percentage {
            font-size: 2rem;
            font-weight: bold;
            color: #333;
        }
        
        .donut-center .label {
            font-size: 0.85rem;
            color: #666;
        }
        
        .donut-legend {
            margin-top: 15px;
            display: flex;
            justify-content: center;
            gap: 20px;
            font-size: 0.9rem;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 2px;
        }
        
        /* Farb-befehl wird nicht angenommen!*/
        .device-donut {
            background: conic-gradient(
                #F1E0CC 0deg 270deg, /* =var(--color-paper-darker)*/
                #E1BC90 270deg 360deg  /* =var(--color-paper-darkest) */
            );
        }
        
        /* Timeline Chart Placeholder */
        .timeline-container {
            padding: 20px 0;
        }
        
        .timeline-chart {
            height: 200px;
            background: linear-gradient(to bottom, transparent 0%, transparent 100%);
            position: relative;
            border-left: 2px solid #ddd;
            border-bottom: 2px solid #ddd;
            padding: 10px;
        }
        
        .xxxtimeline-curve {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                to right,
                rgba(37, 99, 235, 0.1) 0%,
                rgba(37, 99, 235, 0.3) 20%,
                rgba(37, 99, 235, 0.5) 40%,
                rgba(37, 99, 235, 0.3) 60%,
                rgba(37, 99, 235, 0.1) 100%
            );
            clip-path: polygon(
                0% 100%,
                10% 70%,
                20% 50%,
                30% 35%,
                40% 25%,
                50% 30%,
                60% 45%,
                70% 60%,
                80% 75%,
                90% 85%,
                100% 95%,
                100% 100%
            );
        }
        
        .timeline-bars {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: flex-end;
            gap: 2%;
            padding: 10px;
        }
        
        .xxxtimeline-bar {
            flex: 1;
            background: #E1BC90; /* = var(--color-paper-darkest) */
            opacity: 0.6;
            border-radius: 4px 4px 0 0;
        }
        
        .xxxtimeline-bar:hover {
            background: #A52A2A; /* = var(--color-rubric) */
        }
        
        .timeline-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            font-size: 0.8rem;
            color: #666;
            padding: 0 10px;
        }
        
        /* Full Width Timeline */
        .timeline-full {
            grid-column: 1 / -1;
        }
        


/* Erweiterte Timeline-Balken (31 Stück statt 15) */
.timeline-bars-extended {
    display: flex;
    align-items: flex-end;
    height: 200px;
    gap: 2px; /* Reduziert von ursprünglich ~4px auf 2px */
}

.timeline-bars-extended .timeline-bar {
    flex: 1;
    min-width: 0; /* Ermöglicht Schrumpfen unter normale Breite */
    background: linear-gradient(180deg, #E1BC90 0%, #F1E0CC 100%);
    border-radius: 2px 2px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}


/* Hover-Effekt bleibt */
.timeline-bars-extended .timeline-bar:hover {
    background: linear-gradient(180deg, #C93434 0%, #A52A2A 100%);
    transform: scaleY(1.05);
}

/* Tooltip beim Hover (zeigt genaue Anzahl) */
.timeline-bars-extended .timeline-bar:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
}

/* Erweiterte Labels (31 Stück) */
.timeline-labels-extended {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 10px; /* Reduziert von 12px auf 10px */
    color: #666;
}

.timeline-labels-extended span {
    flex: 1;
    text-align: center;
    min-width: 0;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .timeline-bars-extended {
        gap: 1px; /* Noch enger auf Mobile */
    }
    
    .timeline-labels-extended {
        font-size: 8px; /* Noch kleiner auf Mobile */
    }
    
    /* Zeige nur jeden 5. Label auf Mobile */
    .timeline-labels-extended span:not(:nth-child(5n+1)) {
        opacity: 0;
    }
}

/* Optional: Highlight für besonders hohe Werte (21+ Minuten) */
.timeline-bar[title*="min_21"],
.timeline-bar[title*="min_22"],
.timeline-bar[title*="min_23"],
.timeline-bar[title*="min_24"],
.timeline-bar[title*="min_25"],
.timeline-bar[title*="min_26"],
.timeline-bar[title*="min_27"],
.timeline-bar[title*="min_28"],
.timeline-bar[title*="min_29"],
.timeline-bar[title*="min_30_plus"] {
    background: linear-gradient(180deg, #D4AF37 0%, #B8942A 100%); /* Gold für Power-Leser */
}

.timeline-bar[title*="min_21"]:hover,
.timeline-bar[title*="min_22"]:hover,
.timeline-bar[title*="min_23"]:hover,
.timeline-bar[title*="min_24"]:hover,
.timeline-bar[title*="min_25"]:hover,
.timeline-bar[title*="min_26"]:hover,
.timeline-bar[title*="min_27"]:hover,
.timeline-bar[title*="min_28"]:hover,
.timeline-bar[title*="min_29"]:hover,
.timeline-bar[title*="min_30_plus"]:hover {
    background: linear-gradient(180deg, #FFD700 0%, #D4AF37 100%);
}

/* ==============================================================================
   CSS für GESTAPELTE Timeline-Balken (Abbrecher + Ganzleser)
   Füge das am Ende deiner metrics.css hinzu
   ============================================================================== */

/* Wrapper für jeden gestapelten Balken */
.timeline-bars-stacked {
    display: flex;
    align-items: flex-end;
    height: 200px;
    gap: 2px;
}

.timeline-bar-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    position: relative;
}

/* Abbrecher-Balken (unten, blau) */
.timeline-bar-bounced {
    background: linear-gradient(180deg, #4A90E2 0%, #2E5C8A 100%);
    border-radius: 2px 2px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.timeline-bar-bounced:hover {
    background: linear-gradient(180deg, #5BA3F5 0%, #4A90E2 100%);
    transform: scaleY(1.05);
}

/* Ganzleser-Balken (oben, braun) */
.timeline-bar-completed {
    background: linear-gradient(180deg, #A52A2A 0%, #8B1A1A 100%);
    border-radius: 2px 2px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.timeline-bar-completed:hover {
    background: linear-gradient(180deg, #C93434 0%, #A52A2A 100%);
    transform: scaleY(1.05);
}

/* Tooltip beim Hover */
.timeline-bar-bounced:hover::after,
.timeline-bar-completed:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 4px;
    pointer-events: none;
}



.timeline-bar-stack {
flex: 1;
display: flex;
flex-direction: column;
justify-content: flex-end;
height: 100%; /* Wichtig für die Skalierung */
}

.timeline-bar-min {
    background: linear-gradient(120deg, #e37575 0%, #A52A2A 100%); 
    width: 100%; 
}

.timeline-bar-abbr {
    background: linear-gradient(120deg, #F1E0CC 0%, #E1BC90 100%); 
    width: 100%; 
}





/* Responsive */
@media (max-width: 768px) {
    .timeline-bars-stacked {
        gap: 1px;
    }
}


        /* Top Lists */
        .top-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .top-list li {
            padding: 14px 0;
            border-bottom: 1px solid #f1e0cc;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color 0.2s ease;
        }
        
        .top-list li:hover {
            background-color: #f9f2ea;
            margin-left: -8px;
            margin-right: -8px;
            padding-left: 8px;
            padding-right: 8px;
            border-radius: 6px;
        }
        
        .top-list li:last-child {
            border-bottom: none;
        }
        
.list-rank {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
background: linear-gradient(135deg, #a37339 0%, #d19854 100%);
color: white;
border-radius: 50%;
text-align: center;
font-size: 0.8rem;
font-weight: 600;
margin-right: 14px;
box-shadow: 0 2px 4px rgba(163, 115, 57, 0.2);
}

.list-percentage {
font-weight: 600;
color: #a37339;
min-width: 55px;
text-align: right;
font-size: 0.95rem;
}

.top-list a.list-name {
    flex: 1;
color: #a80d2c;
text-decoration: none;
transition: color 0.2s ease;
border-bottom: 1px solid transparent;
}

/* Responsive */
        @media (max-width: 768px) {
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .hero-stats {
                flex-direction: column;
                gap: 10px;
            }
            
        }

/* Milchglas */
.stats-wrapper {
position: relative;
}

.stats-overlay {
position: absolute;
inset: 0;
backdrop-filter: blur(6px);
background: rgba(255, 255, 255, 0.55);
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 4rem;
z-index: 10;
}

.overlay-box {
    background: var(--color-paper);
    padding: 2rem 3rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--color-ink);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}