/* Rechnungsapp im Erscheinungsbild von PJ Medical Cosmetics.
   Schriften liegen lokal (keine Abrufe bei Dritten, DSGVO): Jost für Text, Cormorant Garamond für Titel. */
@font-face { font-family: "Jost"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/Jost-Light.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Jost-Regular.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 500 600; font-style: normal; font-display: swap; src: url("fonts/Jost-Medium.woff") format("woff"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/CormorantGaramond-SemiBold.woff") format("woff"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap; src: url("fonts/CormorantGaramond-SemiBoldItalic.woff") format("woff"); }

:root {
  --bg: #FAF7F1;       /* Hintergrund wie die Website */
  --flaeche: #FFFFFF;
  --text: #3D362E;
  --leise: #6B6257;
  --linie: #E4DBCC;
  --rand: #DACFBB;
  --gold: #9A7A42;     /* Gold für Akzente und grosse Schrift */
  --akzent: #8C5A2B;   /* dunkleres Braun-Gold für kleine Links (gut lesbar) */
  --dunkel: #3D362E;   /* Hauptaktionen */
  --kopf: #EFE7DA;     /* Beige für Flächen und aktive Navigation */
  --titel: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 "Jost", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--titel); font-size: 40px; line-height: 1.1; margin: 0; font-weight: 600; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
h2 { font-family: var(--titel); font-size: 25px; line-height: 1.2; margin: 0; font-weight: 600; }
.eyebrow { margin: 0 0 6px; font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--akzent); }
p { margin: 0 0 12px; }
small, .leise { color: var(--leise); }
small { font-size: 13px; }
.rechts { text-align: right; }
.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.fett { font-weight: 600; }
[hidden] { display: none !important; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Grundaufbau: Menü links, Inhalt rechts. Auf schmalen Bildschirmen rutscht das Menü nach oben. */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.seitenleiste { flex: 1 0 220px; background: var(--flaeche); border-right: 1px solid var(--linie); padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; }
.marke { display: flex; flex-direction: column; padding: 0 12px; color: var(--gold); font-family: var(--titel); font-weight: 600; font-size: 32px; line-height: 1; }
.marke:hover { text-decoration: none; }
.marke img { display: block; width: 132px; height: auto; }
.marke small { display: block; margin-top: 4px; font-family: "Jost", sans-serif; font-weight: 400; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--text); padding: 12px 14px; line-height: 20px; border-radius: 999px; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.aktiv { color: var(--text); font-weight: 500; background: var(--kopf); }
.nav .trenner { height: 1px; background: var(--linie); margin: 8px 0; }
.konto { margin-top: auto; padding: 0 10px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.konto .name { color: var(--text); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inhalt { flex: 999 1 560px; min-width: 0; padding: 44px 48px 60px; }
.inhalt > * { max-width: 1040px; }
.kopfzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.kopfzeile .aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.untertitel { color: var(--leise); margin: -12px 0 20px; }

/* Karten */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px; padding: 26px 28px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 14px; }
.karte.eng { padding: 0; overflow: hidden; display: block; }
.karte > p { margin: 0; }
.karte > * { min-width: 0; max-width: 100%; }
.reihe { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; }
.reihe > .feld { flex: 1 1 150px; }
.reihe > .feld.lang { flex: 2 1 280px; }
.reihe > .feld.kurz { flex: 0 1 150px; }
.raster { display: grid; gap: 14px 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; }
.s6 { grid-column: span 6; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.kennzahlen { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.kennzahl { flex: 1 1 200px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px; padding: 22px 24px; }
.kennzahl.betont { background: var(--kopf); border-color: var(--kopf); }
.kennzahl .wert { font-family: var(--titel); font-size: 36px; line-height: 1.15; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.kennzahl .name { color: var(--leise); font-size: 13px; }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feld label { font-size: 14px; color: #4E463D; }
.pflicht { color: var(--text); }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; min-height: 48px; padding: 0 14px; background: #fff; border: 1px solid var(--rand); border-radius: 12px;
}
textarea { padding: 10px 12px; resize: vertical; line-height: 1.45; }
input[type=file] { padding: 9px 12px; }
input:disabled { background: var(--kopf); color: var(--leise); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.feld.haken label, label.haken { display: flex; gap: 10px; align-items: center; min-height: 44px; color: var(--text); font-size: 15px; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); flex: none; }
.formfuss { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* Knöpfe: Hauptaktion dunkel gefüllt, alles andere zurückhaltend */
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; letter-spacing: 0.4px; border: 1px solid var(--dunkel); background: var(--dunkel); color: #fff; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.knopf:hover { background: #25201B; text-decoration: none; }
.knopf.zweit { background: #fff; color: var(--text); border-color: var(--rand); font-weight: 500; }
.knopf.zweit:hover { background: var(--bg); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf.klein { min-height: 36px; padding: 0 12px; font-size: 14px; }
.textknopf { background: none; border: 0; padding: 0; color: var(--akzent); cursor: pointer; }
.textknopf:hover { text-decoration: underline; }
.symbolknopf { width: 44px; height: 44px; border: 0; background: none; color: var(--leise); padding: 0; cursor: pointer; border-radius: 6px; }
.symbolknopf:hover { background: var(--bg); color: var(--text); }

/* Tabellen: Status steht als normaler Text in der Farbe der übrigen Spalten */
.tabellenrahmen { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { padding: 16px; font-size: 12px; font-weight: 500; color: var(--leise); text-transform: uppercase; letter-spacing: 1.5px; white-space: nowrap; background: var(--flaeche); }
tbody tr:last-child td { border-bottom: 0; }
td.zahl, th.zahl { text-align: right; }
.status { white-space: nowrap; }
.leer { padding: 36px 20px; text-align: center; color: var(--leise); }
.beschreibung { color: var(--leise); font-size: 13px; white-space: pre-line; }

/* Filterleiste */
.filter { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.reiter { display: flex; gap: 2px; flex-wrap: wrap; }
.reiter a { padding: 11px 16px; line-height: 20px; border-radius: 999px; color: var(--text); border: 1px solid transparent; }
.reiter a.aktiv { background: var(--kopf); border-color: var(--kopf); color: var(--text); font-weight: 500; }
.filter form { display: flex; gap: 8px; flex: 1 1 240px; max-width: 340px; }
.filter form input { flex: 1 1 auto; min-width: 0; }
.blaettern { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--leise); font-size: 13px; margin-bottom: 20px; }

/* Meldungen */
.meldung { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 14px; padding: 12px 14px; margin-bottom: 20px; }
.meldung.fehler { border-color: var(--akzent); background: #FBF3EA; }
.meldung ul { margin: 0; padding-left: 18px; }

/* Rechnungsformular */
.einschub { border: 1px solid var(--rand); border-radius: 16px; padding: 18px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; }
.positionsrahmen { overflow-x: auto; position: relative; border: 1px solid var(--linie); border-radius: 14px; }
.positionen { min-width: 900px; }
.positionen th { padding: 12px 8px; }
.positionen td { padding: 10px 8px; }
.positionen th:first-child, .positionen td:first-child { padding-left: 14px; }
.positionen input, .positionen select { padding: 0 10px; }
.positionen textarea { margin-top: 6px; min-height: 44px; font-size: 14px; color: var(--leise); }
.positionen .spalte_menge { width: 84px; } .positionen .spalte_einheit { width: 128px; } .positionen .spalte_preis { width: 112px; }
.positionen .spalte_rabatt { width: 84px; } .positionen .spalte_satz { width: 92px; } .positionen .spalte_summe { width: 110px; } .positionen .spalte_weg { width: 52px; }
.positionen.steuerfrei .spalte_satz, .positionen.steuerfrei td[data-titel="USt."] { display: none; }
.positionen .preis, .positionen .rabatt { text-align: right; }
.positionen .zeilensumme { padding-top: 20px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.positionen .gedimmt { color: var(--leise); }
.unter_positionen { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; }
.summenblock { flex: 0 1 380px; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.summenblock > div { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.summenblock .rabattzeile { gap: 8px; }
.summenblock .rabattzeile label { flex: 1 1 auto; }
.summenblock .rabattzeile input { width: 76px; text-align: right; padding: 0 10px; }
.summenblock .rabattzeile select { width: 66px; padding: 0 8px; }
.summenblock .rabattzeile span { width: 96px; text-align: right; white-space: nowrap; }
.summenblock .gesamt { border-top: 1px solid var(--text); padding-top: 10px; font-weight: 500; font-size: 17px; }
.summenblock .gesamt span:last-child { font-family: var(--titel); font-size: 30px; line-height: 1; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
#summe_steuer { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
#summe_steuer > div { display: flex; justify-content: space-between; gap: 16px; }

/* Vorschau und Rechnungsansicht */
.vorschau { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--linie); border-radius: 20px; background: #fff; display: block; margin-bottom: 12px; }
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.daten dt { color: var(--leise); }
dl.daten dd { margin: 0; }
.zwei { display: flex; flex-wrap: wrap; gap: 20px; }
.zwei > * { flex: 1 1 280px; min-width: 0; }
.summen_ansicht { margin-left: auto; width: min(100%, 360px); display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; padding: 16px; }
.summen_ansicht > div { display: flex; justify-content: space-between; gap: 16px; }
.summen_ansicht .gesamt { border-top: 1px solid var(--text); padding-top: 10px; font-weight: 500; font-size: 17px; }
.logofeld { width: 227px; height: 110px; border: 1px solid var(--linie); border-radius: 12px; padding: 8px; display: flex; align-items: center; justify-content: center; color: var(--leise); font-size: 13px; overflow: hidden; background: #fff; flex: none; }
.logofeld img { max-width: 100%; max-height: 100%; }

.katalogfeld { max-width: 420px; }
.reihe.mittig { align-items: center; }
.logoseite { flex: 1 1 280px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.logoseite input[type=file] { flex: 1 1 220px; width: auto; min-width: 0; }

/* Anmeldung, Einrichtung, Fehlerseiten */
.schmal { max-width: 432px; margin: 0 auto; padding: 96px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
/* Anmeldung: zweigeteilt wie die Website */
.anmeldung { display: flex; flex-wrap: wrap; min-height: 100vh; }
.anmeldung .buehne { flex: 1 1 420px; box-sizing: border-box; padding: 64px 56px; background: var(--kopf); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.anmeldung .buehne h1 { font-size: 52px; }
.anmeldung .buehne p { font-weight: 300; font-size: 18px; color: #4E463D; max-width: 420px; }
.anmeldung .formular { flex: 1 1 420px; box-sizing: border-box; padding: 64px 24px; display: flex; align-items: center; justify-content: center; }
.anmeldung .formular > div { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 20px; }
.anmeldung .marke { padding: 0; font-size: 40px; }
.anmeldung .marke img { width: 170px; }
.formular-feld { display: flex; flex-direction: column; gap: 16px; }
.formular-feld .knopf { width: 100%; }
.formular-feld > a { align-self: center; padding: 10px 0; color: var(--akzent); }
.schmal.breit { max-width: 672px; padding-top: 48px; }
.schmal .karte { margin-bottom: 0; gap: 16px; }
.schmal .meldung { margin-bottom: 0; }
.pruefliste { list-style: none; padding: 0; margin: 0; }
.pruefliste li { padding: 3px 0; }

/* Tablet und Handy */
@media (max-width: 900px) {
  .seitenleiste { flex-basis: 100%; min-width: 0; max-width: 100%; border-right: 0; border-bottom: 1px solid var(--linie); padding: 12px; gap: 8px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .marke { padding: 0 6px; }
  .marke small { display: none; }
  .marke { font-size: 26px; }
  .marke img { width: 76px; }
  .nav { flex-direction: row; overflow-x: auto; order: 3; width: 100%; min-width: 0; }
  .nav a { white-space: nowrap; }
  .nav .trenner { width: 1px; height: auto; margin: 6px 6px; flex: none; }
  .konto { margin: 0 0 0 auto; flex-direction: row; gap: 14px; align-items: center; }
  .inhalt { padding: 22px 14px 48px; }
  h1 { font-size: 32px; }
  .anmeldung .buehne { padding: 36px 20px; }
  .anmeldung .buehne h1 { font-size: 38px; }
  .s2, .s3, .s4 { grid-column: span 6; }
  .s6, .s8 { grid-column: span 12; }
  .filter form { max-width: none; }
  .vorschau { height: 70vh; }
}
/* Positionen auf schmalen Bildschirmen: jede Position als Block statt als breite Tabelle */
@media (max-width: 760px) {
  .positionen { min-width: 0; display: block; }
  .positionen thead { display: none; }
  .positionen tbody { display: block; }
  .positionen tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; padding: 14px 12px; border-bottom: 1px solid var(--linie); }
  .positionen tbody tr:last-child { border-bottom: 0; }
  .positionen td, .positionen td:first-child { display: block; padding: 0; border: 0; }
  .positionen td:first-child { grid-column: 1 / -1; }
  .positionen td[data-titel]::before { content: attr(data-titel); display: block; font-size: 12px; color: var(--leise); margin-bottom: 2px; }
  .positionen td.zeilensumme { grid-column: 1 / 3; text-align: left; padding-top: 0; font-weight: 600; align-self: center; }
  .positionen td.zelle_weg { grid-column: 3; justify-self: end; align-self: end; }
  .positionen .preis, .positionen .rabatt { text-align: left; }
}
@media (max-width: 520px) {
  .s2, .s3, .s4 { grid-column: span 12; }
  .schmal { padding-top: 40px; }
}
@media print { .seitenleiste, .aktionen { display: none; } }

/* E-Mail */
.angaben { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; margin: 0; }
.angaben dt { color: var(--leise); }
.angaben dd { margin: 0; overflow-wrap: anywhere; }
.mailtext { border-top: 1px solid var(--linie); padding-top: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.anhang { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--linie); border-radius: 12px; background: var(--bg); width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.anhang-symbol { font-size: 10px; letter-spacing: 1px; font-weight: 500; color: var(--flaeche); background: var(--gold); border-radius: 6px; padding: 3px 6px; }
.warnung { color: #9B3B2E; }
.platzhalter summary { cursor: pointer; color: var(--akzent); }
.platzhalter .angaben { margin-top: 10px; }
.mailverlauf { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .angaben { grid-template-columns: minmax(0, 1fr); gap: 2px; } .angaben dd { margin-bottom: 8px; } }

/* ---------- Postfach (wie Outlook: Ordner | Liste | Lesebereich) ---------- */
.inhalt:has(> .post) { padding: 20px 20px 20px; }
.inhalt > .post { max-width: none; }
.post { display: grid; grid-template-columns: 220px minmax(300px, 380px) minmax(0, 1fr); height: calc(100vh - 40px); min-height: 520px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px; overflow: hidden; }
.post > * { min-width: 0; min-height: 0; }
.post-ordner { border-right: 1px solid var(--linie); padding: 16px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.post-neu { width: 100%; }
.post-konto-name { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--leise); padding: 0 10px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-ordnerliste { display: flex; flex-direction: column; gap: 1px; }
.post-ordnerlink { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); line-height: 1.3; }
.post-ordnerlink:hover { background: var(--kopf); text-decoration: none; }
.post-ordnerlink.aktiv { background: var(--kopf); font-weight: 500; }
.post-ordnerlink.fett .post-ordnertext { font-weight: 600; }
.post-ordnerlink[data-tiefe="1"] { padding-left: 26px; } .post-ordnerlink[data-tiefe="2"] { padding-left: 42px; } .post-ordnerlink[data-tiefe="3"], .post-ordnerlink[data-tiefe="4"] { padding-left: 58px; }
.post-ordnertext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-zahl { font-size: 12px; font-weight: 600; color: var(--akzent); font-variant-numeric: tabular-nums; }
.post-ordnersymbol { width: 16px; height: 16px; flex: none; background: currentColor; opacity: .55; -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat; }
.post-rolle-inbox { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 13l3-8h12l3 8v6H3z'/%3E%3Cpath d='M3 13h5l1 3h6l1-3h5'/%3E%3C/svg%3E"); }
.post-rolle-drafts { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E"); }
.post-rolle-sent { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 11l18-8-8 18-2-8z'/%3E%3C/svg%3E"); }
.post-rolle-trash { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13'/%3E%3C/svg%3E"); }
.post-rolle-junk { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M6 6l12 12'/%3E%3C/svg%3E"); }
.post-rolle-archive { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 4h18v5H3zM5 9v11h14V9M10 13h4'/%3E%3C/svg%3E"); }
.post-rolle-ordner { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 6h6l2 2h10v11H3z'/%3E%3C/svg%3E"); }
.post-fehler { font-size: 13px; color: #9B3B2E; margin: 0 10px 8px; }
.post-ordneranlegen { margin-top: auto; font-size: 14px; }
.post-ordneranlegen summary { cursor: pointer; color: var(--akzent); padding: 4px 10px; }
.post-ordneranlegen form { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.post-ordneranlegen input { min-height: 40px; }
.post-protokoll { font-size: 13px; padding: 0 10px; }
.post-liste { border-right: 1px solid var(--linie); display: flex; flex-direction: column; overflow: hidden; }
.post-listenkopf { padding: 16px 16px 10px; border-bottom: 1px solid var(--linie); display: flex; flex-direction: column; gap: 10px; }
.post-titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.post-titelzeile h1 { font-size: 28px; }
.post-aktualisieren { font-size: 22px; line-height: 1; padding: 6px 10px; border-radius: 999px; color: var(--leise); }
.post-aktualisieren:hover { background: var(--kopf); text-decoration: none; }
.post-ordnerwahl { display: none; }
.post-suche input { width: 100%; min-height: 40px; }
.post-filter { display: flex; gap: 14px; align-items: baseline; font-size: 14px; }
.post-filter a { color: var(--leise); }
.post-filter a.aktiv { color: var(--text); font-weight: 600; }
.post-filter .leise { margin-left: auto; }
.post-sammel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--kopf); border-radius: 12px; padding: 8px; }
.post-sammel select { min-height: 36px; max-width: 150px; }
.post-sammel-zahl { font-size: 13px; font-weight: 600; margin-right: 4px; }
.post-meldung { margin: 12px; }
.post-eintraege { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.post-eintrag { display: flex; align-items: stretch; border-bottom: 1px solid var(--linie); position: relative; }
.post-eintrag > a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 11px 14px 11px 4px; color: var(--text); }
.post-eintrag > a:hover { text-decoration: none; }
.post-eintrag:hover { background: var(--bg); }
.post-eintrag.aktiv, .post-eintrag.gewaehlt { background: var(--kopf); }
.post-eintrag.ungelesen::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.post-eintrag.ungelesen .post-absender, .post-eintrag.ungelesen .post-betreff { font-weight: 600; }
.post-wahl { display: flex; align-items: flex-start; padding: 13px 8px 0 14px; cursor: pointer; }
.post-wahl input { width: 16px; height: 16px; accent-color: var(--akzent); }
.post-zeile1, .post-zeile2 { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.post-absender, .post-betreff { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-betreff { font-size: 14px; color: var(--leise); }
.post-eintrag.ungelesen .post-betreff { color: var(--text); }
.post-datum { font-size: 12px; color: var(--leise); white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-eintrag.ungelesen .post-datum { color: var(--akzent); font-weight: 600; }
.post-symbole { display: flex; gap: 6px; }
.post-symbole span { width: 13px; height: 13px; background: var(--leise); -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat; }
.post-sym-anhang { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M20 11l-8 8a5 5 0 01-7-7l9-9a3 3 0 015 5l-9 9a1 1 0 01-2-2l8-8'/%3E%3C/svg%3E"); }
.post-sym-antwort { --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 7L4 12l6 5M4 12h11a5 5 0 015 5v2'/%3E%3C/svg%3E"); }
.post-symbole .post-sym-flagge { background: #B4492F; --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h2v18H5zM7 4h12l-3 5 3 5H7z'/%3E%3C/svg%3E"); }
.post-seiten { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 12px; border-top: 1px solid var(--linie); }
.post-lesen { overflow-y: auto; padding: 18px 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.post-leer { margin: auto; text-align: center; color: var(--leise); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.post-leer-symbol { width: 56px; height: 56px; background: var(--rand); -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat; --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.post-zurueck { display: none; }
.post-werkzeuge { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-werkzeuge .inline { display: inline-flex; gap: 6px; }
.post-werkzeuge select { min-height: 36px; max-width: 160px; }
.post-trenner { width: 1px; align-self: stretch; background: var(--linie); margin: 0 4px; }
.post-betreff-gross { font-size: 28px; overflow-wrap: anywhere; }
.post-kopf { display: flex; gap: 12px; align-items: flex-start; }
.post-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--kopf); color: var(--akzent); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 17px; }
.post-kopftext { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.post-kopfdatum { font-size: 13px; white-space: nowrap; }
.post-bilderhinweis { background: var(--kopf); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.post-anhaenge { display: flex; flex-wrap: wrap; gap: 8px; }
.post-anhaenge .anhang { font-size: 14px; gap: 10px; }
.post-anhaenge .anhang a { font-size: 13px; }
.post-inhalt { width: 100%; flex: 1 0 420px; border: 1px solid var(--linie); border-radius: 14px; background: #fff; }
.wird-gesendet button[type=submit], .wird-gesendet .knopf { pointer-events: none; opacity: .6; }
.nav-zahl { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--gold); color: #fff; border-radius: 999px; padding: 1px 8px; }
.nav a:has(.nav-zahl) { display: flex; align-items: center; gap: 8px; }
.post-schreiben textarea#f_text { font-family: inherit; min-height: 320px; }

@media (max-width: 1180px) {
  .post { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
  .post-ordner { display: none; }
  .post-ordnerwahl { display: block; width: 100%; min-height: 40px; }
}
@media (max-width: 860px) {
  .inhalt:has(> .post) { padding: 12px 10px 24px; }
  .post { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; border-radius: 16px; }
  .post-liste { border-right: 0; }
  .post-eintraege { overflow: visible; }
  .post.post-offen .post-liste { display: none; }
  .post:not(.post-offen) .post-lesen { display: none; }
  .post-lesen { padding: 14px 14px 20px; overflow: visible; }
  .post-zurueck { display: inline-block; }
  .post-inhalt { flex-basis: auto; height: 70vh; }
  .post-trenner { display: none; }
}
.post-mehr { position: relative; }
.post-mehr summary { list-style: none; }
.post-mehr summary::-webkit-details-marker { display: none; }
.post-mehr summary::after { content: "▾"; margin-left: 6px; font-size: 11px; }
.post-mehr-inhalt { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; box-shadow: 0 10px 30px rgba(61, 54, 46, .12); padding: 8px; min-width: 240px; display: flex; flex-direction: column; gap: 2px; }
.post-mehr-inhalt .inline { display: block; }
.post-mehr-inhalt .textknopf { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--text); }
.post-mehr-inhalt .textknopf:hover { background: var(--kopf); }
.post-verschieben { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 6px; border-top: 1px solid var(--linie); margin-top: 4px; font-size: 13px; }
.post-verschieben select { min-height: 38px; }
@media (max-width: 860px) { .post-mehr-inhalt { right: auto; left: 0; } }

/* ================= Version 1.4: Kalender, Content, Mail-Verfolger ================= */
/* Terminkalender */
.inhalt:has(> .kal) { padding: 20px; }
.inhalt > .kal { max-width: none; }
.kal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.kal > * { min-width: 0; }

.kal-seite { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 20px; }
.kal-neu { width: 100%; }
.kal-klein-titel { font-family: "Jost", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 1.8px; text-transform: uppercase; color: var(--leise); margin: 0 0 8px; }

.kal-monat { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 12px; }
.kal-monat-kopf { display: flex; align-items: center; justify-content: space-between; font-weight: 500; margin-bottom: 6px; }
.kal-monat-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.kal-monat-wt { font-size: 11px; color: var(--leise); padding: 4px 0; }
.kal-monat-tag { border: 0; background: none; font: inherit; font-size: 13px; height: 30px; border-radius: 999px; cursor: pointer; color: var(--text); position: relative; font-variant-numeric: tabular-nums; }
.kal-monat-tag:hover { background: var(--bg); }
.kal-monat-tag.fremd { color: #B5AB9C; }
.kal-monat-tag.sichtbar { background: var(--kopf); }
.kal-monat-tag.heute { background: var(--dunkel); color: #fff; font-weight: 600; }
.kal-monat-tag.belegt::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
.kal-monat-tag.heute.belegt::after { background: #fff; }

.kal-heute-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kal-heute-eintrag { display: flex; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; line-height: 1.35; }
.kal-heute-eintrag:hover { border-color: var(--rand); }
.kal-heute-zeit { font-weight: 600; color: var(--akzent); font-variant-numeric: tabular-nums; min-width: 42px; }
.kal-quellen ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--leise); }
.kal-einst-link { align-self: flex-start; font-size: 14px; }

.kal-marke { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 6px; font-size: 10px; font-weight: 600; letter-spacing: .5px; background: var(--kopf); color: var(--leise); }
.kal-marke.tw { background: var(--gold); color: #fff; }

.kal-haupt { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.kal-leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--linie); }
.kal-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.kal-titel { font-size: 26px; margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-pfeil { border: 1px solid var(--rand); background: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--text); }
.kal-pfeil:hover { background: var(--bg); }
.kal-pfeil.klein { width: 28px; height: 28px; font-size: 16px; border-color: transparent; }
.kal-ansicht a { padding: 8px 16px; }

.kal-import { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 18px; background: var(--kopf); font-size: 14px; border-bottom: 1px solid var(--linie); }

.kal-rahmen { overflow: auto; max-height: calc(100vh - 170px); position: relative; }
.kal-raster { --spalten: 6; min-width: calc(56px + var(--spalten) * 130px); }
.kal-tagesansicht .kal-raster { min-width: 0; }
.kal-kopfzeile { display: grid; grid-template-columns: 56px repeat(var(--spalten), minmax(0, 1fr)); position: sticky; top: 0; z-index: 3; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kal-tagkopf { border: 0; background: none; font: inherit; color: var(--text); padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 0; cursor: pointer; border-left: 1px solid var(--linie); }
.kal-tagkopf:hover { background: var(--bg); }
.kal-wt { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--leise); }
.kal-dz { font-family: var(--titel); font-size: 26px; font-weight: 600; line-height: 1.1; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.kal-tagkopf.heute .kal-dz { background: var(--dunkel); color: #fff; }
.kal-tagkopf.heute .kal-wt { color: var(--akzent); font-weight: 600; }
.kal-anz { font-size: 11px; color: var(--leise); }

.kal-koerper { display: grid; grid-template-columns: 56px repeat(var(--spalten), minmax(0, 1fr)); height: var(--hoehe); position: relative;
  background-image: linear-gradient(to bottom, var(--linie) 1px, transparent 1px), linear-gradient(to bottom, #F1EBE0 1px, transparent 1px);
  background-size: 100% 60px, 100% 30px; background-position: 0 0, 0 0; }
.kal-zeiten { position: relative; background: var(--flaeche); }
.kal-zeit { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--leise); font-variant-numeric: tabular-nums; background: var(--flaeche); padding: 0 2px; }
.kal-zeit:first-child { transform: none; top: 2px !important; }
.kal-spalte { position: relative; border-left: 1px solid var(--linie); cursor: copy; }
.kal-spalte.ziel { background: rgba(176, 141, 79, .06); }
.kal-zu { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, rgba(61, 54, 46, .035) 0 6px, transparent 6px 12px); pointer-events: none; }
.kal-jetzt { position: absolute; left: -1px; right: 0; height: 2px; background: #B4492F; z-index: 2; pointer-events: none; }
.kal-jetzt::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #B4492F; }

.kal-termin { position: absolute; z-index: 1; display: flex; flex-direction: column; gap: 1px; align-items: stretch; text-align: left; overflow: hidden; padding: 5px 8px 4px; border: 1px solid var(--rand); border-left: 3px solid var(--gold); border-radius: 10px; background: #FBF6EC; color: var(--text); font: inherit; font-size: 12.5px; line-height: 1.3; cursor: grab; touch-action: none; user-select: none; box-shadow: 0 1px 2px rgba(61, 54, 46, .05); }
.kal-termin:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(61, 54, 46, .1); z-index: 2; }
.kal-termin:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.kal-termin.abgerechnet { background: #F6F3EE; border-left-color: #C9BDA8; color: var(--leise); }
.kal-termin.storniert { background: repeating-linear-gradient(-45deg, #FAF8F4 0 6px, #F3EFE8 6px 12px); border-left-color: #C9BDA8; color: #9B9183; text-decoration: line-through; cursor: pointer; }
.kal-termin.neu:not(.storniert) { box-shadow: 0 0 0 2px rgba(176, 141, 79, .35); }
.kal-termin.zieht { opacity: .85; cursor: grabbing; z-index: 5; box-shadow: 0 10px 26px rgba(61, 54, 46, .2); }
.kal-t-kopf { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.kal-t-zeit { font-weight: 600; font-variant-numeric: tabular-nums; }
.kal-t-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-t-beh { color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-termin.kurz { flex-direction: row; align-items: flex-start; gap: 6px; padding-top: 4px; padding-bottom: 2px; }
.kal-termin.kurz .kal-t-name { flex: 1; min-width: 0; }
.kal-termin.kurz .kal-marke { flex: none; }
.kal-t-neu { position: absolute; right: 6px; bottom: 4px; font-size: 10px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--akzent); }
.kal-tagesansicht .kal-termin { font-size: 14px; padding: 6px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; align-content: start; }
.kal-tagesansicht .kal-termin .kal-t-zeile2 { grid-column: 1 / -1; }
.kal-tagesansicht .kal-termin.kurz { display: flex; }

/* Schublade rechts */
.kal-schleier { position: fixed; inset: 0; background: rgba(61, 54, 46, .18); z-index: 20; }
.kal-schublade { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--flaeche); z-index: 21; box-shadow: -10px 0 40px rgba(61, 54, 46, .15); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.kal-schublade-kopf { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; border-bottom: 1px solid var(--linie); }
.kal-schublade-kopf h2 { font-size: 28px; }
.kal-schliessen { border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--leise); width: 40px; height: 40px; border-radius: 50%; }
.kal-schliessen:hover { background: var(--bg); }
.kal-schublade-inhalt { padding: 18px 24px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.kal-daten { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.kal-daten dt { color: var(--leise); font-size: 14px; }
.kal-daten dd { margin: 0; }
.kal-etikett { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--kopf); color: var(--leise); }
.kal-etikett.gold { background: var(--gold); color: #fff; }
.kal-info { background: var(--bg); border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0; }
.kal-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.kal-rueckfrage { border-top: 1px solid var(--linie); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.kal-rueckfrage p { margin: 0; }
.kal-form { display: flex; flex-direction: column; gap: 14px; }
.kal-form select, .kal-form input, .kal-form textarea { width: 100%; }
.kal-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kal-warnung { background: #FBF1E6; border: 1px solid #E8CFAE; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.kal-importliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kal-import-eintrag { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; border: 1px solid var(--linie); border-radius: 14px; background: #fff; padding: 12px 14px; font: inherit; color: var(--text); cursor: pointer; }
.kal-import-eintrag:hover { border-color: var(--rand); background: var(--bg); }
.kal-import-eintrag .kal-etikett { margin-bottom: 4px; }
.kal-einst { display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--linie); padding-bottom: 16px; }
.kal-einst h3 { font-family: var(--titel); font-size: 22px; margin: 0; }
.kal-einst p { margin: 0; }
.kal-schalter { display: flex; gap: 10px; align-items: center; }
.kal-schalter input { width: 18px; height: 18px; accent-color: var(--akzent); }
.kal-link { display: flex; gap: 8px; }
.kal-link input { flex: 1; min-width: 0; font-size: 13px; }

.kal-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--dunkel); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 40; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }

@media (max-width: 1100px) {
  .kal { grid-template-columns: minmax(0, 1fr); }
  .kal-seite { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
  .kal-neu { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .inhalt:has(> .kal) { padding: 12px 10px 24px; }
  .kal-haupt { order: -1; }
  .kal-seite .kal-monat, .kal-quellen, .kal-heute { display: none; }
  .kal-seite { display: flex; }
  .kal-neu { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: auto; z-index: 15; box-shadow: 0 8px 24px rgba(61, 54, 46, .25); }
  .kal-titel { font-size: 20px; }
  .kal-leiste { padding: 12px; }
  .kal-rahmen { max-height: none; }
  .kal-raster { min-width: calc(56px + var(--spalten) * 110px); }
  .kal-zwei { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .kal-termin { transition: none; } }

.kal-wer { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 14px; }
.kal-wer span { color: var(--leise); }
.kal-wer label { display: flex; gap: 6px; align-items: center; }
.kal-wer input { accent-color: var(--akzent); }
.kal-einschub { display: flex; flex-direction: column; gap: 10px; background: var(--bg); border: 1px solid var(--linie); border-radius: 14px; padding: 12px; }
.kal-einschub[hidden] { display: none; }
/* ---------- Herkunft der Termine ---------- */
.kal-marke.q-google { background: #E4EAF3; color: #3F5677; }
.kal-marke.q-manuell { background: var(--kopf); color: var(--leise); }
.kal-marke.q-hinano { background: #5E7D5A; color: #fff; }
.kal-termin.q-google { border-left-color: #7E93B3; }
.kal-termin.q-manuell { border-left-color: #BFB29C; }
.kal-termin.q-hinano { border-left-color: #5E7D5A; background: #F1F5EF; }
.kal-termin.q-hinano.abgerechnet { background: #F4F6F2; }
.kal-quellen ul li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.kal-quellen .kal-marke { margin-top: 1px; }
.kal-q-text { display: flex; flex-direction: column; line-height: 1.3; }
.kal-q-text strong { color: var(--text); font-weight: 500; }
.kal-q-text .leise { font-size: 12px; }
.kal-q-zahl { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; min-width: 20px; text-align: right; }
.kal-klein-titel .leise { font-family: "Jost", sans-serif; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }

/* ---------- Content ---------- */
.c-einleitung { margin: -8px 0 16px; max-width: 760px; }
.c-reiter { margin-bottom: 16px; }
.c-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.c-liste { padding: 10px 10px 14px; position: sticky; top: 16px; }
.c-liste ul { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.c-gruppe { font-family: "Jost", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--akzent); margin: 14px 10px 6px; }
.c-eintrag { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 9px 12px; font: inherit; color: var(--text); cursor: pointer; line-height: 1.3; }
.c-eintrag .leise { font-size: 12px; }
.c-eintrag:hover { background: var(--bg); }
.c-eintrag.aktiv { background: var(--kopf); }
.c-eintrag.aktiv strong { font-weight: 600; }
.c-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.c-kopf .eyebrow { margin-bottom: 2px; }
.c-wo { font-size: 13px; color: var(--leise); background: var(--bg); border: 1px solid var(--linie); border-radius: 999px; padding: 4px 12px; }
.c-platz { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.c-platz-titel { font-size: 13px; color: var(--leise); margin-right: 4px; }
.c-chip { display: inline-flex; gap: 6px; align-items: baseline; border: 1px solid var(--rand); background: var(--flaeche); border-radius: 999px; padding: 4px 10px; font: 500 13px "Jost", sans-serif; color: var(--akzent); cursor: pointer; }
.c-chip span { color: var(--leise); font-weight: 400; font-size: 12px; }
.c-chip:hover { border-color: var(--gold); background: var(--bg); }
.c-loeschen { margin-left: auto; color: #A2402A; }
.c-mailkopf { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 14px; }
.c-mailkopf dt { color: var(--leise); }
.c-mailkopf dd { margin: 0; font-weight: 500; }
.c-mailrahmen, .c-sigrahmen, .sig-rahmen { width: 100%; border: 1px solid var(--linie); border-radius: 14px; background: #fff; display: block; }
.c-mailrahmen { height: 420px; }
.c-sigrahmen { height: 180px; }
.c-sig-optionen { display: flex; flex-direction: column; gap: 8px; }
.c-sig-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.c-code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; white-space: pre; background: #FCFAF6; }
.c-label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; }
.c-sig-hinweise { margin-top: 14px; background: var(--bg); border: 1px solid var(--linie); border-radius: 14px; padding: 12px 16px; font-size: 13.5px; }
.c-sig-hinweise ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 900px) {
  .c-layout, .c-sig-raster { grid-template-columns: 1fr; }
  .c-liste { position: static; }
}

/* ---------- Schreibmasken: Signatur, Vorlagen, Tippfehler ---------- */
.sig-box { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; }
.sig-kopf { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--leise); flex-wrap: wrap; }
.sig-rahmen { height: 140px; }
.vorlage-reihe { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.vorlage-reihe select { flex: 1; min-width: 220px; }
.tippfehler { margin-top: 6px; font-size: 13.5px; background: #FBF3EA; border: 1px solid #E3C9A6; color: #6E4A1F; border-radius: 10px; padding: 7px 10px; }
.tippfehler .textknopf { font-weight: 600; text-decoration: underline; }
.nav-zahl.warn { background: #A2402A; }

/* ---------- Mail-Verfolger ---------- */
.v-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.v-kachel { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 16px 18px; font: inherit; color: var(--text); cursor: pointer; }
.v-kachel:hover { border-color: var(--rand); }
.v-kachel.aktiv { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.v-k-zahl { font-family: var(--titel); font-size: 34px; line-height: 1.1; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.v-k-titel { font-weight: 500; }
.v-k-info { font-size: 12.5px; color: var(--leise); }
.v-k-gescheitert .v-k-zahl { color: #A2402A; }
.v-leiste { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.v-suche { max-width: 280px; }
.v-anz { font-size: 12px; color: var(--leise); margin-left: 2px; }
.v-zeile { cursor: pointer; }
.v-zeile:hover td { background: var(--bg); }
.v-zeile:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
.v-zeile.v-fehler td { background: #FCF4F0; }
.v-zeile.v-fehler:hover td { background: #F9ECE5; }
.v-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; }
.v-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.v-status.unterwegs { background: #EEF0F3; color: #5A6573; }
.v-status.zugestellt { background: #E9F1E7; color: #3F6B3A; }
.v-status.geoeffnet { background: #F4ECDD; color: #7A5A22; }
.v-status.gescheitert { background: #F8E3DC; color: #A2402A; }
.v-grund { color: #A2402A; font-weight: 500; }
.v-leer { padding: 18px; margin: 0; }
.v-warn { display: block; }
.v-erklaerung { display: block; padding: 18px 28px; }
.v-erklaerung summary { cursor: pointer; font-weight: 500; }
.v-erklaerung[open] summary { margin-bottom: 10px; }
.v-erklaerung p { margin: 12px 0 0; }
.v-erklaerung .angaben { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; margin: 6px 0 0; }
.v-erklaerung dd { margin: 0; }
.v-h3 { font-family: var(--titel); font-size: 22px; margin: 4px 0 0; }
.v-verlauf { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--linie); display: flex; flex-direction: column; gap: 12px; }
.v-verlauf li { position: relative; display: flex; flex-direction: column; font-size: 14px; }
.v-verlauf li span { color: var(--leise); font-size: 13px; }
.v-verlauf li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #3F6B3A; border: 2px solid var(--flaeche); }
.v-verlauf li.gold::before { background: var(--gold); }
.v-verlauf li.laeuft::before { background: #8A94A3; }
.v-verlauf li.fehler::before { background: #A2402A; }
.v-verlauf li.fehler strong { color: #A2402A; }
.v-fehlerbox { background: #FCF4F0; border: 1px solid #EBC7B9; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.v-fehlerbox p { margin: 0; font-size: 14px; }
.v-fehlerbox code { font-size: 12px; }
.v-recht { background: #FBF3EA; border: 1px solid #E3C9A6; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.v-recht p { margin: 4px 0 0; }
@media (max-width: 900px) {
  .v-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-erklaerung .angaben { grid-template-columns: 1fr; }
  .v-suche { max-width: none; width: 100%; }
}
@media (max-width: 700px) {
  .v-tabelle thead { display: none; }
  .v-tabelle, .v-tabelle tbody, .v-tabelle tr, .v-tabelle td { display: block; width: auto; }
  .v-tabelle tr { padding: 12px 16px; border-bottom: 1px solid var(--linie); }
  .v-tabelle tr td { padding: 2px 0; border: 0; background: none; }
  .v-tabelle tr.v-fehler { background: #FCF4F0; }
  .v-tabelle td:nth-child(4), .v-tabelle td:nth-child(5) { display: inline; font-size: 13px; color: var(--leise); }
  .v-tabelle td:nth-child(4)::after { content: " · "; }
}

/* Ergänzungen der echten App */
.kal-laden { padding: 8px 18px; font-size: 13px; color: var(--leise); border-bottom: 1px solid var(--linie); background: var(--bg); }
.kal-toast.fehler { background: #A2402A; }
.kal-form .feld[hidden], .feld[hidden] { display: none; }
.c-eintrag { text-decoration: none; }
.c-eintrag:hover { text-decoration: none; }
.c-liste .c-gruppe { margin-top: 10px; }
.c-vorschau-karte .c-mailrahmen { height: 460px; }
.sig-rahmen { height: 170px; }
.v-kachel { text-decoration: none; }
.v-kachel:hover { text-decoration: none; }
.v-kachel.aus { cursor: default; color: var(--leise); }
.v-kachel.aus .v-k-zahl { font-size: 26px; }
a.v-status { text-decoration: none; }
.v-suche input { max-width: 280px; }
.v-neu { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.zwei-spalten { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.zwei-spalten > .karte { margin-bottom: 0; }
.liste-punkte { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.vorlage-feld select { width: auto; }
.tippfehler[hidden] { display: none; }
.nav a .nav-zahl.warn { background: #A2402A; }
@media (max-width: 900px) {
  .zwei-spalten { grid-template-columns: 1fr; }
  .v-suche input { max-width: none; width: 100%; }
  .v-suche { width: 100%; }
}
