/* Portal: nur Ergänzungen zu /sicht.css (Knöpfe, Eingabefelder kommen von dort). Nur dunkel.
   Fassung F (David 2026-11-01): Farben wie im Programm (gui/fassung.css, Fassung I), neutrales Grau statt des
   bräunlichen Korpus der Sichtseite; die Sichtseite selbst gehört dem Web-Chat und behält ihre Werte. */

html, body { height: auto; min-height: 100%; }
html { background: #141416; color-scheme: dark; }
body.portal { background: var(--korpus); font-size: 14px; font-variant-numeric: tabular-nums; }
body.portal button { border: 0; border-radius: 8px; background: var(--taste); padding: 6px 12px; }
body.portal button:hover:not(:disabled) { background: var(--taste-hover); }
body.portal button.link, body.portal button.link:hover:not(:disabled) { background: none; padding: 0; border-radius: 0; }
body.portal input, body.portal select { border-radius: 8px; border-color: var(--trenn); }


/* Karte für Anmelden, Passwort, Meldungen */
.karte { max-width: 380px; margin: 48px auto; padding: 0 16px; }
.karte h1 { font-size: 18px; font-weight: 600; margin: 0 0 16px; }
.karte p { margin: 0 0 12px; }
.feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.feld label { color: var(--beschriftung); font-size: 12px; }
.feld input[type="email"], .feld input[type="password"], .feld input[type="text"] { width: 100%; padding: 7px 9px; }
.feld .haken { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }
.haken input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--amber); }
.info { color: var(--graviert); font-size: 12px; }
.leise { color: var(--graviert); }
.fehler { color: var(--rot-text); font-size: 12px; margin: 0; }
input[aria-invalid="true"] { border-color: var(--rot); }
.knoepfe { display: flex; gap: 8px; margin-top: 18px; }
.karte .nebenweg { margin-top: 24px; font-size: 13px; }

/* Hauptknopf: die eine Handlung der Seite */
button.haupt { color: #1E1D1A; background: var(--amber); border-color: var(--amber); font-weight: 600; padding: 7px 16px; }
button.haupt:hover:not(:disabled) { color: #000; }

/* Knopf, der wie ein Link aussieht, aber etwas tut (Abmelden) */
button.link { background: none; border: none; padding: 0; color: var(--amber); text-decoration: underline; cursor: pointer; }
button.link:hover { color: var(--text); }

/* Sichtbare Fokusmarke auf jedem Bedienelement (Knöpfe, Felder, Kästchen kommen aus sicht.css) */
a:focus-visible, button.link:focus-visible, input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

/* Felder: sicht.css setzt bei input:focus „outline: none“ (nur den Rahmen färben); die Marke gilt hier trotzdem
   für Tastaturbedienung (mehr Gewicht als input:focus) */
body.portal input:focus-visible, body.portal select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

/* Link zum Kopieren (Postbote „links“) */
.kopierfeld { display: flex; gap: 6px; margin: 4px 0 12px; }
.kopierfeld input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; padding: 7px 9px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Verwaltungsseiten (Projekte, Mitglieder, Zugänge, Konto): breiter als die Karte, Listen als Zeilen */
/* 960 px: auf breiten Schirmen (1900 px) drei Karten nebeneinander; Formulare bleiben 380 px */
.verwaltung { max-width: 960px; margin: 32px auto; padding: 0 16px; }
.verwaltung.po-breit { max-width: 1440px; padding: 0 28px; box-sizing: border-box; }
.verwaltung h1 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.verwaltung h2 { font-size: 14px; font-weight: 600; margin: 28px 0 8px; color: var(--beschriftung); }
.verwaltung p { margin: 0 0 12px; }
.krume { font-size: 12px; margin-bottom: 8px; }
.formular { max-width: 380px; }
.reihen { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--trenn); }
.reihen .reihe { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--trenn); }
.reihen .haupttext { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.reihen .rolle { color: var(--beschriftung); }
.reihen .aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reihen .aktionen form { margin: 0; }
.marke { color: var(--graviert); font-size: 12px; margin-left: 6px; }
.rueckmeldung { color: var(--text); background: var(--leiste); border: 1px solid var(--trenn); border-radius: 4px; padding: 6px 10px; }
.feld select { width: 100%; padding: 7px 9px; }

/* Link, der wie ein Knopf aussieht (Navigation, kein Befehl) */
a.knopf { display: inline-block; font: inherit; color: var(--beschriftung); background: var(--gehoben); border: 1px solid var(--kante);
  border-top-color: var(--licht); border-radius: 4px; padding: 4px 10px; text-decoration: none; }
a.knopf:hover { color: var(--text); }
a.knopf.haupt { color: #1E1D1A; background: var(--amber); border-color: var(--amber); font-weight: 600; padding: 7px 16px; }
a.knopf.haupt:hover { color: #000; }
a.knopf:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Handy: Felder in 16 px (sonst vergrößert iOS beim Antippen), Karte näher an den Kopf */
@media (max-width: 600px) {
  .karte { margin-top: 24px; }
  .feld input[type="email"], .feld input[type="password"], .feld input[type="text"], .kopierfeld input { font-size: 16px; }
  button.haupt { width: 100%; padding: 10px 16px; }
  .verwaltung { margin-top: 16px; }
  .verwaltung .formular { max-width: none; }
  .feld select { font-size: 16px; }
  .portal-kopf { padding: 6px 16px; gap: 4px 12px; }
  .portal-kopf .portal-name { display: none; }
  .reihen .aktionen { width: 100%; }
  a.knopf, .reihen .aktionen button { padding: 10px 14px; }
  a.knopf.haupt { padding: 10px 16px; }
  .knoepfe a.knopf { flex: 1; text-align: center; }
  .knoepfe button { flex: 1; padding: 10px 16px; }
}

/* Sichtungen als Karten (Projektseite, Eingang); Vorsatz pk- , weil sicht.css kurze Namen wie .tag und .info belegt */
.pk-karten { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pk-karte { display: flex; flex-direction: column; background: var(--leiste); border: 1px solid var(--kante); border-radius: 4px; min-width: 0; }
.pk-karte:hover, .pk-karte:focus-within { border-color: var(--amber-dim); }
.pk-text { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
a.pk-link:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; border-radius: 4px; }
.pk-titel { font-size: 15px; font-weight: 600; }
.pk-info { color: var(--graviert); font-size: 12px; }
.pk-ansehen { align-self: flex-start; margin-top: 4px; font-size: 12px; }
.pk-fehlt { opacity: .7; }
.pk-aktion { margin: 0; padding: 0 14px 12px; font-size: 12px; }
.pk-zuordnen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; padding: 0 14px 12px; }
.pk-zuordnen select { flex: 1 1 140px; min-width: 0; padding: 6px 8px; }
.pk-zuordnen select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.pk-eingang > .info { padding: 0 14px 12px; margin: 0; }
.pk-hinweis { color: var(--text); background: var(--leiste); border: 1px solid var(--rot); border-radius: 4px; padding: 8px 12px; margin: 0 0 12px;
  cursor: help; }
.pk-hinweis a { cursor: pointer; white-space: nowrap; }

/* Zugeklappte Einrichtung (Ordner für den Export im Eingang, Neues Projekt): selten gebraucht, Regel 5.14 */
.pk-klapp { margin-top: 28px; }
.pk-klapp summary { display: flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; color: var(--beschriftung);
  font-weight: 600; padding: 2px 0; width: max-content; max-width: 100%; }
.pk-klapp summary::-webkit-details-marker { display: none; }
/* Aufklapp-Pfeil wie Regel 8.11: gezeichnet, 16 px, gedreht beim Aufklappen */
.pk-pfeil { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; transition: transform 120ms ease-out; }
.pk-klapp[open] .pk-pfeil { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .pk-pfeil { transition: none; } }
.pk-klapp summary:hover { color: var(--text); }
.pk-klapp summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
.pk-klapp[open] summary { margin-bottom: 8px; }
.pk-klapp .kopierfeld { max-width: 380px; }

@media (max-width: 600px) {
  .pk-karten { grid-template-columns: 1fr; }
  .pk-zuordnen select { font-size: 16px; }
  .pk-zuordnen button.haupt { width: auto; flex: 0 0 auto; }
}

/* ---- Fassung F: Begrüßung, Eingang, Ordner oder Liste, Baum, Tabelle oder Kacheln (David 2026-11-01) ---------- */
.po-gruss { font: 700 30px/1.15 var(--ui); letter-spacing: -.02em; color: var(--text); margin: 4px 0 18px !important; }
.po-eingang { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 16px; margin: 0 0 30px;
  border-radius: 12px; background: var(--amber-flaeche); color: var(--beschriftung); text-decoration: none; }
.po-eingang b { color: var(--amber); }
.po-eingang .po-ico { width: 20px; height: 20px; color: var(--amber); }
.po-eingang-weg { margin-left: auto; padding: 7px 16px; border-radius: 9px; background: var(--amber); color: var(--amber-text);
  font-weight: 600; }
.po-eingang:hover .po-eingang-weg { background: var(--amber-hell); }
.po-eingang:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.po-ico { flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.po-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; }
.po-leiste h1 { margin: 0 !important; }
.verwaltung .po-leiste h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.po-kopftext h1 { font-size: 26px !important; }
.po-kopftext p { margin: 4px 0 0 !important; }
.po-umschalt { display: flex; padding: 3px; border-radius: 9px; background: var(--flaeche); margin-left: auto; }
.po-umschalt a { padding: 5px 12px; border-radius: 7px; color: var(--graviert); text-decoration: none; font-size: 13px; }
.po-umschalt a:hover { color: var(--text); }
.po-umschalt a[aria-current="true"] { background: var(--gehoben); color: var(--text); }
.po-umschalt + .po-mehr { margin-left: 0; }
.po-leiste > .po-mehr:first-child, .po-kopftext + .po-mehr { margin-left: auto; }

.po-neu { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--amber-flaeche); color: var(--amber);
  font: 600 11px/18px var(--ui); white-space: nowrap; }

/* Ordner: drei Bilder als Mosaik */
.po-ordner { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px 20px; }
.po-ordner a { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.po-mosaik { position: relative; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px;
  aspect-ratio: 4 / 3; margin-bottom: 9px; border-radius: 14px; overflow: hidden; background: #0E0E10;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.po-mosaik img { width: 100%; height: 100%; object-fit: cover; display: block; min-width: 0; min-height: 0; }
.po-mosaik img:first-child { grid-row: 1 / 3; }
.po-mosaik-1, .po-mosaik-0 { grid-template-columns: 1fr; }
.po-mosaik-0 { display: grid; grid-template-rows: 1fr; place-items: center; color: var(--tertiaer); }
.po-mosaik-0 svg.po-ico { width: 44px; height: 44px; fill: none; }
.po-mosaik-2 img:nth-child(2) { grid-row: 1 / 3; }
.po-mosaik .po-neu { position: absolute; left: 10px; top: 10px; background: var(--amber); color: var(--amber-text); }
.po-ordner a:hover .po-mosaik { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 0, 0, .55); }
.po-ordner a:focus-visible { outline: none; }
.po-ordner a:focus-visible .po-mosaik { outline: 2px solid var(--amber); outline-offset: 3px; }

/* Tabelle (wie im Schnittraum): jede Spalte mit data-sort sortierbar (tabelle.js, Regel 5.26) */
.po-tabelle { width: 100%; border-collapse: collapse; }
.po-tabelle th { text-align: left; font: 500 12px var(--ui); color: var(--tertiaer); padding: 10px; border-bottom: 1px solid var(--trenn);
  white-space: nowrap; user-select: none; }
.po-tabelle th[data-sort] { cursor: pointer; }
.po-tabelle th[data-sort]:hover { color: var(--beschriftung); }
.po-tabelle th[aria-sort] { color: var(--text); }
.po-tabelle th[aria-sort="ascending"]::after { content: " ↑"; }
.po-tabelle th[aria-sort="descending"]::after { content: " ↓"; }
.po-tabelle th:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.po-tabelle td { padding: 8px 10px; border-bottom: 1px solid var(--zeile); vertical-align: middle; }
.po-tabelle tbody tr:hover td { background: var(--flaeche); }
.po-tabelle .po-zahlspalte { text-align: right; }
.po-tabelle .po-bildspalte { width: 132px; }
.po-tabelle .po-bildspalte-klein { width: 72px; }
.po-mono { font-family: var(--mono); color: var(--beschriftung); font-size: 13px; }
.po-mini { position: relative; display: block; width: 112px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #0E0E10; }
.po-mini-ordner { width: 52px; aspect-ratio: 4 / 3; }
.po-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.po-name { color: var(--text); font-weight: 600; text-decoration: none; }
a.po-name:hover { color: var(--amber); }
.po-zurueck { margin: 0; font-size: 12px; white-space: nowrap; }

/* Kacheln */
.po-kacheln { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 16px; }
.po-kachel { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.po-bild { position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 7px; border-radius: 10px; overflow: hidden; background: #0E0E10;
  transition: transform .2s; }
a.po-kachel:hover .po-bild { transform: scale(1.025); }
a.po-kachel:focus-visible { outline: none; }
a.po-kachel:focus-visible .po-bild { outline: 2px solid var(--amber); outline-offset: 3px; }
.po-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.po-bild .po-neu { position: absolute; left: 7px; top: 7px; background: var(--amber); color: var(--amber-text); }
.po-dauer, .po-marke { position: absolute; bottom: 7px; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .7);
  font: 600 11px/16px var(--ui); color: #fff; }
.po-dauer { right: 7px; }
.po-marke { left: 7px; }
.po-kacheln .po-zurueck { margin-top: 4px; }

/* Projekt mit Baum links (Regel 8.11: gezeichnete Pfeile, 22 px Einzug) */
.po-mit-baum { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; max-width: 1440px; margin: 0 auto;
  padding: 0 28px; box-sizing: border-box; }
.po-mit-baum .po-inhalt { max-width: none; margin: 32px 0; padding: 0; min-width: 0; }
.po-baum { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; margin-top: 36px;
  font-size: 13px; }
.po-baum details { margin: 0; }
.po-baum summary { display: flex; align-items: center; gap: 2px; min-height: 30px; padding: 0 6px 0 0; border-radius: 7px;
  list-style: none; cursor: pointer; color: var(--beschriftung); }
.po-baum summary::-webkit-details-marker { display: none; }
.po-baum summary .pk-pfeil { width: 24px; height: 24px; padding: 4px; box-sizing: border-box; border-radius: 6px; color: var(--graviert); }
.po-baum summary:hover .pk-pfeil { background: var(--hover); color: var(--text); }
.po-baum details[open] > summary .pk-pfeil { transform: rotate(90deg); }
.po-baum summary a { flex: 1; min-width: 0; padding: 5px 4px; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.po-baum summary:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.po-baum summary.po-hier { background: rgba(255, 255, 255, .1); color: var(--text); font-weight: 600; }
.po-baum summary:focus-visible, .po-baum a:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; border-radius: 7px; }
.po-blatt { display: block; padding: 6px 8px 6px 46px; border-radius: 7px; color: var(--graviert); text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
a.po-blatt:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.po-fehlt { opacity: .6; }

@media (max-width: 1000px) {
  .po-mit-baum { grid-template-columns: minmax(0, 1fr); }
  .po-baum { display: none; }
}
@media (max-width: 600px) {
  .verwaltung.po-breit, .po-mit-baum { padding: 0 16px; }
  .po-gruss { font-size: 24px; }
  .po-eingang span:not(.po-eingang-weg) { display: none; }
  .po-opt { display: none; }
  .po-tabelle .po-bildspalte { width: 92px; }
  .po-mini { width: 84px; }
  .po-mit-baum .po-inhalt { margin-top: 16px; }
}
