/* Recless Founder Dashboard — Design-Tokens aus www.recless.ai (styles-BrBkxS74.css):
   Archivo, warmes Off-White, Tinte #1A1A1A, Stone, Pink als Akzent, Grün für
   Positives, Karten mit 16 px Radius, Pills rund. Ruhig, wenig Farbe. */
:root {
  --bg: #FCF6F3; --surface: #FFFFFF; --surface-2: #F5F1F0; --surface-3: #EEE9E6;
  --ink: #1A1A1A; --text-2: #3B3936; --stone: #6B6861; --faint: #9A9690;
  --border: #D2CFCB; --border-leicht: #E7E3DF;
  --pink: #FF5292; --pink-hell: #FFE4EE; --pink-text: #B8004F;
  --gruen: #D1FFAD; --gruen-text: #206100;
  --rot: #EF4343; --rot-hell: #FDE4E4; --rot-text: #A61B1B;
  --gelb-hell: #FFF0C2; --gelb-text: #7A5300;
  --orange-hell: #FFE3CC; --orange-text: #9A4A00;
  --blau-hell: #E1ECFF; --blau-text: #1D4FA8;
  --lila-hell: #ECE3FF; --lila-text: #5A2EA6;
  --grau-hell: #ECEAE7; --grau-text: #5F5C58;
  --radius: 16px; --radius-m: 10px; --radius-s: 6px;
  --schatten: 0 1px 2px rgba(26,26,26,.03), 0 10px 30px -18px rgba(26,26,26,.18);
  --topbar-h: 76px;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; font-family: Archivo, -apple-system, "Segoe UI", sans-serif; background: var(--bg);
       color: var(--ink); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
small, .leise { color: var(--stone); font-size: 12.5px; }
.leer-wert { color: var(--faint); }

/* ---- Topbar ---------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; padding: 14px 24px 0; background: linear-gradient(var(--bg), rgba(252,246,243,.85)); }
.topbar-innen { max-width: 1400px; margin: 0 auto; height: 60px; padding: 0 10px 0 22px; display: flex;
                align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--border-leicht);
                border-radius: 999px; box-shadow: var(--schatten); }
.marke { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 0; border-radius: 999px; }
.marke img { height: 26px; display: block; }
.marke-chip { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gruen-text);
              background: var(--gruen); border-radius: 999px; padding: 3px 8px; }
.marke[aria-current="page"] .marke-chip { background: var(--ink); color: #fff; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: auto; }
.nav a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px;
         color: var(--stone); font-weight: 500; font-size: 14px; transition: color .12s, background .12s; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
.nutzer { display: flex; align-items: center; gap: 12px; }
.nutzer-name { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.nutzer-name strong { font-size: 13px; font-weight: 600; }
.nutzer-name small { font-size: 11px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: flex;
          align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.logout { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--stone); }
.logout:hover { background: var(--surface-2); color: var(--ink); }
.logout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Layout ----------------------------------------------------------- */
.inhalt { max-width: 1400px; margin: 0 auto; padding: 28px 24px 60px; display: flex; flex-direction: column; gap: 22px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.seitenkopf .untertitel { color: var(--stone); margin-top: 4px; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.subnav { display: flex; gap: 2px; padding: 4px; background: var(--surface-2); border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; }
.subnav a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; color: var(--stone); font-weight: 500; font-size: 13px; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.raster { display: grid; gap: 16px; }
.raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster-haupt { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stapel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---- Karten & KPIs ---------------------------------------------------- */
.karte { background: var(--surface); border: 1px solid var(--border-leicht); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--schatten); min-width: 0; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.karte-kopf h2 { display: flex; align-items: center; gap: 8px; }
.kpi-leiste { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { display: block; background: var(--surface); border: 1px solid var(--border-leicht); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--schatten); min-width: 0; }
a.kpi:hover { border-color: var(--border); }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--stone); letter-spacing: .02em; text-transform: uppercase; }
.kpi-wert { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; word-break: break-word; }
.kpi-wert.klein { font-size: 17px; font-weight: 700; margin-top: 10px; }
.kpi-hinweis { font-size: 12px; color: var(--stone); margin-top: 6px; }
.kpi-rot .kpi-wert { color: var(--rot-text); }
.kpi-gruen .kpi-wert { color: var(--gruen-text); }
.kpi-gelb .kpi-wert { color: var(--gelb-text); }
.kpi-leer .kpi-wert { color: var(--faint); }

/* ---- Knöpfe ----------------------------------------------------------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px;
         border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap;
         transition: background .12s, border-color .12s, opacity .12s; }
.knopf:hover { background: var(--surface-2); }
.knopf-primaer { background: var(--ink); color: #fff; border-color: var(--ink); }
.knopf-primaer:hover { background: #333; border-color: #333; }
.knopf-akzent { background: var(--pink); color: #fff; border-color: var(--pink); }
.knopf-akzent:hover { opacity: .9; background: var(--pink); }
.knopf-leise { border-color: transparent; background: transparent; color: var(--stone); padding: 0 10px; }
.knopf-leise:hover { background: var(--surface-2); color: var(--ink); }
.knopf-klein { height: 30px; padding: 0 12px; font-size: 12.5px; }
.knopf-gefahr { color: var(--rot-text); }
.knopf-gefahr:hover { background: var(--rot-hell); }
.knopf[disabled] { opacity: .5; cursor: default; }
.icon-knopf { width: 28px; height: 28px; border-radius: 50%; border: none; background: transparent; color: var(--faint); font-size: 18px; line-height: 1; }
.icon-knopf:hover { background: var(--rot-hell); color: var(--rot-text); }
.link-titel { background: none; border: none; padding: 0; text-align: left; font-weight: 600; color: var(--ink); cursor: pointer; }
.link-titel:hover { text-decoration: underline; }
.mini-link, .mini-tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--stone); background: var(--surface-2); border-radius: var(--radius-s); padding: 1px 6px; vertical-align: 1px; }
a.mini-link:hover, a.mini-tag:hover { background: var(--surface-3); color: var(--ink); }

/* ---- Badges & Töne ---------------------------------------------------- */
.badge, .inline-select { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
                         background: var(--t-bg, var(--grau-hell)); color: var(--t-fg, var(--grau-text)); white-space: nowrap; border: none; }
.inline-select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 22px;
                 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
                 background-repeat: no-repeat; background-position: right 8px center; }
.inline-select:hover { filter: brightness(.97); }
.inline-select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.inline-person { background: var(--surface-2); color: var(--ink); font-weight: 500; }
.ton-P0 { --t-bg: var(--rot-hell); --t-fg: var(--rot-text); }
.ton-P1 { --t-bg: var(--orange-hell); --t-fg: var(--orange-text); }
.ton-P2 { --t-bg: var(--blau-hell); --t-fg: var(--blau-text); }
.ton-P3 { --t-bg: var(--grau-hell); --t-fg: var(--grau-text); }
.ton-backlog, .ton-identifiziert, .ton-idee, .ton-lead { --t-bg: var(--grau-hell); --t-fg: var(--grau-text); }
.ton-geplant, .ton-kontaktiert, .ton-in_pruefung, .ton-entwurf { --t-bg: var(--blau-hell); --t-fg: var(--blau-text); }
.ton-in_arbeit, .ton-aktiv, .ton-antrag_vorbereitung, .ton-demo_vereinbart, .ton-pilot { --t-bg: var(--gelb-hell); --t-fg: var(--gelb-text); }
.ton-review, .ton-eingereicht, .ton-demo_durchgefuehrt, .ton-angebot, .ton-protokolliert { --t-bg: var(--lila-hell); --t-fg: var(--lila-text); }
.ton-erledigt, .ton-erreicht, .ton-geloest, .ton-entschieden, .ton-abgeschlossen, .ton-bewilligt, .ton-gewonnen, .ton-veroeffentlicht { --t-bg: var(--gruen); --t-fg: var(--gruen-text); }
.ton-pausiert, .ton-zurueckgestellt, .ton-verworfen { --t-bg: var(--surface-3); --t-fg: var(--stone); }
.ton-offen, .ton-kritisch, .ton-abgelehnt, .ton-verloren { --t-bg: var(--rot-hell); --t-fg: var(--rot-text); }
.ton-hoch { --t-bg: var(--orange-hell); --t-fg: var(--orange-text); }
.ton-mittel { --t-bg: var(--gelb-hell); --t-fg: var(--gelb-text); }
.ton-niedrig { --t-bg: var(--grau-hell); --t-fg: var(--grau-text); }
.ton-wiederkehrend { --t-bg: var(--blau-hell); --t-fg: var(--blau-text); }
.ton-einmalig { --t-bg: var(--grau-hell); --t-fg: var(--grau-text); }
.ton-entwicklung { --t-bg: var(--blau-hell); --t-fg: var(--blau-text); }
.ton-marketing { --t-bg: var(--pink-hell); --t-fg: var(--pink-text); }
.ton-sales { --t-bg: var(--gruen); --t-fg: var(--gruen-text); }
.ton-financials { --t-bg: var(--gelb-hell); --t-fg: var(--gelb-text); }
.ton-foerderungen { --t-bg: var(--lila-hell); --t-fg: var(--lila-text); }
.pille { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--stone); }
.pille-warn { background: var(--gelb-hell); color: var(--gelb-text); }
.pille-rot { background: var(--rot-hell); color: var(--rot-text); }
.pille-gruen { background: var(--gruen); color: var(--gruen-text); }
.person { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.person-kuerzel { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.faellig { font-variant-numeric: tabular-nums; }
.faellig.ueberfaellig { color: var(--rot-text); font-weight: 700; }
.faellig.bald { color: var(--orange-text); font-weight: 600; }

/* ---- Tabellen --------------------------------------------------------- */
.tabelle-huelle { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--stone); text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px 8px; border-bottom: 1px solid var(--border-leicht); white-space: nowrap; }
.tabelle td { padding: 9px 10px; border-bottom: 1px solid var(--border-leicht); vertical-align: middle; }
.tabelle tbody tr:last-child td { border-bottom: none; }
.tabelle tbody tr:hover { background: #FBF9F8; }
.tabelle tr.hervor { background: #FFF5F5; }
.tabelle tr.hervor:hover { background: #FFEFEF; }
.tabelle tr.gedaempft td { opacity: .6; }
.sp-prio { width: 90px; } .sp-aktion { width: 36px; text-align: right; } .sp-titel { min-width: 240px; }
.sp-zahl, td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle .zahl.plus { color: var(--gruen-text); } .tabelle .zahl.minus { color: var(--rot-text); }
.tabelle tfoot td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: none; }

/* ---- Filterleiste ----------------------------------------------------- */
.filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter select, .filter input[type="text"], .filter input[type="search"], .filter input[type="date"] {
  height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; min-width: 0; }
.filter input[type="search"] { min-width: 220px; }
.filter select:focus, .filter input:focus, .formular input:focus, .formular select:focus, .formular textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.umschalter { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.umschalter a { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--stone); }
.umschalter a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kontrolle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--stone); }

/* ---- Listen ----------------------------------------------------------- */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.liste > li { padding: 10px 0; border-bottom: 1px solid var(--border-leicht); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.liste > li:last-child { border-bottom: none; }
.liste .haupttext { font-weight: 600; min-width: 0; }
.liste .nebentext { color: var(--stone); font-size: 12.5px; margin-top: 2px; }
.liste .rechts { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.leerzustand { padding: 26px 16px; text-align: center; color: var(--stone); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.leer-titel { font-weight: 600; color: var(--text-2); }
.hinweisbox { padding: 12px 14px; border-radius: var(--radius-m); background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.hinweisbox.warn { background: var(--gelb-hell); color: var(--gelb-text); }
.hinweisbox.rot { background: var(--rot-hell); color: var(--rot-text); }
.hinweisbox.gruen { background: var(--gruen); color: var(--gruen-text); }

/* ---- Kanban ----------------------------------------------------------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kanban-spalte { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 240px; display: flex; flex-direction: column; gap: 8px; }
.kanban-spalte.ziel { outline: 2px dashed var(--ink); outline-offset: -4px; }
.kanban-kopf { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--stone); }
.kanban-zaehler { background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; }
.kanban-karte { background: var(--surface); border: 1px solid var(--border-leicht); border-radius: var(--radius-m); padding: 10px 12px; cursor: grab; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.kanban-karte:active { cursor: grabbing; }
.kanban-karte.zieht { opacity: .5; }
.kanban-karte .zeile { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kanban-karte .titel { font-weight: 600; line-height: 1.3; }

/* ---- Roadmap / Timeline ------------------------------------------------ */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--border-leicht); }
.timeline > li { position: relative; padding: 0 0 18px 34px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline .punkt { position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border); }
.timeline .punkt.in_arbeit { border-color: var(--gelb-text); }
.timeline .punkt.erreicht { border-color: var(--gruen-text); background: var(--gruen); }
.timeline .punkt.geplant { border-color: var(--blau-text); }
.timeline .punkt.pausiert { border-color: var(--faint); }
.ms-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ms-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--stone); font-size: 12.5px; margin-top: 4px; }
.fortschritt { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 10px 0 6px; }
.fortschritt > span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.ms-aufgaben { margin-top: 8px; }
.ms-aufgaben li { padding: 6px 0; }

/* ---- Protokoll / Details ----------------------------------------------- */
.abschnitt { display: grid; grid-template-columns: 220px 1fr; gap: 6px 18px; padding: 12px 0; border-bottom: 1px solid var(--border-leicht); }
.abschnitt:last-child { border-bottom: none; }
.abschnitt dt { font-size: 12px; font-weight: 600; color: var(--stone); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.abschnitt dd { margin: 0; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.abschnitt dd.leer { color: var(--faint); }
details.aufklapp summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.aufklapp summary::-webkit-details-marker { display: none; }
details.aufklapp summary::before { content: "›"; display: inline-block; transition: transform .12s; color: var(--stone); }
details.aufklapp[open] summary::before { transform: rotate(90deg); }
details.aufklapp .inhalt-klapp { padding: 10px 0 4px 16px; color: var(--text-2); }
.kommentare { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.kommentare li { background: var(--surface-2); border-radius: var(--radius-m); padding: 10px 12px; }
.kommentar-kopf { font-size: 12.5px; margin-bottom: 4px; display: flex; gap: 8px; align-items: baseline; }
.aktivitaet { list-style: none; margin: 0; padding: 0; }
.aktivitaet li { display: grid; grid-template-columns: 118px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-leicht); font-size: 13px; }
.aktivitaet li:last-child { border-bottom: none; }
.aktivitaet .zeit { color: var(--stone); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 2px; }
.aktivitaet .wer { font-weight: 600; }

/* ---- Pipeline ---------------------------------------------------------- */
.pipeline { display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.pipeline .kanban-spalte { min-height: 180px; }
.pipeline-karte { background: var(--surface); border: 1px solid var(--border-leicht); border-radius: var(--radius-m); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; cursor: grab; }
.pipeline-karte .firma { font-weight: 700; }
.pipeline-karte .klein { font-size: 12px; color: var(--stone); }
.pipeline-karte .zeile { flex-wrap: wrap; gap: 4px 8px; }

/* ---- Modal & Formular -------------------------------------------------- */
#modal-wurzel { display: none; }
#modal-wurzel.offen { display: block; }
.modal-hintergrund { position: fixed; inset: 0; background: rgba(26,26,26,.38); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 720px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.4); padding: 24px 26px 22px; }
.modal-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-kopf h2 { font-size: 18px; }
.modal-schliessen { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--surface-2); font-size: 20px; line-height: 1; }
.modal-schliessen:hover { background: var(--surface-3); }
.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.feld.breit { grid-column: 1 / -1; }
.feld label { font-size: 12px; font-weight: 600; color: var(--stone); }
.feld label .pflicht { color: var(--pink); }
.feld input, .feld select, .feld textarea { height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); font-size: 14px; width: 100%; }
.feld textarea { height: auto; min-height: 84px; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.feld .hinweis { font-size: 11.5px; color: var(--faint); }
.feld .fehler { font-size: 12px; color: var(--rot-text); font-weight: 600; }
.feld.hat-fehler input, .feld.hat-fehler select, .feld.hat-fehler textarea { border-color: var(--rot); }
.feld-kaestchen { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-top: 6px; }
.feld-kaestchen label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink); font-weight: 500; }
.feld-kaestchen input { width: 16px; height: 16px; accent-color: var(--ink); }
.formular-fuss { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.formular-fuss .rechts { display: flex; gap: 8px; }
.formular-fehler { grid-column: 1 / -1; }
.modal-kommentare { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-leicht); display: flex; flex-direction: column; gap: 12px; }
.modal-kommentare textarea { min-height: 64px; }
.kommentar-neu { display: flex; gap: 8px; align-items: flex-end; }
.kommentar-neu .feld { flex: 1; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 13px; opacity: 0; transition: opacity .15s, transform .15s; z-index: 60; pointer-events: none; }
#toast.sichtbar { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.fehler { background: var(--rot-text); }
body.modal-offen { overflow: hidden; }

/* ---- Login ------------------------------------------------------------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-karte { background: var(--surface); border: 1px solid var(--border-leicht); border-radius: 24px; padding: 44px 48px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; box-shadow: var(--schatten); max-width: 420px; width: 100%; }
.login-logo { height: 34px; }
.login-untertitel { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gruen-text); background: var(--gruen); border-radius: 999px; padding: 4px 12px; }
.login-text { color: var(--stone); }
.login-warnung { color: var(--gelb-text); background: var(--gelb-hell); border-radius: var(--radius-m); padding: 8px 12px; font-size: 13px; }
.login-knoepfe { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.login-knopf { height: 42px; width: 100%; }

/* ---- Übersicht ---------------------------------------------------------- */
.prio-liste li { align-items: flex-start; }
.prio-nr { width: 26px; height: 26px; border-radius: 50%; background: var(--gruen); color: var(--gruen-text); font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 1100px) {
  .raster-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster-haupt { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar { padding: 10px 12px 0; }
  .topbar-innen { height: auto; flex-wrap: wrap; padding: 8px 10px 8px 16px; border-radius: 24px; row-gap: 6px; }
  .nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; margin: 0; padding-bottom: 2px; }
  .nav a { height: 34px; padding: 0 12px; font-size: 13px; }
  .nutzer-name { display: none; }
  .inhalt { padding: 18px 12px 48px; gap: 16px; }
  .raster-2, .raster-3 { grid-template-columns: 1fr; }
  .formular { grid-template-columns: 1fr; }
  .abschnitt { grid-template-columns: 1fr; gap: 4px; }
  .aktivitaet li { grid-template-columns: 1fr; gap: 2px; }
  .karte { padding: 16px; }
  h1 { font-size: 22px; }
  .modal-hintergrund { padding: 12px; }
  .modal { padding: 18px 16px; }
}

/* ---- Import-Posteingang (nur Admin) ----------------------------------- */
.eingang-symbol { position: relative; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--stone); }
.eingang-symbol:hover, .eingang-symbol[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.eingang-symbol svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eingang-zaehler { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }
.eintrag-karte { border: 1px solid var(--border-leicht); border-radius: var(--radius-m); padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.eintrag-karte.abgewaehlt { opacity: .55; background: var(--surface-2); }
.eintrag-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.eintrag-kopf .icon-knopf { margin-left: auto; }
.eintrag-karte .formular { gap: 10px 14px; }
.eintrag-karte .feld textarea { min-height: 56px; }


/* ---- Recless Brain ---------------------------------------------------- */
.brain-knopf { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--border-leicht); background: var(--gruen); color: var(--gruen-text); font-weight: 700; font-size: 13px; }
.brain-knopf:hover, .brain-knopf[aria-expanded="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.brain-knopf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brain-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); border-left: 1px solid var(--border-leicht); box-shadow: -20px 0 60px -30px rgba(0,0,0,.35); z-index: 40; display: flex; flex-direction: column; }
.brain-panel[hidden] { display: none; }
.brain-panel-kopf { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-leicht); background: var(--surface); }
.brain-panel iframe { flex: 1; border: none; width: 100%; }
body.eingebettet { background: var(--bg); }
.inhalt-eingebettet { padding: 14px 16px 24px; max-width: none; }
.brain { display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - 140px); }
.brain-eingebettet { min-height: calc(100vh - 60px); }
.brain-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brain-titel { display: flex; align-items: center; gap: 10px; }
.brain-marke { font-weight: 800; font-size: 18px; letter-spacing: -.01em; background: var(--gruen); color: var(--gruen-text); border-radius: 999px; padding: 2px 12px; }
.brain-tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.brain-tab { height: 30px; padding: 0 12px; border-radius: 999px; border: none; background: transparent; color: var(--stone); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; }
.brain-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.brain-tab:hover { color: var(--ink); }
.brain-filter { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.brain-filter select { height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12.5px; }
.brain-bereich { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.brain-bereich[hidden] { display: none; }
.brain-chat-layout { display: grid; grid-template-columns: 200px 1fr; gap: 14px; flex: 1; min-height: 0; }
.brain-eingebettet .brain-chat-layout { grid-template-columns: 1fr; }
.brain-eingebettet .brain-verlauf { order: 2; }
.brain-verlauf { background: var(--surface); border: 1px solid var(--border-leicht); border-radius: var(--radius); padding: 14px; font-size: 13px; }
.brain-verlauf .liste > li { padding: 6px 0; }
.brain-chat { background: var(--surface); border: 1px solid var(--border-leicht); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 420px; }
.brain-nachrichten { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.brain-begruessung { margin: auto; max-width: 560px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.brain-vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.brain-vorschlaege.klein { justify-content: flex-start; margin-top: 8px; }
.brain-vorschlag { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--text-2); text-align: left; }
.brain-vorschlag:hover { background: var(--surface-2); color: var(--ink); }
.brain-nachricht { max-width: 92%; padding: 12px 16px; border-radius: 16px; line-height: 1.5; }
.brain-nachricht.nutzer { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.brain-nachricht.brain { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.brain-nachricht p { margin: 0 0 8px; } .brain-nachricht p:last-child { margin-bottom: 0; }
.brain-nachricht ul { margin: 4px 0 8px; padding-left: 20px; } .brain-nachricht h4 { margin: 8px 0 4px; font-size: 13.5px; }
.q-chip { display: inline-block; font-size: 10.5px; font-weight: 700; background: var(--gruen); color: var(--gruen-text); border-radius: 999px; padding: 1px 6px; vertical-align: 1px; margin-left: 2px; }
.brain-quellen { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.brain-quelle:hover { text-decoration: underline; }
.brain-meta { margin-top: 8px; font-size: 12.5px; } .brain-meta ul { margin: 0; padding-left: 18px; }
.brain-eingabe { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-leicht); }
.brain-eingabe textarea { flex: 1; resize: none; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.brain-snippet { font-size: 12.5px; color: var(--text-2); margin-top: 4px; } .brain-snippet mark { background: var(--gruen); color: var(--gruen-text); padding: 0 2px; border-radius: 3px; }
@media (max-width: 900px) { .brain-chat-layout { grid-template-columns: 1fr; } .brain-filter { margin-left: 0; } }
