/* Planlotse Projektboard — Designsprache „Poetische Kartografie": Papier zuerst, ein Kupfer-Akzent, ruhige Typografie. */
:root {
  --papier: #FFFFFF; --flaeche: #FFFFFF; --flaeche2: #F6F6F4; --linie: #E7E7E4; --linie2: #D2D2CE;
  --tinte: #1E2226; --tinte2: #50575F; --akzent: #A4491F; --akzent-hell: #F6E7DE;
  --offen: #5F6670; --laeuft: #1D5FA8; --wartet: #8F5A00; --erledigt: #2E7D4F; --rot: #B3261E;
  --schatten: 0 1px 3px rgba(30,34,38,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Kein Dunkelmodus: Anmutung „weißes Papier" (Michel, 28.09.2026) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--papier); color: var(--tinte); font: 15px/1.45 var(--sans); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.nurlesbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung { position: absolute; left: -999px; top: 0; background: var(--flaeche); padding: 8px 12px; z-index: 99; }
.sprung:focus { left: 8px; top: 8px; }
.leise { color: var(--tinte2); }
.fehler { color: var(--rot); min-height: 1.4em; margin: .6em 0 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; }

.knopf { border: 1px solid var(--linie2); background: var(--flaeche); border-radius: 8px; padding: 7px 12px; cursor: pointer; min-height: 36px; }
.knopf:hover { border-color: var(--tinte2); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.klein { padding: 3px 9px; min-height: 30px; font-size: 13px; }
input, select, textarea { border: 1px solid var(--linie2); background: var(--flaeche); border-radius: 7px; padding: 7px 9px; min-height: 36px; width: 100%; }
textarea { min-height: 90px; resize: vertical; }

.marke { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.marke .leise { font-weight: 400; font-size: 16px; }
.marke-zeichen { width: 18px; height: 18px; background: var(--akzent); clip-path: polygon(0 100%, 50% 0, 100% 100%, 50% 75%); display: inline-block; }

/* Tor (Anmeldung) */
.tor { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.tor-karte { width: min(420px, 100%); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 28px; box-shadow: var(--schatten); }
.tor-karte h1 { margin: .4em 0 .2em; font-size: 28px; }
.tor-karte form { display: grid; gap: 14px; margin-top: 18px; }
.tor-karte label { display: grid; gap: 5px; font-weight: 500; }
.tor-karte small { font-weight: 400; }

/* Kopf & Filter */
#app { display: grid; grid-template-rows: auto auto 1fr; height: 100%; }
.kopf { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--linie); background: var(--flaeche); flex-wrap: wrap; }
.ansichten { display: flex; gap: 2px; background: var(--flaeche2); padding: 3px; border-radius: 10px; overflow-x: auto; }
.ansichten button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; min-height: 34px; white-space: nowrap; }
.ansichten button[aria-pressed="true"] { background: var(--flaeche); box-shadow: var(--schatten); font-weight: 600; }
.kopf-rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menue { position: relative; }
.menue summary { list-style: none; cursor: pointer; border: 1px solid var(--linie2); border-radius: 999px; padding: 6px 12px; min-height: 36px; display: flex; align-items: center; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menue summary::-webkit-details-marker { display: none; }
.menue-inhalt { position: absolute; right: 0; top: calc(100% + 6px); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten); display: grid; min-width: 210px; padding: 6px; z-index: 30; }
.menue-inhalt button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 7px; cursor: pointer; }
.menue-inhalt button:hover { background: var(--flaeche2); }
.filter { display: flex; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; align-items: center; background: var(--papier); }
.filter label { flex: 0 1 auto; }
.filter select { width: auto; max-width: 220px; }
.filter .suche { flex: 1 1 220px; }
.schalter { display: flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.schalter input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--akzent); }

main#inhalt { position: relative; overflow: hidden; min-height: 0; }
.ansicht { height: 100%; overflow: auto; }

/* Status-Marken */
.st { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.st-offen { background: var(--offen); } .st-laeuft { background: var(--laeuft); } .st-wartet { background: var(--wartet); } .st-erledigt { background: var(--erledigt); }
.michel-mark { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--akzent); color: #fff; font-size: 10px; font-weight: 700; margin-right: 4px; }
.chip { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--flaeche2); border: 1px solid var(--linie); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.person { background: var(--akzent-hell); border-color: transparent; }
.chip.frist { color: var(--rot); border-color: currentColor; background: transparent; }
.chip.checkliste { border-style: dashed; }

/* Board-Fläche */
#v-board { overflow: hidden; position: relative; }
.flaeche { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none;
  background: #FFFFFF; }
.flaeche.zieht { cursor: grabbing; }
.welt { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.sektor { position: absolute; border-radius: 2px; border: 1px solid var(--linie); border-top: 3px solid var(--sfarbe); background: #FFFFFF; padding: 20px 22px 22px; }
.sektor.zu { padding-bottom: 14px; }
.sektor.zu .sektor-balken { margin-bottom: 0; }
.sektor-kopf { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; width: 100%; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.sektor-kopf .s-name { font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: .01em; }
.sektor-kopf .pfeil { color: var(--tinte2); font-size: 18px; width: 18px; text-align: center; }
.sektor-kopf:hover .s-name { text-decoration: underline; text-decoration-color: var(--sfarbe); text-underline-offset: 5px; }
.sektor-kopf .zahl { margin-left: auto; white-space: nowrap; }
.sektor-kopf .buchst { font-family: var(--serif); font-size: 26px; color: var(--sfarbe); }
.sektor-kopf .zahl { color: var(--tinte2); font-size: 14px; }
.sektor-balken { height: 2px; border-radius: 0; background: var(--linie); overflow: hidden; margin: -6px 0 16px; }
.sektor-balken i { display: block; height: 100%; background: var(--erledigt); }
.themen { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.thema { width: 250px; flex: 0 0 250px; }
.thema h3 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--tinte2); margin: 0 0 8px; font-weight: 600; }
.karte { display: block; width: 100%; text-align: left; background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--offen); border-radius: 3px;
  padding: 8px 10px; margin-bottom: 8px; cursor: pointer; box-shadow: none; transition: opacity .2s, box-shadow .15s; }
.karte:hover { border-color: var(--linie2); background: #FCFCFB; }
.karte.s-laeuft { border-left-color: var(--laeuft); } .karte.s-wartet { border-left-color: var(--wartet); } .karte.s-erledigt { border-left-color: var(--erledigt); }
.karte.s-erledigt .k-titel { text-decoration: line-through; text-decoration-color: var(--tinte2); color: var(--tinte2); }
.karte.aus { opacity: .14; }
.karte.markiert { outline: 3px solid var(--akzent); }
.k-kopf { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--tinte2); }
.k-titel { font-weight: 550; margin: 2px 0 5px; font-size: 14px; line-height: 1.3; }
.k-fuss { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.prio1 .k-kopf::after { content: "▲ hoch"; color: var(--rot); font-weight: 600; }
/* Fern-Ansicht: nur ausblenden (visibility), NIE Größen ändern — sonst stimmt die gemessene Anordnung nicht mehr */
.welt.fern .k-fuss, .welt.fern .k-kopf { visibility: hidden; }
.welt.sehrfern .thema h3, .welt.sehrfern .karte { visibility: hidden; }
.welt.sehrfern .sektor-kopf .s-name, .welt.sehrfern .sektor-kopf .buchst { font-size: 60px; }
.welt.sehrfern .sektor-kopf .zahl { font-size: 34px; }
.zoomleiste { position: absolute; right: 16px; bottom: 16px; display: grid; gap: 4px; }
.zoomleiste button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--linie2); background: var(--flaeche); box-shadow: var(--schatten); cursor: pointer; font-size: 18px; }
.legende { position: absolute; left: 16px; bottom: 16px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 6px 10px; font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; box-shadow: var(--schatten); max-width: calc(100% - 90px); }

/* Liste */
.liste-wrap { padding: 12px 16px 40px; }
table.liste { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
.liste th, .liste td { padding: 7px 9px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; font-size: 14px; }
.liste th { background: var(--flaeche2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--tinte2); position: sticky; top: 0; cursor: pointer; white-space: nowrap; }
.liste tr.zeile { cursor: pointer; } .liste tr.zeile:hover td { background: var(--flaeche2); }
.liste tr.gruppe td { background: var(--papier); font-family: var(--serif); font-weight: 600; font-size: 16px; }
.liste .q { font-size: 12px; color: var(--tinte2); word-break: break-all; }
@media (max-width: 760px) {
  .liste thead { display: none; }
  .liste, .liste tbody, .liste tr, .liste td { display: block; width: 100%; }
  .liste tr.zeile { border-bottom: 1px solid var(--linie); padding: 6px 0; }
  .liste td { border: 0; padding: 2px 10px; }
  .liste td.nb { display: none; }
}

/* Kalender */
.kal-wrap { padding: 12px 16px 40px; }
.kal-leiste { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.kal-leiste h2 { margin: 0 8px; font-size: 22px; min-width: 190px; }
.kal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; background: var(--flaeche); }
.kal .wt { background: var(--flaeche2); font-size: 12px; text-transform: uppercase; color: var(--tinte2); padding: 5px 8px; border-bottom: 1px solid var(--linie); }
.kal .tag { min-height: 108px; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 4px 5px; min-width: 0; }
.kal .tag.fremd { background: var(--papier); color: var(--tinte2); }
.kal .tag.heute .tnr { background: var(--akzent); color: #fff; border-radius: 999px; padding: 0 6px; }
.kal .tnr { font-size: 12px; font-weight: 600; display: inline-block; margin-bottom: 3px; }
.ev { display: block; width: 100%; text-align: left; font-size: 12px; border: 0; border-left: 3px solid var(--offen); background: var(--flaeche2); padding: 2px 5px; margin-bottom: 2px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.s-laeuft { border-left-color: var(--laeuft); } .ev.s-wartet { border-left-color: var(--wartet); } .ev.s-erledigt { border-left-color: var(--erledigt); opacity: .7; }
.ev.art-frist { color: var(--rot); font-weight: 600; }
.kal.woche .tag { min-height: 60vh; }
@media (max-width: 760px) { .kal .tag { min-height: 64px; } .ev { font-size: 10.5px; } .kal.woche { grid-template-columns: 1fr; } .kal.woche .wt { display: none; } .kal.woche .tag { min-height: 0; } }

/* Gantt */
.gantt-wrap { padding: 12px 16px 40px; }
.gantt-leiste { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.gantt-rahmen { display: grid; grid-template-columns: minmax(170px, 300px) 1fr; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); overflow: hidden; }
.gantt-namen { border-right: 1px solid var(--linie); overflow: hidden; }
.gantt-namen div { height: 30px; line-height: 30px; padding: 0 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--linie); cursor: pointer; }
.gantt-namen div.gr { font-family: var(--serif); font-weight: 600; background: var(--flaeche2); cursor: default; }
.gantt-namen div.kopfzeile { height: 44px; background: var(--flaeche2); }
.gantt-scroll { overflow-x: auto; }
.gantt svg { display: block; }
.g-balken { cursor: grab; } .g-balken:focus { outline: none; } .g-balken:focus rect.b { stroke: var(--akzent); stroke-width: 2.5; }
.g-griff { cursor: ew-resize; }
@media (max-width: 760px) { .gantt-rahmen { grid-template-columns: 130px 1fr; } }

/* Verlauf */
.verlauf-wrap { padding: 12px 16px 40px; max-width: 900px; }
.vl { list-style: none; padding: 0; margin: 0; }
.vl li { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 9px; padding: 8px 12px; margin-bottom: 6px; }
.vl .wer { font-weight: 600; } .vl .zeit { color: var(--tinte2); font-size: 12.5px; }
.vl .det { font-size: 13px; color: var(--tinte2); margin-top: 2px; word-break: break-word; }
.linkknopf { border: 0; background: none; color: var(--akzent); text-decoration: underline; cursor: pointer; padding: 0; }

/* Detail */
.detail { position: fixed; right: 0; top: 0; bottom: 0; width: min(480px, 100%); background: var(--flaeche); border-left: 1px solid var(--linie); box-shadow: -8px 0 30px rgba(0,0,0,.08); z-index: 40; display: flex; flex-direction: column; }
.detail-kopf { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--linie); gap: 8px; }
.detail-kopf h2 { margin: 0; font-size: 19px; }
#d-inhalt { overflow: auto; padding: 14px 16px 30px; }
.d-form { display: grid; gap: 11px; }
.d-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--tinte2); }
.d-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-reihe3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.d-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.d-quelle { font-size: 12.5px; background: var(--flaeche2); border-radius: 7px; padding: 7px 9px; word-break: break-all; color: var(--tinte2); }
.d-verlauf { margin-top: 18px; }
.d-verlauf h3 { font-size: 15px; margin: 0 0 6px; }
@media (max-width: 520px) { .d-reihe3 { grid-template-columns: 1fr 1fr; } }

.hinweis { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--tinte); color: var(--papier); padding: 10px 16px; border-radius: 10px; z-index: 60; box-shadow: var(--schatten); max-width: calc(100% - 32px); }
.hinweis .linkknopf { color: inherit; margin-left: 10px; }
dialog { border: 1px solid var(--linie); border-radius: 14px; padding: 20px; background: var(--flaeche); color: var(--tinte); width: min(520px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(20,22,25,.35); }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 16px 0 0; }
dialog label { display: grid; gap: 4px; margin-top: 10px; font-weight: 600; font-size: 13px; }
.linkfeld { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; background: var(--flaeche2); padding: 8px; border-radius: 7px; }

@media (max-width: 760px) {
  body { font-size: 14px; }
  .kopf { gap: 8px; padding: 8px 12px; }
  .marke .leise { display: none; }
  .ansichten { order: 3; width: 100%; }
  .filter { padding: 8px 12px; }
  .filter label { flex: 1 1 45%; }
  .filter select { max-width: none; width: 100%; }
  .filter .suche { flex-basis: 100%; }
  .legende { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media print {
  .kopf, .filter, .zoomleiste, .legende, .detail, .hinweis, #v-board, #v-kalender, #v-gantt, #v-verlauf { display: none !important; }
  #v-liste { display: block !important; height: auto; overflow: visible; }
  #app, main#inhalt { display: block; height: auto; overflow: visible; }
  body { background: #fff; color: #000; font-size: 11px; }
  .liste th { position: static; }
}

/* Dokumente & Links (28.09.2026) */
.d-links { border-top: 1px solid var(--linie); padding-top: 8px; }
.links-liste { list-style: none; padding: 0; margin: 4px 0 8px; }
.links-liste li { padding: 3px 0; word-break: break-word; }
.links-liste a, .dok-wrap a { color: var(--akzent, #2f5e6b); }
.dok-ordner { margin: 10px 0; } .dok-ordner > summary { font-weight: 600; cursor: pointer; padding: 4px 0; }
.dok-hoch { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 9px; padding: 8px 12px; margin: 8px 0 14px; }
.dok-hoch > summary { cursor: pointer; font-weight: 600; }
