:root {
  /* Erscheinungsbild Wandscher und Partner: Rot #e61e3a, Dunkelbraun #3d3934, Taupe #978a82 */
  --grund: #f4f2f0;
  --flaeche: #ffffff;
  --text: #2b2825;
  --text-2: #6b625b;
  --linie: #e1ddda;
  --akzent: #c8192f;
  --akzent-hell: #fdeff1;
  --dunkel: #3d3934;
  --serif: Georgia, "Times New Roman", serif;
  --kanzlei: #2f8a4c;
  --kanzlei-hell: #e4f3e8;
  --home: #2c6db5;
  --home-hell: #e3eefa;
  --frei: #8a919c;
  --frei-hell: #eef0f2;
  --abwesend: #b26a00;
  --abwesend-hell: #fdf0dc;
  --fehler: #b3261e;
  --dnd: #b3261e;
  --belegt: #a85a00;
  --belegt-hell: #fff3e0;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(61, 57, 52, .06), 0 2px 8px rgba(61, 57, 52, .05);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #171513; --flaeche: #211e1b; --text: #ece8e4; --text-2: #a99f97; --linie: #36312d;
    --akzent: #ff6b7d; --akzent-hell: #3a2024; --dunkel: #e8e2dc;
    --kanzlei: #5fc27e; --kanzlei-hell: #1b3324; --home: #6fa8ea; --home-hell: #1a2b40;
    --frei: #7d8592; --frei-hell: #232a33; --abwesend: #e3a347; --abwesend-hell: #3a2c16;
    --fehler: #f08a82; --dnd: #c8372d; --belegt: #f0b25a; --belegt-hell: #3a2a12; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-family: var(--serif); font-weight: 400; color: var(--dunkel); }

/* Die Kopfleiste kommt aus /portal/navi.css (gemeinsam mit den anderen Apps) */
.portal-kopf { position: sticky; top: 0; }

.inhalt { max-width: 1240px; margin: 0 auto; padding: 28px 24px 40px; outline: none; }
.laden { color: var(--text-2); }
.fuss { max-width: 1240px; margin: 0 auto; padding: 0 24px 28px; font-size: 12.5px; color: var(--text-2); }
.fuss a { text-decoration: none; color: var(--text-2); }
.fuss a:hover { text-decoration: underline; }
.fuss .warn { color: var(--abwesend); font-weight: 600; }
.fuss .err { color: var(--fehler); font-weight: 600; }

/* Suche */
.suchfeld { position: relative; margin-bottom: 26px; }
.suchfeld input {
  width: 100%; font: inherit; font-size: 20px; padding: 15px 18px 15px 50px;
  border: 1.5px solid var(--linie); border-radius: 12px; background: var(--flaeche); color: var(--text);
  box-shadow: var(--schatten); outline: none;
}
.suchfeld input:focus { border-color: var(--akzent); box-shadow: 0 0 0 4px var(--akzent-hell); }
.suchfeld svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.suchtipp { color: var(--text-2); font-size: 13.5px; margin: -14px 0 24px 4px; }
.suchtipp kbd { font: 12px ui-monospace, monospace; border: 1px solid var(--linie); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--flaeche); }
.beispiele { display: flex; flex-wrap: wrap; gap: 8px; }
.beispiele button { font: inherit; font-size: 13.5px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); border-radius: 99px; padding: 5px 13px; cursor: pointer; }
.beispiele button:hover { border-color: var(--akzent); color: var(--akzent); }

.gruppe { margin-bottom: 28px; }
.gruppe > h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-2); font-weight: 650; margin: 0 0 10px 2px; }
.leer { color: var(--text-2); padding: 18px 2px; }

/* Karten */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px 18px; }
.karten { display: grid; gap: 10px; }
a.karte { display: block; text-decoration: none; transition: border-color .12s; }
a.karte:hover { border-color: var(--akzent); }
.karte-kopf { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.karte-titel { font-weight: 650; font-size: 16px; }
.karte-unter { color: var(--text-2); font-size: 13px; }
.treffer { color: var(--text-2); font-size: 12.5px; }
.treffer mark { background: var(--akzent-hell); color: var(--akzent); border-radius: 3px; padding: 0 3px; }
.karte .chips { margin-top: 10px; }
.verteiler { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--text-2); background: var(--frei-hell); padding: 3px 10px; border-radius: 6px; font-weight: 500; }

/* Personen-Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px;
  padding: 4px 10px 4px 8px; font-size: 13.5px; white-space: nowrap;
}
a.chip:hover { border-color: var(--akzent); }
.chip .kz { font: 600 11.5px ui-monospace, "SF Mono", Consolas, monospace; color: var(--text-2); }
.chip .dw { color: var(--text-2); font-variant-numeric: tabular-nums; }
.chip.ist-nicht-da { opacity: .62; }
.punkt { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--frei); }
.punkt.K { background: var(--kanzlei); }
.punkt.H { background: var(--home); }
.punkt.abw { background: var(--abwesend); }

.status-text { font-size: 12.5px; font-weight: 600; border-radius: 5px; padding: 1px 7px; }
.status-text.K { color: var(--kanzlei); background: var(--kanzlei-hell); }
.status-text.H { color: var(--home); background: var(--home-hell); }
.status-text.frei { color: var(--frei); background: var(--frei-hell); }
.status-text.abw { color: var(--abwesend); background: var(--abwesend-hell); }

/* Webex-Status (praesenz.json): leer = unsichtbar */
.wx:empty { display: none; }
.wx { display: inline-block; font-size: 11.5px; font-weight: 650; line-height: 1.5; border-radius: 99px; padding: 0 8px; margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.wx.dnd { background: var(--dnd); color: #fff; }
.wx.call, .wx.meeting { background: var(--belegt-hell); color: var(--belegt); box-shadow: inset 0 0 0 1px var(--belegt); }
.chip .wx { margin-left: 0; }
.status-stapel { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.status-stapel .wx { margin-left: 0; }
.fehler-text { color: var(--fehler); font-weight: 600; }

/* Detailseiten */
.zurueck { display: inline-block; margin-bottom: 14px; color: var(--text-2); text-decoration: none; font-size: 14px; }
.zurueck:hover { color: var(--akzent); }
.detail-kopf { margin-bottom: 20px; }
.detail-kopf h1 { font-size: 26px; font-weight: 700; }
.detail-kopf .karte-unter { margin-top: 4px; font-size: 14px; }
.abschnitt { margin-bottom: 22px; }
.abschnitt > h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-2); font-weight: 650; margin: 0 0 10px 2px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }

.person-karte { display: grid; gap: 10px; align-content: start; }
.person-karte .oben { display: flex; align-items: flex-start; gap: 12px; }
.person-karte .name { font-weight: 650; font-size: 16px; text-decoration: none; }
.person-karte .name:hover { color: var(--akzent); }
.person-karte .rolle { color: var(--text-2); font-size: 13px; }
.person-karte .kontakt { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.person-karte .kontakt a { color: var(--akzent); text-decoration: none; }
.person-karte .kontakt a:hover { text-decoration: underline; }
.person-karte .unter { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; align-items: start; font-size: 13px; }
.person-karte .unter > span { color: var(--text-2); padding-top: 5px; }
.rang { font: 600 11px ui-monospace, monospace; color: var(--akzent); background: var(--akzent-hell); border-radius: 5px; padding: 2px 6px; flex: none; margin-top: 3px; }
.empfehlung { border-left: 3px solid var(--kanzlei); }
.hinweis-zeile { font-size: 13px; color: var(--abwesend); background: var(--abwesend-hell); border-radius: 7px; padding: 8px 12px; margin-bottom: 12px; }

.woche { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 420px; }
.woche div { text-align: center; border-radius: 7px; padding: 6px 0 7px; font-size: 12px; color: var(--text-2); background: var(--frei-hell); }
.woche div b { display: block; font-size: 13px; color: var(--text); }
.woche .K { background: var(--kanzlei-hell); } .woche .K b { color: var(--kanzlei); }
.woche .H { background: var(--home-hell); } .woche .H b { color: var(--home); }
.woche .heute-tag { outline: 2px solid var(--akzent); outline-offset: 1px; }

.liste-einfach { list-style: none; margin: 0; padding: 0; }
.liste-einfach li { padding: 7px 0; border-bottom: 1px solid var(--linie); }
.liste-einfach li:last-child { border-bottom: 0; }
.liste-einfach a { text-decoration: none; }
.liste-einfach a:hover { color: var(--akzent); }
.geerbt { color: var(--text-2); font-size: 12px; font-style: italic; }

/* Übersichten */
.leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.leiste h1 { font-size: 24px; margin-right: auto; }
.segment { display: inline-flex; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 9px; padding: 3px; }
.segment button { font: inherit; font-size: 13.5px; border: 0; background: none; color: var(--text-2); padding: 5px 11px; border-radius: 6px; cursor: pointer; }
.segment button.an { background: var(--dunkel); color: var(--flaeche); }
.filter { font: inherit; font-size: 14px; padding: 7px 11px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); min-width: 180px; }

.spalten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.spalte h2 { font-size: 13px; font-weight: 650; margin: 0 0 10px 2px; display: flex; align-items: center; gap: 8px; }
.spalte h2 .anzahl { color: var(--text-2); font-weight: 500; }
.spalte .karte { padding: 6px 4px; }
.zeile-person { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; text-decoration: none; font-size: 14px; }
.zeile-person:hover { background: var(--akzent-hell); }
.zeile-person .kz { font: 600 11.5px ui-monospace, monospace; color: var(--text-2); margin-left: auto; width: 52px; }
.zeile-person .dw { color: var(--text-2); font-size: 12.5px; width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.zeile-kopf { display: flex; align-items: center; gap: 9px; padding: 4px 10px 6px; margin-bottom: 2px; border-bottom: 1px solid var(--linie);
  font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.zeile-kopf .name { padding-left: 18px; } /* Breite des Statuspunkts + Abstand */
.zeile-kopf .kz { margin-left: auto; width: 52px; }
.zeile-kopf .dw { width: 64px; text-align: right; }
.leiste-personen { flex-direction: column; align-items: flex-start; gap: 14px; }
.leiste-personen .titel h1 { margin: 0; }
.unterzeile { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); }
.bedienung { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

table.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-2); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--linie); }
.tab td { padding: 9px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tab tr:last-child td { border-bottom: 0; }
.tab td:first-child { font-weight: 550; }
.tab td:first-child a { text-decoration: none; }
.tab td:first-child a:hover { color: var(--akzent); }
.bereich { margin-bottom: 18px; padding: 6px 8px; }
.bereich-kopf { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--linie); }
.bereich-kopf h2 { font-size: 18px; margin-right: auto; }
.bereich-kopf h2 a { text-decoration: none; }
.label { font-size: 11.5px; font-weight: 650; color: var(--text-2); margin-right: 2px; }

.meldungen li { padding: 7px 0; border-bottom: 1px solid var(--linie); font-size: 14px; }
.meldungen .blatt { color: var(--text-2); font-size: 12.5px; margin-right: 8px; }

/* Hilfsklassen (statt style-Attributen, wegen Content-Security-Policy) */
.abstand-oben { margin-top: 10px; }
.ohne-abstand { margin: 0; }
.wachsen { flex: 1; }
.leer.eng { padding: 10px; }
.hinweis-zeile.fehler { color: var(--fehler); }
button.zurueck { font: inherit; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; }

/* Notariat / Werkzeuge */
/* Kachel im Stil der Kanzlei-Piktogramme: ein Kasten mit Haarlinien-Rahmen, großes Piktogramm, darunter der Titel.
   Beim Zeigen invertiert wie die _w-Variante. Bahnschrift = DIN-Schrift von Windows. */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; max-width: 980px; }
.kachel { --strich: var(--dunkel); --papier: var(--flaeche);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  aspect-ratio: 1; padding: 28px 20px 24px; text-decoration: none; text-align: center;
  color: var(--strich); background: var(--papier); border: 1px solid var(--strich);
  transition: background-color .15s ease, color .15s ease; }
.kachel-symbol { flex: 1; display: grid; place-items: center; font: 400 40px Bahnschrift, "DIN Next", "D-DIN", Arial, sans-serif; }
/* Strich unabhängig von der Größe immer haarfein */
.kachel-symbol svg { width: 104px; height: 104px; stroke-width: 1.5px; }
.kachel-symbol svg * { vector-effect: non-scaling-stroke; }
.kachel-name { font-family: Bahnschrift, "DIN Next", "D-DIN", "Arial Narrow", Arial, sans-serif; font-weight: 400; font-size: 15px;
  line-height: 1.3; text-transform: uppercase; letter-spacing: .1em;
  min-height: 2.6em; /* Platz für zwei Zeilen: Piktogramme stehen in allen Kacheln gleich hoch */ }
.kachel:hover, .kachel:focus-visible { background: var(--strich); color: var(--papier); }
.kachel:focus-visible { outline: 2px solid var(--akzent); outline-offset: 4px; }
.kachel-hinweis { display: flex; align-items: center; gap: 7px; margin: 24px 0 0; color: var(--text-2); font-size: 13px; }
.kachel-hinweis svg { flex: none; }
.abschnitt-tools { margin-bottom: 40px; } /* mehrere Bereiche im Reiter Tools */
@media (prefers-reduced-motion: reduce) {
  .kachel { transition: none; }
}
@media (max-width: 520px) {
  .kacheln { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kachel { padding: 18px 10px 16px; gap: 12px; }
  .kachel-symbol svg { width: 72px; height: 72px; stroke-width: 1.25px; }
  .kachel-name { font-size: 13px; letter-spacing: .06em; }
}

/* Downloads */
.dl-pfad { font-size: 13.5px; color: var(--text-2); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 0 6px; }
.dl-pfad a { text-decoration: none; }
.dl-pfad a:hover { color: var(--akzent); text-decoration: underline; }
.dl-pfad .trenner { color: var(--linie); }
.dl-liste { padding: 6px 4px; }
.dl-zeile { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 7px; text-decoration: none; font-size: 14.5px; }
.dl-zeile:hover { background: var(--akzent-hell); }
.dl-zeile:hover .dl-name { color: var(--akzent); }
.dl-symbol { flex: none; width: 42px; height: 26px; display: grid; place-items: center; border: 1px solid var(--linie); border-radius: 5px;
  background: var(--grund); color: var(--text-2); font: 600 10.5px ui-monospace, monospace; text-transform: uppercase; }
.dl-symbol.ordner { border-color: transparent; background: none; color: var(--dunkel); }
.dl-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dl-ort { display: block; font-size: 12.5px; color: var(--text-2); }
.dl-info { flex: none; color: var(--text-2); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; min-width: 64px; }
.dl-datum { min-width: 78px; }

@media (max-width: 820px) {
  .inhalt { padding: 18px 16px 32px; }
  .fuss { padding: 0 16px 24px; }
  .spalten { grid-template-columns: 1fr; }
  .raster { grid-template-columns: 1fr; }
  .suchfeld input { font-size: 17px; }
  .tab th:nth-child(3), .tab td:nth-child(3) { display: none; }
  .dl-datum { display: none; }
}
