/* ════════════════════════════════════════════════════════════════
   gantt_viewer.css — schreibgeschützte Gantt-Ansicht (24.11.2026)
   ────────────────────────────────────────────────────────────────
   Optik wie das Diagramm der App (Lavendel-Kopf, Aufgabenspalte mit
   Farbstreifen, Pastellbalken mit dunkler Schrift), aber eigenständig
   (Präfix gv-), damit Startseiten-CSS und App-CSS sich nicht kreuzen.
   ════════════════════════════════════════════════════════════════ */
.gv {
    --gv-ink: #1d1d1f;
    --gv-label: rgb(79 103 115);
    --gv-linie: rgba(29, 29, 31, 0.07);
    --gv-marke: #5b54a8;
    --gv-marke-rgb: 91, 84, 168;
    position: relative;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(29, 29, 31, 0.07);
    border-radius: 22px;
    box-shadow: 0 1px 2px rgba(40, 40, 80, 0.04), 0 18px 50px rgba(60, 60, 110, 0.10);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gv-ink);
    text-align: left;
}

/* ── Leiste oben ──────────────────────────────────────────────────── */
.gv-leiste {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-bottom: 1px solid var(--gv-linie);
    background: rgba(255, 255, 255, 0.6);
}
.gv-ansichten {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 11px;
    background: rgba(29, 29, 31, 0.06);
}
.gv-ansicht, .gv-knopf {
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(29, 29, 31, 0.6);
    padding: 6px 11px;
    border-radius: 8px;
    cursor: pointer;
}
.gv-ansicht:hover { color: var(--gv-ink); }
.gv-ansicht.is-aktiv { background: #fff; color: var(--gv-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.gv-knopf { background: rgba(29, 29, 31, 0.06); }
.gv-knopf:hover:not(:disabled) { background: rgba(29, 29, 31, 0.1); color: var(--gv-ink); }
.gv-knopf:disabled { opacity: 0.4; cursor: default; }
.gv-nurlesen {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(29, 29, 31, 0.55);
}
.gv-nurlesen svg, .gv-pop-fuss svg {
    width: 14px; height: 14px;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}

/* ── Scrollfläche + Raster ───────────────────────────────────────── */
.gv-scroll {
    position: relative;
    overflow: auto;
    max-height: 70vh;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    outline: none;
    /* Zwei-Finger-Zoom übernimmt das Diagramm selbst (gantt_viewer.js),
       der Browser soll dabei nicht die ganze Seite vergrößern */
    touch-action: pan-x pan-y;
}
.gv-raster { position: relative; min-width: 100%; }

.gv-kopf {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    height: 62px;
    background: rgb(232 229 238);
    border-bottom: 1px solid var(--gv-linie);
}
.gv-ecke {
    position: sticky;
    left: 0;
    z-index: 7;
    flex: 0 0 var(--gv-lw);
    width: var(--gv-lw);
    display: flex;
    align-items: flex-end;
    padding: 0 16px 12px;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gv-label);
    background: rgb(224 221 230);
    border-right: 1px solid var(--gv-linie);
}
.gv-kopf-zeit { position: relative; flex: 0 0 auto; }
.gv-kopf-oben, .gv-kopf-unten { position: relative; height: 31px; }
.gv-kopf-oben { border-bottom: 1px solid rgba(29, 29, 31, 0.05); }
.gv-zelle {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    border-right: 1px solid rgba(255, 255, 255, 0.55);
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(51, 51, 51, 0.72);
    line-height: 1.1;
}
.gv-oben { font-size: 11px; font-weight: 800; color: rgba(51, 51, 51, 0.6); justify-content: center; }
.gv-wt { font-size: 9.5px; opacity: 0.55; font-weight: 700; }
.gv-unten.is-heute { background: rgba(0, 0, 0, 0.18); color: #fff; }
.gv-zelle.is-marke { background: rgba(var(--gv-marke-rgb), 0.16); color: var(--gv-marke); }
.gv-oben.is-marke { background: rgba(var(--gv-marke-rgb), 0.07); }
.gv-unten.is-heute.is-marke { background: rgba(0, 0, 0, 0.24); color: #fff; }

.gv-koerper { position: relative; }
.gv-zeile {
    position: relative;
    display: flex;
    height: 52px;
    border-bottom: 1px solid var(--gv-linie);
}
.gv-label {
    position: sticky;
    left: 0;
    z-index: 4;
    flex: 0 0 var(--gv-lw);
    width: var(--gv-lw);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
    background: rgb(232 229 238);
    border-right: 1px solid var(--gv-linie);
    color: var(--gv-label);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
}
.gv-label:hover { background: rgb(222 226 236); }
.gv-label-farbe { flex: 0 0 4px; align-self: stretch; border-radius: 0 3px 3px 0; margin-right: 10px; }
.gv-label-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gv-zeile.is-gruppe .gv-label { font-weight: 800; color: #3c4f5a; }
.gv-zeile.is-kind .gv-label { padding-left: 4px; }
.gv-kindpfeil { opacity: 0.5; margin-left: 2px; }
.gv-zeile.is-fertig .gv-label-text { text-decoration: line-through; opacity: 0.55; }
.gv-auf {
    flex: 0 0 22px;
    width: 22px; height: 22px;
    border: 0; padding: 0;
    border-radius: 6px;
    background: rgba(29, 29, 31, 0.06);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.gv-auf svg { width: 16px; height: 16px; fill: currentColor; transition: transform 0.15s ease; }
.gv-auf.is-zu svg { transform: rotate(-90deg); }
.gv-mehr {
    flex-shrink: 0;
    margin-left: 6px;
    padding: 2px 7px;
    border: 1px solid rgba(91, 84, 168, 0.28);
    border-radius: 10px;
    background: rgba(91, 84, 168, 0.1);
    color: #5b54a8;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
}

.gv-spur {
    position: relative;
    flex: 0 0 auto;
    background-image: linear-gradient(to right, rgba(29, 29, 31, 0.05) 1px, transparent 1px);
    background-size: var(--gv-px) 100%;
}
.gv-gruppenflaeche {
    position: absolute;
    top: 0;
    bottom: -1px;
    opacity: 0.13;
    pointer-events: none;
}
.gv-balken {
    position: absolute;
    top: 10px;
    height: 32px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.gv-balken:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16); z-index: 2; }
.gv-balken.is-fertig { opacity: 0.45; }
.gv-balken-fort {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}
.gv-balken-text {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11.5px;
    font-weight: 700;
    color: #3d3d3d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gv-balken-p { position: relative; font-size: 9.5px; font-weight: 800; color: #3d3d3d; }
.gv-heute-linie {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: rgb(255 100 100);
    box-shadow: 0 0 8px rgba(255, 80, 80, 0.5);
    pointer-events: none;
    z-index: 3;
}
.gv-band {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(var(--gv-marke-rgb), 0.05);
    box-shadow: inset 1px 0 0 rgba(var(--gv-marke-rgb), 0.15), inset -1px 0 0 rgba(var(--gv-marke-rgb), 0.15);
    pointer-events: none;
    z-index: 0;
}
.gv-leer { padding: 40px 20px; text-align: center; color: rgba(29, 29, 31, 0.5); font-weight: 600; }

/* ── Details (nur lesen) ──────────────────────────────────────────── */
.gv-popup-huelle {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* ohne backdrop-filter: über den klebenden Zeilen des Diagramms wurde
       die Unschärfe in manchen Browsern fehlerhaft gezeichnet */
    background: rgba(20, 18, 40, 0.5);
    animation: gvEin 0.16s ease;
}
@keyframes gvEin { from { opacity: 0; } to { opacity: 1; } }
.gv-popup {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    overflow: auto;
    background: #fff;
    border-radius: 22px;
    padding: 24px 24px 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1d1d1f;
    text-align: left;
}
.gv-pop-zu {
    position: absolute;
    top: 12px; right: 12px;
    width: 30px; height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    font-size: 18px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}
.gv-pop-kopf { display: flex; gap: 12px; align-items: flex-start; padding-right: 30px; margin-bottom: 16px; }
.gv-pop-farbe { flex: 0 0 12px; height: 34px; border-radius: 6px; margin-top: 2px; }
.gv-pop-gruppe { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(29, 29, 31, 0.45); margin-bottom: 3px; }
.gv-pop-titel { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.25; }
.gv-pop-zeilen { display: flex; flex-direction: column; gap: 9px; padding: 12px 14px; border-radius: 14px; background: rgba(29, 29, 31, 0.04); }
.gv-pop-zeilen > div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.gv-pop-zeilen span { flex: 0 0 82px; color: rgba(29, 29, 31, 0.5); font-weight: 600; }
.gv-pop-zeilen em { font-style: normal; color: rgba(29, 29, 31, 0.5); font-size: 12px; }
.gv-pop-fort { flex: 1 1 auto; height: 7px; border-radius: 4px; background: rgba(29, 29, 31, 0.08); overflow: hidden; }
.gv-pop-fort i { display: block; height: 100%; border-radius: 4px; filter: saturate(1.6) brightness(0.9); }
.gv-pop-abschnitt { margin-top: 16px; }
.gv-pop-titel2 { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(29, 29, 31, 0.5); margin-bottom: 8px; }
.gv-pop-titel2 span { text-transform: none; letter-spacing: 0; font-weight: 600; }
.gv-todos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gv-todos li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.gv-check {
    flex: 0 0 17px;
    height: 17px;
    margin-top: 1px;
    border-radius: 5px;
    border: 1.5px solid rgba(29, 29, 31, 0.25);
    box-sizing: border-box;
    position: relative;
}
.gv-todos li.is-done { color: rgba(29, 29, 31, 0.45); text-decoration: line-through; }
.gv-todos li.is-done .gv-check { background: #5b54a8; border-color: #5b54a8; }
.gv-todos li.is-done .gv-check::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.gv-notiz { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; color: rgba(29, 29, 31, 0.8); }
.gv-pop-fuss {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(29, 29, 31, 0.07);
    font-size: 12px;
    font-weight: 600;
    color: rgba(29, 29, 31, 0.45);
}

@media (max-width: 640px) {
    .gv { border-radius: 18px; }
    .gv-leiste { padding: 10px; gap: 8px; }
    .gv-ansicht, .gv-knopf { padding: 6px 8px; font-size: 12px; }
    .gv-nurlesen { display: none; }
    .gv-ecke { padding: 0 10px 12px; }
    .gv-label { font-size: 12px; }
    .gv-label-farbe { margin-right: 7px; }
}
