/* Ansichten — Solarplaner, Responsive, Hilfsklassen
   Teil von style.css (W2, Schnitt E — AK 60: keine Datei ueber 200 Zeilen).
   Einbindungsreihenfolge zaehlt: siehe index.html. */

/* ============ SOLARPLANER ============ */
#panel-solarplaner .card[style*="cursor:pointer"]:hover {
    border-color: var(--accent) !important;
    background: rgba(245,158,11,0.04);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .kpi-grid { flex-wrap: wrap; }
    .kpi-card { min-width: 140px; }
}

@media (max-width: 768px) {
    .kpi-card { min-width: calc(50% - 8px); }
    /* ⛔⛔ Die Navigation EINZEILIG, waagerecht schiebbar. Gemessen am
       14.09.2026 auf einer Handy-Ansicht: zwoelf Reiter brachen auf VIER
       Zeilen um, Kopf und Navigation nahmen zusammen ein Viertel des
       Bildschirms — auf einer Baustelle scrollt man erst an der Navigation
       vorbei, bevor man etwas sieht.
       ⚠ Die Beschriftung BLEIBT. Nur Symbole waeren auf einer Baustelle mit
       Handschuhen und in der Sonne schlechter, nicht besser. */
    .tab-nav {
        padding: 8px 12px;
        gap: 3px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .tab-nav::-webkit-scrollbar { display: none; }
    .tab-btn {
        padding: 5px 10px;
        font-size: 12px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .panel-container { padding: 16px; }
    /* ⛔ Die Kopfzeile nahm auf dem Handy gemessen 320 von 1054 Pixeln: der
       Name brach auf zwei Zeilen, der Firmenname auf zwei weitere, weil die
       Kennungsmarke rechts („Andre (Leitung) · Leitung") den Platz wegnahm.
       Fast ein Drittel des Schirms, bevor irgendein Inhalt kam.
       ⚠ Die frueheren Regeln dafuer standen in `navigation.css` und galten
       einer `.nav-header`, die es im Markup NIE gab (gemessen: 0 Vorkommen).
       Die Kopfzeile heisst `.app-header`. */
    .app-header { padding: 10px 16px; gap: 8px; }
    .header-brand h1 { font-size: 15px; white-space: nowrap; }
    .header-brand .header-sub {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 40vw;
    }
    /* ⛔ Die Kennungsmarke verschwindet — NICHT die Abmelde-Schaltflaeche.
       Wer angemeldet ist, weiss es; wer sich abmelden will, braucht den Knopf.
       Der Name steht weiterhin in den Einstellungen und auf jedem Dokument. */
    .header-badge { display: none; }
    .map-container { height: 350px; }
}

@media (max-width: 480px) {
    /* ⛔ `flex-direction: column` stand hier: jede Karte nahm eine halbe
       Bildschirmhoehe, und man sah von „Was die Pruefung gefunden hat" nur die
       erste. Zwei nebeneinander zeigen alle drei Befundkarten auf einen Blick
       — und genau das ist der Zweck der Reihe. */
    .kpi-grid { flex-wrap: wrap; }
    .kpi-card { min-width: calc(50% - 8px); padding: 12px; }
    .kpi-value { font-size: 24px; }
    .login-box { padding: 24px 20px; width: 100%; }
    /* ⛔⛔ `.tab-btn .tab-label { display: none }` stand hier und war jahrelang
       WIRKUNGSLOS: den `.tab-label` gab es im Markup nicht, der Titel stand als
       nackter Textknoten im Knopf. Als ich ihn am 14.09.2026 einwickelte, damit
       die Navigation einzeilig wird, wurde die alte Regel schlagartig scharf —
       und versteckte jede Beschriftung.
       ⛔ Sie ist ENTFERNT, nicht wiederhergestellt. Zwoelf Reiter als blosse
       Symbole sind auf einer Baustelle schlechter, nicht besser: ein Klemmbrett
       („Bauprotokoll") und ein Blatt mit Stift („Protokolle") sind mit
       Handschuhen und in der Sonne nicht zu unterscheiden — und diese zwei
       fuehren zu voellig verschiedenen Dingen.
       Die Navigation bleibt beschriftet und wird stattdessen geschoben (die
       Regel oben, ab 768px). */
    .tab-btn .tab-icon { font-size: 16px; }
}

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.hidden { display: none !important; }

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

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* File upload */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}

.upload-zone:hover { border-color: var(--accent); background: rgba(245,158,11,0.05); }
.upload-zone .upload-icon { font-size: 32px; margin-bottom: 8px; }

/* Section heading */
.section-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--info);
    margin: 20px 0 12px;
}

/* Abnahmeprotokoll specific */
.abnahme-pflichtfeld {
    border-top: 3px solid var(--info);
}

.abnahme-pflichtfeld .form-control.valid { border-color: rgba(34,197,94,0.4); }
.abnahme-pflichtfeld .form-control.invalid { border-color: rgba(239,68,68,0.4); }

/* Solarplaner validation */
.form-control.sp-invalid { border-color: rgba(239,68,68,0.6) !important; box-shadow: 0 0 0 2px rgba(239,68,68,0.15); }

/* Solarplaner layout with sidebar */
.sp-layout { display: flex; gap: 16px; }
.sp-main { flex: 1; min-width: 0; }
@media (min-width: 1200px) {
}

/* Solarplaner persistent warning bar */
.sp-warnbar {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 12px;
}
.sp-warnbar p { color: var(--danger); font-size: 12px; margin: 2px 0; }

/* Step button error state */
.btn.sp-step-error { border-color: rgba(239,68,68,0.5) !important; color: var(--danger) !important; }

