/* quik Sites: Postfach der Website (public/js/inbox.js). Ergänzt die Stile der Anfragen (.inq-*, .inbox-list in app.css).
   Nur Variablen aus app.css (hell und dunkel), keine festen Farben. */

/* Werkzeuge über der Liste: Suche und Arten nebeneinander, Status darunter */
.pf-tools { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px; }
.pf-tools .ct-search { flex: 1 1 auto; width: auto; min-width: 0; }
.pf-tools:not(.suche) .ct-search, .pf-tools:not(.suche) .pf-suche-zu, .pf-tools.suche .pf-arten, .pf-tools.suche .pf-suche-btn { display: none; }
.pf-arten { flex: 1 1 auto; min-width: 0; }
.pf-seg { display: flex; flex-wrap: nowrap; }
.pf-seg > button { flex: 1 1 auto; }
.pf-suche-btn, .pf-suche-zu { flex: none; }
.pf-seg > button { padding-inline: 8px; gap: 4px; }
.pf-seg > button > .tab-n { min-width: 16px; height: 16px; padding: 0 4px; font-size: var(--fs-2xs); }
.inq-seg .seg > button { padding-inline: 8px; white-space: nowrap; }

/* Zeile der Liste */
.pf-art { display: inline-flex; flex: none; color: var(--ink-faint); }
.pf-clip { display: inline-flex; flex: none; color: var(--ink-faint); }
.pf-offen { flex: none; display: inline-flex; justify-content: center; width: 14px; margin-top: 10px; color: var(--ink-faint); }
/* Zeichen rechts (neu, offen, nichts) immer gleich breit: die Zeiten stehen in einer Spalte */
.inq-row > .inq-dot { margin-left: 3px; margin-right: 3px; }
.pf-leer { flex: none; width: 14px; }
.pf-av-s { flex: none; width: 22px; height: 22px; font-size: var(--fs-2xs); background: var(--surface-3); color: var(--ink-soft); }
.inq-row > .pf-av-s { margin-top: 6px; }

/* Vorgang: Kopf */
.pf-card { gap: 14px; }
.pf-card .inq-head { gap: 10px; }
.pf-card .inq-head-s { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-card .inq-head-s .ic { flex: none; }
.pf-card .inq-head-s > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pf-card .inq-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
.pf-st { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font: inherit; font-size: var(--fs-sm); font-weight: 550; cursor: pointer; }
.pf-st:hover { background: var(--hover); }
.pf-st:focus-visible, .pf-zu:focus-visible, .pf-chip-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pf-st > i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.pf-st.info > i { background: var(--accent); }
.pf-st.warn > i { background: var(--orange-dot); }
.pf-st.ok > i { background: var(--green-dot); }
.pf-st > .ic { color: var(--ink-faint); }
.pf-zu { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 1px dashed var(--line-strong); border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
.pf-zu.on { border: 0; }
.pf-zu:hover { color: var(--fg); border-color: var(--ink-soft); }
.pf-wunsch { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); }

/* Unterhaltung */
.pf-thread { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pf-msg { max-width: min(640px, 92%); min-width: 0; padding: 10px 14px 12px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--bg-2); }
.pf-msg.ein { align-self: flex-start; border-top-left-radius: 4px; }
.pf-msg.aus { align-self: flex-end; border-top-right-radius: 4px; background: var(--accent-soft); border-color: transparent; }
.pf-msg.notiz, .pf-msg.entwurf { align-self: stretch; max-width: none; background: none; border-style: dashed; border-color: var(--line-strong); }
.pf-msg.entwurf { display: flex; flex-direction: column; gap: 8px; }
.pf-msg.warn { border-color: var(--orange-line); background: var(--orange-tint); }
.pf-msg-h { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 4px; font-size: var(--fs-xs); color: var(--ink-faint); }
.pf-msg-h > b { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-soft); font-weight: 600; }
.pf-msg-h > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-msg-h > .ic, .pf-msg-h > span > .ic { flex: none; }
.pf-msg-t { margin-left: auto; flex: none; }
.pf-msg-x { flex: none; width: 22px; height: 22px; min-height: 0; opacity: 0; }
.pf-msg:hover .pf-msg-x, .pf-msg-x:focus-visible { opacity: 1; }
@media (hover: none) { .pf-msg-x { opacity: 1; } }
.pf-msg-b { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-base); line-height: 1.55; }
.pf-msg-w { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: var(--fs-sm); color: var(--orange-ink); }
.pf-msg-n { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 8px 0 0; font-size: var(--fs-xs); color: var(--ink-faint); }
.pf-msg-n > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-seite { padding: 1px 8px; border-radius: 999px; background: var(--surface-3); }
.pf-kv { grid-template-columns: fit-content(150px) minmax(0, 1fr); gap: 4px 14px; margin: 2px 0 6px; font-size: var(--fs-sm); }
.pf-kv dt { color: var(--ink-faint); }
.pf-kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.pf-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pf-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: var(--fs-sm); text-decoration: none; }
.pf-file:hover { background: var(--hover); }
.pf-file > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-file > small { flex: none; color: var(--ink-faint); }
.pf-file > .ic { flex: none; color: var(--ink-faint); }

/* Antwort oder Notiz */
.pf-compose { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pf-compose.notiz { border-style: dashed; border-color: var(--line-strong); }
.pf-compose:focus-within { border-color: var(--ink-soft); }
.pf-ta { width: 100%; min-height: 84px; padding: 4px 6px; border: 0; background: none; box-shadow: none; resize: vertical; font: inherit; line-height: 1.5; }
.pf-ta:focus { outline: none; box-shadow: none; }
.pf-compose-f { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf-compose-f .btn { flex: none; white-space: nowrap; }
.pf-modus { flex: none; }
.pf-modus > button { padding-inline: 9px; }
.pf-modus > button:disabled { opacity: .4; cursor: not-allowed; }
/* Handy: Hauptknopf in beiden Arten (Antwort, Notiz) in voller Breite in einer eigenen Zeile */
@media (max-width: 420px) { .pf-compose-f { flex-wrap: wrap; } .pf-compose-f .btn-primary { flex: 1 1 100%; min-height: 40px; } }

/* Dialog „Adresse“ */
.pf-adr { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pf-adr-top { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pf-adr .copy-row { min-width: 0; flex-wrap: nowrap; }
.pf-adr .copy-row .input { min-width: 0; flex: 1 1 0; font-family: var(--font); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; font-feature-settings: var(--code-ff); }
.pf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: pf; }
.pf-step { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 14px 8px 12px; border-radius: 12px; background: var(--surface-2); text-align: center; font-size: var(--fs-sm); line-height: 1.35; color: var(--ink-soft); overflow-wrap: anywhere; }
.pf-step-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--fg); }
@media (max-width: 480px) { .pf-steps { grid-template-columns: minmax(0, 1fr); } .pf-step { flex-direction: row; text-align: left; padding: 10px 12px; } }
.pf-set { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.pf-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.pf-set-row.col { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
.pf-set-row:last-child { border-bottom: 0; }
.pf-set-t { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-base); }
.pf-set-t > .ic { flex: none; color: var(--ink-faint); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 6px 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-sm); }
.pf-chip > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-chip-x { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
.pf-chip-x:hover { background: var(--hover); color: var(--fg); }
.pf-adr-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pf-adr-row > .copy-row { flex: 1 1 auto; min-width: 0; }
.pf-adr-row > .row-more { flex: none; opacity: 1; }

/* Dialog „So sieht die KI den Vorgang“ */
.pf-ki { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pf-ki-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.pf-ki-h > b { min-width: 0; overflow-wrap: anywhere; }
.pf-ki-e { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-ki-r { font-size: var(--fs-xs); color: var(--ink-faint); }
.pf-ki .msg-body { overflow-wrap: anywhere; }

/* Zeile in den Einstellungen der Website */
.pf-set-adr { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.pf-set-adr > code { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-sm); }

/* Schmale Fenster (Seitenleiste plus zwei Spalten passen nicht): erst die Liste, dann der Vorgang mit „Zurück“ */
.pf-detail { min-width: 0; }
.pf-compose-f { flex-wrap: wrap; }
@media (max-width: 1180px) {
  .pf-page .split.inbox { grid-template-columns: minmax(0, 1fr); }
  .pf-page .split.inbox.has-sel > .inbox-list { display: none; }
  .pf-page .split.inbox:not(.has-sel) > div:last-child { display: none; }
  .pf-page .inq-back { display: inline-grid; }
  .pf-page .inbox-list { max-height: none; }
}
/* Kopf des Vorgangs: Status, Zuweisen und „⋯“ als Gruppe; am Handy in einer eigenen Zeile, damit der Name lesbar bleibt */
.pf-head-c { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 560px) {
  .pf-card .inq-head { flex-wrap: wrap; row-gap: 10px; }
  .pf-card .inq-head-t { flex: 1 1 0; }
  .pf-head-c { width: 100%; justify-content: flex-end; }
  /* Tippflächen: Status und Zuweisen mindestens 36 px hoch */
  .pf-st { height: 36px; padding: 0 12px; }
  .pf-zu { width: 36px; height: 36px; }
  /* Antwort und Notiz: Umschalter, „Erledigt“ und der Hauptknopf bleiben in einer Zeile */
  .pf-compose-f .btn { padding-inline: 12px; }
  .pf-modus > button { min-width: 40px; justify-content: center; }
}

/* Anfragen, Handy: „Formulare und Empfänger“ als Titel mit eigener Zeile darunter; E-Mail-Adressen brechen nicht mitten im Wort */
@media (max-width: 640px) {
  details.inq-check > summary > .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .inq-check-sep { display: none; }
  details.inq-check > summary > .grow > .sm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.inq-check-sep { color: var(--ink-soft); font-size: var(--fs-sm); }
@media (max-width: 640px) { .inq-seg .seg > button { min-width: 40px; } }

/* ================= Postfach des Teams über alle Kunden (public/js/postfach-marke.js, Zusammenarbeit) =================
   Ruhig wie ein gutes Mail-Programm: Liste links, Vorgang rechts; ein Signal je Zeile (Punkt für neu, Uhr für später,
   Kürzel für zugewiesen). Nur Variablen aus app.css (hell und dunkel). */
.pm { display: grid; grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.pm-liste { display: flex; flex-direction: column; min-width: 0; max-height: calc(100dvh - 300px); min-height: 420px; padding: 8px; overflow: hidden; }
.pm-kopf { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 2px 8px; }
.pm-fach { flex: none; }
.pm-fach > button { padding-inline: 10px; gap: 5px; white-space: nowrap; }
.pm-fach .tab-n { min-width: 16px; height: 16px; padding: 0 4px; font-size: var(--fs-2xs); }
.pm-suche { flex: 1 1 auto; width: auto; min-width: 0; }
.pm-suche .input { min-width: 0; }
.pm-filter { position: relative; flex: none; }
.pm-filter.on { background: var(--surface-2); color: var(--fg); }
.pm-filter.on::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pm-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 8px; }
.pm-chips[hidden], .pm-auswahl[hidden] { display: none; }
.pm-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; padding: 3px 4px 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-sm); }
.pm-chip > .ic { flex: none; color: var(--ink-faint); }
.pm-chip > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pm-chip > small { flex: none; color: var(--ink-faint); font-size: var(--fs-xs); }
.pm-chip-x { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
.pm-chip-x:hover { background: var(--hover); color: var(--fg); }
.pm-chip-x:focus-visible, .pm-zitat:focus-visible, .pm-set-bt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pm-auswahl { display: flex; align-items: center; gap: 8px; min-height: 40px; margin: 0 0 6px; padding: 4px 6px 4px 4px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); }
.pm-auswahl .btn { flex: none; white-space: nowrap; }
.pm-rows { display: flex; flex-direction: column; gap: 1px; min-height: 0; overflow: auto; overscroll-behavior: contain; }

/* Zeile */
.pm-row { position: relative; display: flex; align-items: flex-start; gap: 10px; min-height: 64px; padding: 10px 8px 10px 10px; border-radius: 12px; cursor: pointer; outline: none; }
.pm-row:hover { background: var(--hover); }
.pm-row.on { background: var(--surface-2); }
.pm-row.sel { background: var(--accent-soft); }
.pm-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.pm-lead { position: relative; flex: none; width: 34px; height: 34px; cursor: pointer; }
.pm-cbx { position: absolute; inset: 0; display: none; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: transparent; }
.pm-row:hover .pm-cbx, .pm-row.mit-cb .pm-cbx, .pm-cb:focus-visible + .pm-cbx { display: grid; }
.pm-row:hover .pm-lead > .av, .pm-row.mit-cb .pm-lead > .av { visibility: hidden; }
.pm-cb:checked + .pm-cbx { border-color: var(--fg); background: var(--fg); color: var(--surface); }
@media (hover: none) {
  .pm-row:hover .pm-cbx { display: none; }
  .pm-row:hover .pm-lead > .av { visibility: visible; }
  .pm-row.mit-cb .pm-cbx { display: grid; }
  .pm-row.mit-cb .pm-lead > .av { visibility: hidden; }
}
.pm-av { width: 34px; height: 34px; background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-xs); }
.pm-row.neu .pm-av { background: var(--accent-soft); color: var(--accent-ink); }
.pm-row.on .pm-av { background: var(--surface); }
.pm-av.spam { color: var(--orange-ink); }
.pm-av.lg { width: 44px; height: 44px; font-size: var(--fs-sm); background: var(--accent-soft); color: var(--accent-ink); }
.pm-av.lg.ref { background: var(--surface-2); color: var(--ink-soft); }
.pm-av.lg.spam { background: var(--surface-2); color: var(--orange-ink); }
.pm-row-t { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-row-h { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.pm-name { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 550; }
.pm-row.neu .pm-name { font-weight: 680; }
.pm-clip, .pm-warn { display: inline-flex; flex: none; align-self: center; color: var(--ink-faint); }
.pm-warn { color: var(--orange-ink); }
.pm-zeit { flex: none; margin-left: auto; padding-left: 6px; font-size: var(--fs-xs); color: var(--ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Erledigt und Später beim Überfahren statt der Zeit; am Touch-Gerät stehen beide Knöpfe im geöffneten Vorgang */
.pm-row-acts { display: none; flex: none; align-self: center; gap: 2px; margin: -6px -2px -6px auto; }
@media (hover: hover) {
  .pm-row:hover .pm-row-acts, .pm-row:focus-visible .pm-row-acts { display: inline-flex; }
  .pm-row:hover .pm-zeit, .pm-row:focus-visible .pm-zeit { display: none; }
}
.pm-row-s { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.pm-art { display: inline-flex; flex: none; color: var(--ink-faint); }
.pm-ort { flex: 0 0 auto; max-width: 120px; min-width: 0; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-xs); line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pm-row.on .pm-ort { background: var(--surface); }
.pm-ort.ohne { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.pm-text { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pm-row.neu .pm-text { color: var(--fg); }
.pm-dot { flex: none; width: 8px; height: 8px; margin: 7px 7px 0; border-radius: 50%; background: var(--accent); }
.pm-zu-ic { flex: none; display: inline-flex; justify-content: center; width: 22px; margin-top: 3px; color: var(--ink-faint); }
.pm-av-s { flex: none; width: 22px; height: 22px; font-size: var(--fs-2xs); background: var(--surface-3); color: var(--ink-soft); }
.pm-leer { flex: none; width: 22px; }
.pm-mehr { display: flex; justify-content: center; padding: 8px 0 2px; }
.pm-mehr:empty { display: none; }

/* Vorgang */
.pm-detail { min-width: 0; }
.pm-none { display: grid; place-items: center; min-height: 420px; }
.pm-vorgang { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pm-v-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pm-back { display: none; flex: none; }
.pm-v-t { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-v-title { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-xl); line-height: 1.25; }
.pm-v-sub { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-soft); font-size: var(--fs-sm); }
.pm-v-sub > .ic { flex: none; color: var(--ink-faint); }
.pm-v-sub > span:not(.pm-pr) { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pm-pr { display: inline-grid; place-items: center; flex: none; color: var(--ink-faint); cursor: help; }
.pm-pr.warn { color: var(--orange-ink); }
.pm-v-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.pm-v-acts .row-more { opacity: 1; }
.pm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.pm-meta:empty { display: none; }
.pm-meta-c { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-sm); text-decoration: none; }
.pm-meta-c > .ic { flex: none; color: var(--ink-faint); }
.pm-meta-c > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
a.pm-meta-c:hover { background: var(--hover); color: var(--fg); }
.pm-meta-c.ohne { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.pm-zitat { display: inline-grid; place-items: center; height: 18px; margin-top: 6px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--surface-3); color: var(--ink-soft); cursor: pointer; }
.pm-zitat:hover, .pm-zitat[aria-expanded="true"] { background: var(--line); color: var(--fg); }
.pm-anl { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-von { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: right; font-size: var(--fs-xs); color: var(--ink-faint); }
.pm-ref { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.pm-ref-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); color: var(--fg); }
.pm-ref-t { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-ref-t > p { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink-soft); font-size: var(--fs-sm); }
.pm-ref-z { font-size: var(--fs-xs); color: var(--ink-faint); }
.pm-ref > .btn { flex: none; white-space: nowrap; }
.pm-zeit-dlg { display: flex; }
.pm-zeit-dlg .input { width: 100%; }

/* Schmale Fenster: erst die Liste, dann der Vorgang mit „Zurück“ */
@media (max-width: 1180px) {
  .pm { grid-template-columns: minmax(0, 1fr); }
  .pm.has-sel > .pm-liste { display: none; }
  .pm:not(.has-sel) > .pm-detail { display: none; }
  .pm-back { display: inline-grid; }
  .pm-liste { max-height: none; min-height: 0; overflow: visible; }
  .pm-rows { overflow: visible; }
}
@media (max-width: 560px) {
  .pm-liste { padding: 6px; }
  .pm-kopf { gap: 4px; }
  .pm-kopf > .grow { display: none; }
  .pm-fach { flex: 1 1 auto; display: flex; min-width: 0; }
  .pm-fach > button { flex: 1 1 auto; justify-content: center; min-height: 36px; padding-inline: 8px; }
  .pm-suche { flex: 1 1 0; }
  .pm-kopf > .icon-btn { width: 40px; height: 40px; }
  .pm-row { min-height: 68px; padding: 10px 6px; }
  .pm-ort { max-width: 112px; }
  .pm-v-head { flex-wrap: wrap; row-gap: 10px; }
  .pm-v-t { flex: 1 1 0; }
  .pm-v-acts { width: 100%; justify-content: flex-end; }
  .pm-v-acts .icon-btn { width: 40px; height: 40px; }
  .pm-v-acts .pf-zu { width: 36px; height: 36px; }
  .pm-ref { flex-wrap: wrap; }
  .pm-ref > .btn { flex: 1 1 100%; justify-content: center; min-height: 40px; }
  .pm-von { display: none; }
  .pm-auswahl .btn { padding-inline: 10px; }
}

/* Einstellungen des Postfachs */
.pm-set { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pm-set-s { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pm-set-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-base); font-weight: 620; }
.pm-set-h > .ic { flex: none; color: var(--ink-faint); }
.pm-set-adr { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pm-set-l { flex: none; width: 52px; color: var(--ink-faint); font-size: var(--fs-sm); }
.pm-set-adr > .copy-row { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
.pm-set-adr .copy-row .input { min-width: 0; flex: 1 1 0; font-family: var(--font); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; font-feature-settings: var(--code-ff); }
.pm-set-kunden > summary { display: flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--ink-soft); font-size: var(--fs-sm); cursor: pointer; list-style: none; }
.pm-set-kunden > summary::-webkit-details-marker { display: none; }
.pm-set-kunden > summary::before { content: ""; width: 6px; height: 6px; margin-right: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.pm-set-kunden[open] > summary::before { transform: rotate(45deg); }
.pm-set-list { display: flex; flex-direction: column; min-width: 0; margin-top: 4px; border-top: 1px solid var(--line-soft); }
.pm-set-k { display: flex; align-items: center; gap: 10px; min-height: 42px; min-width: 0; border-bottom: 1px solid var(--line-soft); }
.pm-set-kn { flex: 0 0 34%; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-sm); }
.pm-set-k > code { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-xs); color: var(--ink-soft); }
.pm-set-k > .icon-btn { flex: none; }
.pm-set-aus { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--orange-tint); color: var(--orange-ink); }
.pm-set-aus > b { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.pm-set-aus > .ic { flex: none; }
.pm-schritte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pm-schritte > li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: var(--fs-sm); }
.pm-schritte > li > span:not(.pm-schritt-n):not(.adm-info) { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pm-schritte > li > .ic { flex: none; color: var(--ink-faint); }
.pm-schritt-n { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: var(--fs-2xs); font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .pm-schritte { grid-template-columns: minmax(0, 1fr); } .pm-set-kn { flex-basis: 40%; } }
.pm-set-hint { margin: 0; color: var(--ink-faint); font-size: var(--fs-sm); }
.pm-set-b { display: flex; align-items: center; gap: 8px; min-height: 52px; min-width: 0; border-bottom: 1px solid var(--line-soft); }
.pm-set-bt { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pm-set-bt > b { font-weight: 560; }
.pm-set-bt > span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-faint); font-size: var(--fs-sm); }
.pm-set-bt:hover > b { text-decoration: underline; text-underline-offset: 3px; }
.pm-set-s > .btn { align-self: flex-start; }
.pm-bs { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pm-bs-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: var(--fs-sm); font-weight: 550; }
.pm-bs-l > span { display: inline-flex; align-items: center; gap: 6px; }
.pm-bs-l > .input { font-weight: 400; }
/* Tastenkürzel nur, wo es eine Tastatur gibt */
@media (hover: none), (max-width: 1180px) { .pm-tasten { display: none; } }
.pm-keys { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; margin: 0; padding: 12px 14px; font-size: var(--fs-sm); }
.pm-keys dt { display: flex; gap: 4px; justify-content: flex-end; }
.pm-keys dd { margin: 0; color: var(--ink-soft); }
.pm-keys kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); font: inherit; font-size: var(--fs-xs); font-weight: 600; }

/* Ruhig (GESTALTUNG 17): Art als Pille mit Menü, Formulare und Empfänger in Ordnung als Symbol im Kopf mit Popover */
.pf-art-pill { gap: 6px; padding-inline: 10px; }
.pf-art-pill.on { background: var(--surface-2); color: var(--ink); }
.pf-art-pill > .tab-n { min-width: 16px; height: 16px; padding: 0 4px; font-size: var(--fs-2xs); }
.pf-tools .pf-arten { display: flex; }
.inq-check-k { color: var(--green); }
.inq-check-pop { display: grid; gap: 6px; max-width: 360px; }
.inq-check-pop > b { font-size: var(--fs-sm); }
.inq-check-pop .inq-chks { margin: 0; padding: 0; }
