/* Planung - Akzent und Sonderbausteine fuer den Bildschirm. Das gemeinsame Bild kommt aus firmen.css,
   der Ausdruck aus styles.css. Farben nur ueber die Variablen aus firmen.css. */
:root {
  --g: linear-gradient(135deg, #5eead4 0%, #0d9488 60%, #042f2e 120%);
  --accent: #0d9488;
}

header.top, nav.tabs, main, footer { max-width: 1040px; }   /* der Balkenplan braucht Breite */
nav.tabs { flex-wrap: wrap; }
@media (max-width: 560px) {
  nav.tabs button { font-size: 13px; padding: 10px 2px; }
}
.muster { border-color: color-mix(in srgb, var(--warn) 55%, transparent); color: var(--warn); font-weight: 600; font-size: 14px; }
#gError { margin-bottom: 10px; }
.buttons { display: grid; margin-bottom: 12px; }
.wahl.spalte { flex-direction: column; flex-wrap: nowrap; gap: 10px; }
.wahl label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); cursor: pointer; }
.wahl label span { min-width: 0; overflow-wrap: anywhere; }
.kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kopf h3 { min-width: 0; overflow-wrap: anywhere; }
.kopf > .muted { white-space: nowrap; flex: none; }
.liste { list-style: none; padding: 0; display: grid; gap: 0; }
.liste li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.liste li:first-child { border-top: 0; padding-top: 0; }
.liste li > span:first-child { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; flex: 1; }
.knoepfe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 48%; }
.badge.geplant { color: var(--muted); }
.badge.laeuft { color: var(--warn); }
.badge.fertig { color: var(--ok); }
.badge.archiviert { color: var(--muted); }
.gespeichert { color: var(--ok); font-weight: 600; font-size: 14px; text-align: right; margin-top: 8px; }
.gespeichert.links-buendig { text-align: left; margin: 0 4px 10px; }
.warnliste { margin: 8px 0 0; padding-left: 18px; font-size: 14px; font-weight: 400; display: grid; gap: 4px; }
.warn { color: var(--off); }

/* Wahl des Projekts ueber dem Plan */
.planwahl { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.planwahl select { flex: 1; min-width: 180px; }
.planwahl button { flex: none; }

/* Fortschritt eines Projekts */
.balken { height: 8px; border-radius: 4px; background: var(--border); margin-top: 8px; overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--accent); }

/* Balkenplan: links die Namen, rechts das Bild zum Schieben. Kopf 40 px, Zeile 34 px - wie in app.js. */
.gantt { display: grid; grid-template-columns: minmax(110px, 200px) 1fr; }
@media (max-width: 560px) {
  .gantt { grid-template-columns: 104px 1fr; }
}
.gantt-namen { border-right: 1px solid var(--border-stark); min-width: 0; }
.gantt-kopf { height: 40px; display: flex; align-items: flex-end; padding: 0 8px 6px 0; font-size: 12px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--border-stark); }
.gantt-name { display: block; width: 100%; height: 34px; padding: 0 8px 0 0; background: none; border: 0; border-bottom: 1px solid var(--border);
  text-align: left; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-name:hover { color: var(--akzent-stark); }
.gantt-rahmen { overflow-x: auto; min-width: 0; }
.gantt-bild { display: block; }
.gantt-bild text { font-size: 11px; fill: var(--muted); font-family: var(--schrift); }
.gantt-bild text.monat { font-weight: 600; fill: var(--text-soft); }
.gantt-bild text.we { opacity: .6; }
.gantt-bild text.drucktext { display: none; }
.gantt-bild line.monat, .gantt-bild line.kopf { stroke: var(--border-stark); stroke-width: 1; }
.gantt-bild line.reihe { stroke: var(--border); stroke-width: 1; }
.gantt-bild rect.we { fill: var(--surface-2); }
.gantt-bild rect.we.frei { fill: color-mix(in srgb, var(--border) 60%, transparent); }
.gantt-bild .klick { cursor: pointer; }
.gantt-bild rect.stab { fill: color-mix(in srgb, var(--accent) 38%, var(--surface)); stroke: var(--accent); stroke-width: 1; }
.gantt-bild rect.stab.konflikt { stroke: var(--off); stroke-width: 2; }
.gantt-bild rect.stab-fertig { fill: var(--accent); }
.gantt-bild path.raute { fill: var(--surface); stroke: var(--akzent-stark); stroke-width: 2; }
.gantt-bild path.raute.erreicht { fill: var(--akzent-stark); }
.gantt-bild path.kante { fill: none; stroke: var(--text-soft); stroke-width: 1.2; }
.gantt-bild path.pfeil { fill: var(--text-soft); }
.gantt-bild line.heute { stroke: var(--off); stroke-width: 1.5; stroke-dasharray: 4 3; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legende span::before { content: ""; display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.legende .l-heute::before { width: 0; height: 12px; border-left: 2px dashed var(--off); border-radius: 0; }
.legende .l-we::before { background: color-mix(in srgb, var(--border) 60%, transparent); border: 1px solid var(--border); }
.legende .l-raute::before { display: none; }
.legende .l-konflikt::before { border: 2px solid var(--off); }

/* Material im Formular */
.material { display: grid; gap: 6px; margin-bottom: 8px; }
.material .paar { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 6px; align-items: center; }
dialog { width: min(620px, calc(100vw - 24px)); }
