/* =========================================
   PUFFER
   ========================================= */

.puffer-content {
    min-width: 0;
}

.puffer-subtitle {
    color: #8e98a5;
    font-size: 16px;
    margin-top: -24px;
}

.puffer-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: stretch;
}

.puffer-main {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: center;
    min-height: 560px;
}

.puffer-image-wrap {
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.puffer-image {
    max-height: 500px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 25px rgba(0,0,0,.45));
}

.puffer-main-info {
    min-width: 0;
}

.puffer-charge {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 14px;
}

.puffer-charge span {
    color: #aeb7c2;
    font-size: 18px;
}

.puffer-charge strong {
    color: #ff9f1a;
    font-size: 42px;
}

.charge-bar {
    width: 100%;
    height: 18px;
    background: #2a3039;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 18px;
}

.charge-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff7a00, #ffb347);
    border-radius: 20px;
    min-width: 2px;
}

.puffer-status {
    background: rgba(255,255,255,.05);
    border-radius: 12px;
    padding: 13px 15px;
    font-weight: 600;
    margin-bottom: 25px;
}

.puffer-note {
    color: #9ca6b2;
    line-height: 1.6;
    font-size: 15px;
}

.temperature-panel-puffer {
    min-height: 560px;
}

.temp-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.puffer-temp-card {
    border-radius: 16px;
    padding: 18px 20px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
}

.puffer-temp-card.top-temp {
    border-left: 5px solid #ff4b32;
}

.puffer-temp-card.mid-temp {
    border-left: 5px solid #ff9f1a;
}

.puffer-temp-card.bottom-temp {
    border-left: 5px solid #4da3ff;
}

.temp-label {
    color: #a9b2bd;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.temp-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
}

.temp-value span {
    font-size: 22px;
    font-weight: 400;
}

.temp-desc {
    color: #87919e;
    margin-top: 5px;
}

.puffer-details,
.stratification-panel {
    min-height: 230px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 25px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.detail-item span {
    color: #aeb7c2;
}

.detail-item strong {
    white-space: nowrap;
}

.stratification {
    height: 190px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
}

.strat-zone {
    height: 33.333%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-weight: 600;
}

.zone-top {
    background: linear-gradient(90deg, rgba(190,55,35,.7), rgba(255,120,40,.35));
}

.zone-mid {
    background: linear-gradient(90deg, rgba(255,145,20,.55), rgba(255,190,50,.22));
}

.zone-bottom {
    background: linear-gradient(90deg, rgba(35,105,180,.55), rgba(45,150,220,.22));
}

/* Mobile: Navigation oben, alle Pufferbereiche darunter. */
@media screen and (max-width: 700px) {
    html, body {
        width: 100%;
        height: auto !important;
        min-height: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    /* Die Vorlage setzt display:flex inline. Das muss mobil überschrieben werden. */
    #dashboard {
        display: block !important;
        width: 100%;
        min-width: 0;
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
    }

    .sidebar {
        width: 100%;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid #232f3c;
        box-sizing: border-box;
    }

    .sidebar .logo { margin-bottom: 14px; }
    .sidebar ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .sidebar li { min-width: 0; margin: 0; padding: 11px 8px; text-align: center; }

    .content {
        width: 100%;
        min-width: 0;
        height: auto !important;
        overflow: visible !important;
        box-sizing: border-box;
    }

    .puffer-content { padding: 16px !important; }

    .puffer-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .puffer-main {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 15px;
        text-align: center;
    }

    .puffer-image-wrap {
        height: 330px;
    }

    .puffer-image {
        max-height: 315px;
    }

    .puffer-charge {
        text-align: left;
    }

    .temperature-panel-puffer {
        min-height: auto;
    }

    .temp-value {
        font-size: 42px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .stratification-panel {
        min-height: auto;
    }

    .topbar {
        display: block;
        margin-bottom: 16px;
    }

    .topbar h1 {
        font-size: 28px !important;
        margin-bottom: 12px;
    }
    .puffer-subtitle { margin-top: 0; }
    .status { display: inline-block; }
    .panel { min-width: 0; box-sizing: border-box; padding: 16px; }
}
