/* Fraktionsportal Lehrte - Grundlayout nach CLAUDE.md Abschnitt 5 */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/BarlowCondensed-Regular.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/BarlowCondensed-Medium.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/BarlowCondensed-Italic.woff2") format("woff2"); }

:root {
  --navy: #152B47;
  --blau: #2A64A0;
  --blau-dunkel: #1F4D7D;
  --rot: #D63A32;
  --flaeche: #F4F6F9;
  --weiss: #FFFFFF;
  --text: #1D2229;
  --text-gedaempft: #5A6573;
  --linie: #D9DDE2;
  --fokus: #2A64A0;
  --schatten: 0 1px 3px rgba(21, 43, 71, 0.10), 0 4px 14px rgba(21, 43, 71, 0.06);
  --schrift: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--schrift); font-size: 1rem; line-height: 1.45;
  color: var(--text); background: var(--flaeche);
}
a { color: var(--blau); }
a:hover { color: var(--blau-dunkel); }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
h1, h2, h3 { font-weight: 600; font-style: normal; line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; margin-top: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 0.75rem; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--flaeche); padding: 0 0.25em; }

svg.i { width: 1.1em; height: 1.1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.sprung { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--weiss); padding: 0.5rem 1rem; z-index: 100; }
.sprung:focus { left: 0.5rem; top: 0.5rem; }

/* Kopfleiste */
.kopf { background: var(--navy); color: var(--weiss); }
.kopf-innen {
  max-width: 1100px; margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.marke { color: var(--weiss); text-decoration: none; font-size: 1.5rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.marke span { font-weight: 400; opacity: 0.85; }
.marke:hover { color: var(--weiss); }
.kopf :focus-visible { outline-color: var(--weiss); }

.konto { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.konto form { margin: 0; }
.konto-name { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--weiss); text-decoration: none; min-width: 0; }
.konto-name:hover { color: var(--weiss); text-decoration: underline; }
.konto-name > span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rolle { font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.5); padding: 0 0.4em; white-space: nowrap; }
.knopf-leiste {
  display: inline-flex; align-items: center; gap: 0.4rem; background: transparent; color: var(--weiss);
  border: 1px solid rgba(255,255,255,0.5); padding: 0.3rem 0.7rem; font: inherit; cursor: pointer;
  min-height: 2.4rem;
}
.knopf-leiste:hover { background: rgba(255,255,255,0.12); }

/* Reiternavigation */
.reiter { background: var(--navy); border-top: 1px solid rgba(255,255,255,0.15); }
.reiter ul { list-style: none; margin: 0 auto; padding: 0 0.5rem; max-width: 1100px; display: flex; overflow-x: auto; scrollbar-width: none; }
.reiter ul::-webkit-scrollbar { display: none; }
.reiter a {
  display: block; padding: 0.7rem 1rem; color: var(--weiss); text-decoration: none;
  font-size: 1.1rem; font-weight: 500; white-space: nowrap; border-bottom: 4px solid transparent; opacity: 0.85;
  min-height: 2.75rem;
}
.reiter a:hover { opacity: 1; color: var(--weiss); }
.reiter a[aria-current="page"] { opacity: 1; border-bottom-color: var(--weiss); }

/* Inhalt */
.inhalt { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.inhalt:focus { outline: none; }
.untertitel { color: var(--text-gedaempft); font-size: 1.1rem; margin-bottom: 1.5rem; }

.karte { background: var(--weiss); box-shadow: var(--schatten); padding: 1.25rem; margin-bottom: 1rem; }
.karte-schmal { max-width: 460px; margin: 1rem auto; }
.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.raster .karte { margin-bottom: 0; }
.leer { color: var(--text-gedaempft); margin: 0; }
.hilfe { color: var(--text-gedaempft); font-weight: 400; }
.tag { font-size: 0.8rem; font-weight: 500; color: var(--text-gedaempft); border: 1px solid var(--linie); padding: 0 0.4em; vertical-align: middle; }
.tag-gesperrt { color: var(--rot); border-color: var(--rot); }
.rolle-form { display: flex; gap: 0.3rem; align-items: center; }
.liste { margin: 0; padding-left: 1.2rem; }

/* Hinweise */
.hinweis { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 1rem; margin-bottom: 1rem; border-left: 4px solid var(--blau); background: var(--flaeche); }
.hinweis svg.i { margin-top: 0.2em; }
.hinweis-fehler { border-left-color: var(--rot); color: #7A1F14; background: #FDF1F0; }
.hinweis-ok { border-left-color: #2E7D4F; background: #EEF7F1; }

/* Formulare */
.formular { display: flex; flex-direction: column; gap: 0.35rem; }
.formular label { font-weight: 500; margin-top: 0.6rem; }
.formular input {
  font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--linie); background: var(--weiss);
  color: var(--text); min-height: 2.75rem; width: 100%;
}
.formular input:focus-visible { outline: 3px solid var(--fokus); outline-offset: 0; border-color: var(--fokus); }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1rem;
  background: var(--blau); color: var(--weiss); border: 0; padding: 0.65rem 1.2rem; font: inherit; font-weight: 500;
  font-size: 1.05rem; cursor: pointer; min-height: 2.75rem;
}
.knopf:hover { background: var(--blau-dunkel); }

/* Tabellen */
.tabelle-huelle { padding: 0; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--linie); vertical-align: top; white-space: nowrap; }
th { font-weight: 600; background: var(--flaeche); }
tbody th[scope="row"] { background: transparent; font-weight: 600; }
.offen { color: var(--text-gedaempft); }
.quelle { color: var(--text-gedaempft); font-size: 0.9rem; margin-top: -0.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

/* Fuß */
.fuss { border-top: 1px solid var(--linie); color: var(--text-gedaempft); font-size: 0.9rem; }
.fuss p { max-width: 1100px; margin: 0 auto; padding: 0.75rem 1rem; }

@media (max-width: 600px) {
  html { font-size: 17px; }
  .kopf-innen { padding: 0.5rem 0.75rem; }
  .marke { font-size: 1.3rem; }
  .konto-name > span:first-of-type { display: none; }
  .knopf-leiste span { display: none; }
  .knopf-leiste { padding: 0.4rem 0.6rem; }
  .inhalt { padding: 1rem 0.75rem 2rem; }
  h1 { font-size: 1.7rem; }
  .karte { padding: 1rem; }
}

/* Sitzungen */
.kopfzeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kopfzeile .untertitel { margin-bottom: 0.75rem; }
.zurueck { margin-bottom: 0.5rem; }
.zurueck a { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.zurueck a:hover { text-decoration: underline; }
a.knopf { text-decoration: none; }
.knopf-sekundaer { background: var(--weiss); color: var(--blau); border: 1px solid var(--blau); }
.knopf-sekundaer:hover { background: var(--flaeche); color: var(--blau-dunkel); }
.knopf-gefahr { color: var(--rot); border-color: var(--rot); }
button.knopf-gefahr:not(.knopf-sekundaer) { background: var(--rot); color: var(--weiss); border: 0; }
button.knopf-gefahr:not(.knopf-sekundaer):hover { background: #B32E28; }
.knopf-gefahr.knopf-sekundaer:hover { background: #FDF1F0; color: var(--rot); }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.werkzeuge .knopf { margin-top: 0; }
.werkzeuge-klein { margin: 0; flex-wrap: nowrap; }
.werkzeuge-klein form { margin: 0; }
.knopf-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem;
  background: var(--weiss); color: var(--blau); border: 1px solid var(--linie); cursor: pointer; font: inherit; text-decoration: none;
}
.knopf-icon:hover { background: var(--flaeche); }
.knopf-icon[disabled] { opacity: 0.35; cursor: default; }
.knopf-icon svg.i { width: 1.2rem; height: 1.2rem; }

.filter { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem; margin: 0 0 1rem; }
.filter label { font-weight: 500; }
.filter select { min-width: 14rem; }
.filter .knopf { margin-top: 0; }
select, textarea {
  font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--linie); background: var(--weiss); color: var(--text); min-height: 2.75rem; width: 100%;
}
.filter select { width: auto; }
textarea { resize: vertical; line-height: 1.4; }
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--fokus); outline-offset: 0; border-color: var(--fokus); }
.formular input[aria-invalid="true"], .formular select[aria-invalid="true"] { border-color: var(--rot); }
.karte-mittel { max-width: 720px; margin: 1rem auto; }
.kontrollfeld { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.5rem; }
.kontrollfeld input { width: 1.3rem; height: 1.3rem; margin: 0; accent-color: var(--blau); }
.kontrollfeld label { margin: 0; font-weight: 400; }
.feldgruppe { border: 1px solid var(--linie); padding: 0.75rem 1rem 1rem; margin: 1rem 0 0; }
.feldgruppe legend { font-weight: 500; padding: 0 0.4rem; }

.status { display: inline-block; font-size: 0.85rem; font-weight: 500; padding: 0 0.5em; border: 1px solid var(--linie); color: var(--text-gedaempft); vertical-align: middle; white-space: nowrap; }
.status-stattgefunden { border-color: #2E7D4F; color: #2E7D4F; }
.status-ausgefallen { border-color: var(--text-gedaempft); text-decoration: line-through; }
.status-geplant { border-color: var(--blau); color: var(--blau); }

td.umbruch { white-space: normal; min-width: 10rem; }
.tabelle-sitzungen td a { font-weight: 500; }

.top-liste { list-style: none; margin: 0; padding: 0; }
.top-liste .karte { margin-bottom: 1rem; }
.top-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.top-kopf h3 { margin: 0; }
.top-daten { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0.75rem 0 0; }
.top-daten dt { font-weight: 500; color: var(--text-gedaempft); }
.top-daten dd { margin: 0; }
.fliess { white-space: pre-wrap; }
.liste-schlicht { list-style: none; padding: 0; }
.liste-schlicht li { padding: 0.35rem 0; border-bottom: 1px solid var(--linie); }
.liste-schlicht li:last-child { border-bottom: 0; }

@media (max-width: 600px) {
  .top-daten { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .top-daten dt { margin-top: 0.5rem; }
  .filter select { width: 100%; min-width: 0; }
  .filter { align-items: stretch; flex-direction: column; }
  .kopfzeile .knopf { width: 100%; }
}

/* Anträge und Anfragen */
.vstatus-abgelehnt, .vstatus-keine_antwort { border-color: var(--rot); color: var(--rot); }
.vstatus-beschlossen { border-color: #2E7D4F; color: #2E7D4F; }
.vstatus-in_arbeit { border-color: var(--text-gedaempft); color: var(--text-gedaempft); }
.vstatus-eingereicht, .vstatus-im_ausschuss { border-color: var(--blau); color: var(--blau); }
.frist { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.frist-rot { color: var(--rot); font-weight: 600; }
.filter > div { display: flex; flex-direction: column; gap: 0.25rem; }
.filter input[type="search"] { font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--linie); min-height: 2.75rem; min-width: 14rem; }
.filter input[type="search"]:focus-visible { outline: 3px solid var(--fokus); outline-offset: 0; border-color: var(--fokus); }
.formular-zeile { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.formular-zeile > div { display: flex; flex-direction: column; gap: 0.25rem; }
.formular-zeile .wachsen { flex: 1 1 16rem; }
.formular-zeile .knopf { margin-top: 0; }
.formular-zeile label { margin-top: 0; }
.tabelle-zahlen td { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-zahlen tr.summe th, .tabelle-zahlen tr.summe td { font-weight: 600; border-top: 2px solid var(--linie); }
.feldgruppe label:first-of-type { margin-top: 0; }
@media (max-width: 600px) {
  .filter input[type="search"] { min-width: 0; width: 100%; }
  .formular-zeile { flex-direction: column; align-items: stretch; }
  .frist { white-space: normal; }
}

/* Protokolle */
.pstatus-entwurf { border-color: var(--text-gedaempft); color: var(--text-gedaempft); }
.pstatus-freigegeben { border-color: #2E7D4F; color: #2E7D4F; }
.protokoll-text h3 { font-size: 1.25rem; margin-top: 1rem; }
.protokoll-text h3:first-child, .protokoll-text h4:first-child, .protokoll-text p:first-child { margin-top: 0; }
.protokoll-text h4 { font-size: 1.1rem; margin-top: 0.75rem; }
.protokoll-text ul, .protokoll-text ol { margin: 0 0 0.75rem; padding-left: 1.4rem; }
.protokoll-text p { margin-bottom: 0.75rem; }
td.wortlaut { min-width: 18rem; max-width: 36rem; white-space: pre-wrap; }

/* Anwesenheit */
.anw { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; font-weight: 500; }
.anw-da { color: #2E7D4F; }
.anw-entschuldigt { color: var(--text-gedaempft); }
.anw-gefehlt { color: var(--rot); }
.anw-offen { color: var(--text-gedaempft); font-weight: 400; }
.tabelle-anwesenheit select { width: auto; min-width: 9rem; min-height: 2.4rem; padding: 0.3rem 0.5rem; }
.tabelle-anwesenheit tbody th { font-weight: 500; white-space: nowrap; }
.tabelle-anwesenheit tr.eigene th, .tabelle-anwesenheit tr.eigene td { background: #EEF3F9; }
.tabelle-matrix th, .tabelle-matrix td { text-align: center; }
.tabelle-matrix th:first-child, .tabelle-matrix td:first-child, .tabelle-matrix tbody th { text-align: left; }
.tabelle-matrix tfoot th, .tabelle-matrix tfoot td { border-top: 2px solid var(--linie); background: var(--flaeche); }
.unterreiter ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.unterreiter a { display: inline-block; padding: 0.35rem 0.8rem; border: 1px solid var(--linie); background: var(--weiss); text-decoration: none; color: var(--blau); min-height: 2.4rem; }
.unterreiter a[aria-current="page"] { background: var(--navy); color: var(--weiss); border-color: var(--navy); }
.unterreiter a:hover { background: var(--flaeche); }
.unterreiter a[aria-current="page"]:hover { background: var(--navy); }

/* Wissen und Anliegen */
.schritte { padding-left: 1.5rem; }
.schritte li { margin-bottom: 0.4rem; }
.einwaende dt { font-weight: 600; margin-top: 0.75rem; }
.einwaende dd { margin: 0.2rem 0 0; }
.einwaende dt:first-child { margin-top: 0; }
td.zahl { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.quelle-zelle { max-width: 24rem; font-size: 0.9rem; }
form.inline { display: inline; margin-left: 0.5rem; vertical-align: middle; }
.astatus-offen { border-color: var(--blau); color: var(--blau); }
.astatus-weitergegeben { border-color: var(--text-gedaempft); color: var(--text-gedaempft); }
.astatus-erledigt { border-color: #2E7D4F; color: #2E7D4F; }
.karte h2 a { text-decoration: none; }
.karte h2 a:hover { text-decoration: underline; }
