/* SAPify-Kommunikation: Zähler «Mitteilungen», Inbox, Formulare «Kunde erfassen» und «Kunde ändern».
   Farben nur über die Variablen aus style.css – hell und dunkel. */

/* ---------- Zähler in der Kopfzeile und auf der Inbox-Kachel ---------- */
.zaehler { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--high); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; box-sizing: border-box; }
.mitteilungen { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; }
.mitteilungen .zaehler { position: absolute; top: -3px; right: -5px; box-shadow: 0 0 0 2px var(--shell-bg); }
.kachel-zaehler { position: absolute; top: 14px; right: 12px; min-width: 24px; height: 24px; border-radius: 12px; font-size: 12.5px; padding: 0 7px; }
.kachel-seite .kachel-titel { padding-right: 34px; }

/* ---------- Inbox wie ein Mailprogramm: Befehlsleiste, Ordner, Liste, Lesebereich ---------- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 16px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.filter-chip:hover { border-color: var(--sap-blue); }
.filter-chip.aktiv { background: var(--sap-blue); border-color: var(--sap-blue); color: #fff; font-weight: 600; }
.filter-chip .n { font-size: 11px; opacity: .8; }

.ib { --ib-akzent: var(--sap-blue); --ib-wahl: rgba(10,110,209,.11); }
[data-theme="dark"] .ib { --ib-akzent: #6cb8ff; --ib-wahl: rgba(108,184,255,.14); }
.ib-ikon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Befehlsleiste */
.ib-leiste { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 5px 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: thin; }
.ib-gruppe { display: flex; align-items: center; gap: 2px; padding: 0 7px; border-right: 1px solid var(--border); flex-shrink: 0; }
.ib-gruppe:first-child { padding-left: 0; }
.ib-gruppe.rechts { margin-left: auto; border-right: none; padding-right: 0; }
.ib-gruppe:nth-last-child(2) { border-right: none; }
.ib-knopf { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: var(--text); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.ib-knopf .ib-ikon { color: var(--ib-akzent); }
.ib-knopf:hover:not(:disabled) { background: var(--surface-hover); }
.ib-knopf:focus-visible { outline: 2px solid var(--sap-blue); outline-offset: 1px; }
.ib-knopf:disabled { opacity: .4; cursor: default; }
.ib-knopf.haupt { background: var(--sap-blue); color: #fff; font-weight: 600; padding: 0 14px; }
.ib-knopf.haupt .ib-ikon { color: #fff; }
.ib-knopf.haupt:hover { background: var(--sap-blue-dark); }
.ib-knopf.gut, .ib-knopf.gut .ib-ikon { color: var(--ok-fg); }
.ib-knopf.gefahr, .ib-knopf.gefahr .ib-ikon { color: var(--nok-fg); }

/* Drei Spalten in einem Rahmen, jede rollt für sich */
.ib-raster { display: grid; grid-template-columns: 212px minmax(300px, 390px) minmax(0, 1fr); height: calc(100dvh - 212px); min-height: 440px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.ib-ordner { border-right: 1px solid var(--border); background: var(--surface-alt); padding: 12px 8px; overflow-y: auto; min-width: 0; }
.ib-ordner-titel { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; padding: 2px 10px 8px; }
.ib-ordner-liste { display: flex; flex-direction: column; gap: 2px; }
.ib-ordner-knopf { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: 13.5px;
  padding: 8px 10px; border-radius: 7px; cursor: pointer; text-align: left; box-sizing: border-box; }
.ib-ordner-knopf .ib-ikon { color: var(--text-muted); }
.ib-ordner-knopf:hover { background: var(--surface-hover); }
.ib-ordner-knopf:focus-visible { outline: 2px solid var(--sap-blue); outline-offset: -2px; }
.ib-ordner-knopf.aktiv { background: var(--ib-wahl); color: var(--ib-akzent); font-weight: 600; }
.ib-ordner-knopf.aktiv .ib-ikon { color: var(--ib-akzent); }
.ib-ordner-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-ordner-knopf .n { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.ib-ordner-knopf.aktiv .n { color: inherit; }
.ib-ordner-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.ib-ordner-block select { width: 100%; box-sizing: border-box; padding: 7px 8px; }
.ib-ordner-block .sf-leiste { padding: 0 2px; }
.ib-ordner-block .sf-wahl, .ib-ordner-block .sf-name { flex: 1 1 100%; max-width: none; width: auto; }
.ib-ordner-block .sf-knopf { flex: 1 1 auto; }

.ib-liste { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); }
.ib-liste-kopf { padding: 10px 12px 6px; border-bottom: 1px solid var(--border); display: grid; gap: 6px; }
.ib-suche { position: relative; }
.ib-suche .ib-ikon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; width: 16px; height: 16px; }
.ib-suche input { width: 100%; box-sizing: border-box; padding: 8px 10px 8px 34px; border-radius: 8px; }
.ib-liste-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); }
.ib-liste-zeile select { width: auto; padding: 3px 4px; font-size: 12px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; }
.ib-zeilen { flex: 1; min-height: 0; overflow-y: auto; }
.ib-zeilen .leer { padding: 40px 16px; text-align: center; color: var(--text-muted); }
.ib-gruppen-titel { position: sticky; top: 0; z-index: 1; background: var(--surface-alt); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); padding: 5px 14px; border-bottom: 1px solid var(--border); }
.ib-zeile { display: flex; gap: 10px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.ib-zeile:hover { background: var(--surface-hover); }
.ib-zeile:focus-visible { outline: 2px solid var(--sap-blue); outline-offset: -2px; }
.ib-zeile.ungelesen { box-shadow: inset 3px 0 0 var(--ib-akzent); }
.ib-zeile.gewaehlt { background: var(--ib-wahl); box-shadow: inset 3px 0 0 var(--ib-akzent); }
.iz-haupt { flex: 1; min-width: 0; }
.iz-kopf { display: flex; gap: 8px; align-items: baseline; }
.iz-von { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iz-firma { color: var(--text-muted); font-weight: 400; }
.iz-zeit { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.iz-betreff { font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iz-text { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-zeile.ungelesen .iz-von { font-weight: 700; }
.ib-zeile.ungelesen .iz-betreff { font-weight: 600; color: var(--ib-akzent); }
.ib-zeile.ungelesen .iz-zeit { color: var(--ib-akzent); font-weight: 600; }
.iz-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; margin-top: 5px; }
.iz-meta .chip { margin: 0; font-size: 11px; padding: 0 7px; }

.ib-lesen { min-width: 0; overflow-y: auto; padding: 18px 22px 8px; background: var(--bg); }
.ib-leer { height: 100%; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); text-align: center; padding: 20px; font-size: 13.5px; }
.ib-leer .ib-ikon { width: 60px; height: 60px; stroke-width: 1; opacity: .45; margin-bottom: 4px; }
.ib-leer b { color: var(--text); font-size: 15px; }
.il-kopf { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.il-titel { flex: 1; min-width: 0; }
.il-titel h3 { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; margin-bottom: 12px; }
.il-absender { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.il-wer { display: flex; flex-direction: column; flex: 1 1 160px; min-width: 0; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.il-wer span { font-size: 12.5px; }
.il-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; }
.il-marken .chip { margin: 0 0 0 4px; }
.il-abschnitt { margin: 18px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.il-antwort { margin-top: 6px; }
.il-antwort .il-abschnitt { margin-top: 0; }
.il-antwort .composer, .il-antwort .hinweis-app { border-top: none; padding-top: 0; }
.inbox-detail { min-width: 0; }
.kundenwahl { padding: 0; overflow: hidden; max-width: 760px; }
.inbox-zeile { display: block; padding: 11px 14px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.inbox-zeile:last-child { border-bottom: none; }
.inbox-zeile:hover { background: var(--surface-hover); }
.inbox-zeile:focus-visible { outline: 2px solid var(--sap-blue); outline-offset: -2px; }
.inbox-zeile .iz-betreff { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; margin-top: 0; }

/* ---------- Ein Vorgang ---------- */
.vd-zurueck { display: none; }
.vd-kopf { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.vd-titel { flex: 1; min-width: 0; }
.vd-titel h3 { font-size: 18px; overflow-wrap: anywhere; }
.vd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 6px; font-size: 12.5px; }
.vd-fehler { background: var(--nok-bg); color: var(--nok-fg); border-left: 4px solid var(--hot); border-radius: 4px; padding: 10px 14px; margin: 10px 0 14px; font-size: 13.5px; overflow-wrap: anywhere; }
.vd-fehler .hint { color: inherit; opacity: .85; margin-top: 4px; }
.vd-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; margin: 0; }
.note-box { overflow-wrap: anywhere; }
.leistungen-box { background: rgba(233,115,12,.13); border-left: 4px solid var(--high); border-radius: 4px; padding: 10px 14px; margin: 14px 0; font-size: 13.5px; overflow-wrap: anywhere; }
.leistungen-box ul { margin: 6px 0 6px 18px; padding: 0; }
.inbox-detail .kv { margin-bottom: 0; }
.inbox-detail .chip .icon-klein, .antrag .chip .icon-klein { width: 14px; height: 14px; margin-right: 4px; }
/* alt -> neu */
table.diff td { white-space: pre-wrap; overflow-wrap: anywhere; }
table.diff td:first-child { color: var(--text-muted); font-weight: 600; width: 26%; }
.diff-alt { color: var(--text-muted); text-decoration: line-through; width: 37%; }
.diff-neu { font-weight: 600; }
tr.diff-gruppe td { background: var(--surface-hover); color: var(--sap-dark) !important; font-weight: 700; font-size: 12px; }

/* Verlauf als Zeitachse */
.verlauf { list-style: none; margin: 0 0 4px; padding: 0; }
.vl-eintrag { display: flex; gap: 12px; padding-bottom: 12px; position: relative; }
.vl-eintrag::before { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 2px; width: 1px; background: var(--border); }
.vl-eintrag:last-child::before { display: none; }
.vl-inhalt { flex: 1; min-width: 0; }
.vl-kopf { font-size: 13px; line-height: 1.45; padding-top: 4px; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; }
.vl-zeit { color: var(--text-muted); font-size: 12px; margin-left: auto; padding-left: 8px; white-space: nowrap; }
.vl-eintrag.neu .vl-zeit::after { content: "neu"; margin-left: 8px; background: var(--sap-blue); color: #fff; border-radius: 8px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; }
.vl-text { margin-top: 6px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vl-eintrag:not(.vl-still) .vl-inhalt { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 14px 11px; box-shadow: var(--shadow); }
.vl-eintrag.seite-admin:not(.vl-still) .vl-inhalt { border-left: 3px solid var(--sap-blue); }
.vl-eintrag.vl-still { padding-bottom: 10px; }
.vl-grund { margin-top: 6px; color: var(--nok-fg); font-size: 13px; overflow-wrap: anywhere; }
.ergebnis { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; }
.ergebnis ul { margin: 0 0 0 18px; padding: 0; }
.ergebnis li { margin-bottom: 4px; overflow-wrap: anywhere; }
.link-zeile { margin-top: 4px; }
.link-zeile code { display: block; font-size: 11.5px; word-break: break-all; background: var(--surface-hover); border: 1px dashed var(--border); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; user-select: all; }
.composer { border-top: 1px solid var(--border); padding-top: 14px; }

/* ---------- Formulare ---------- */
.antrag { max-width: 1120px; }
.frage-form { max-width: none; }       /* über die ganze Seitenbreite */
.antrag-form .panel > h3 { font-size: 16px; margin-bottom: 12px; }
.antrag-form textarea { display: block; }
input.geaendert, select.geaendert, textarea.geaendert { border-color: var(--high); box-shadow: inset 3px 0 0 var(--high); }
label.chk-lbl.geaendert { color: var(--high); font-weight: 700; }
.benutzer-karte { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; background: var(--surface-alt); }
.benutzer-karte > summary, .bk-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; }
.benutzer-karte > summary { cursor: pointer; }
.benutzer-karte > summary:hover { background: var(--surface-hover); border-radius: 8px; }
.bk-name { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.bk-mail { color: var(--text-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.bk-marke { display: none; }
.benutzer-karte.hat-aenderung .bk-marke { display: inline-block; }
.bk-inhalt { padding: 6px 14px 14px; }
.bk-aktiv { margin-top: 12px; }
.rollen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }
.rollen-raster .field { margin-bottom: 10px; }
.rollen-raster label { display: flex; align-items: center; font-weight: 600; }

/* ---------- Handy und schmale Fenster: erst die Liste, der Vorgang als eigene Ansicht ---------- */
@media (max-width: 900px) {
  .ib-raster { display: block; height: auto; min-height: 0; background: transparent; border: none; box-shadow: none; overflow: visible; border-radius: 0; }
  .ib-ordner { border-right: none; background: transparent; padding: 0 0 10px; overflow: visible; }
  .ib-ordner > .ib-ordner-titel { display: none; }
  .ib-ordner-liste { flex-direction: row; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .ib-ordner-knopf { width: auto; flex-shrink: 0; gap: 7px; border-color: var(--border); border-radius: 18px; background: var(--surface); padding: 8px 12px; }
  .ib-ordner-knopf.aktiv { border-color: var(--ib-akzent); }
  .ib-ordner-name { overflow: visible; }
  .ib-ordner-block { margin-top: 8px; padding-top: 0; border-top: none; }
  .ib-ordner-block .ib-ordner-titel { display: none; }
  .ib-liste { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
  .ib-zeilen { overflow: visible; }
  .ib-gruppen-titel { position: static; }
  .ib-lesen { padding: 0; background: transparent; overflow: visible; }
  .ib.hat-detail .ib-ordner, .ib.hat-detail .ib-liste { display: none; }
  .ib:not(.hat-detail) .ib-lesen { display: none; }
  /* Befehlsleiste: nur was jetzt geht – seitlich wischbar */
  .ib-leiste { scrollbar-width: none; padding: 5px 6px; }
  .ib-knopf:disabled { display: none; }
  .ib-gruppe:not(:has(.ib-knopf:not(:disabled))) { display: none; }
  .ib-gruppe.rechts { margin-left: 0; border-left: 1px solid var(--border); padding-left: 7px; }
  .ib-knopf { height: 40px; }
  .il-rechts { align-items: flex-start; flex: 1 1 100%; }
  .il-marken .chip { margin: 0 4px 0 0; }
  .vd-zurueck { display: inline-block; }
  .antrag-form .panel, .inbox-detail .panel { padding: 14px; }
}
@media (max-width: 520px) {
  .antrag-form .grid, .rollen-raster { grid-template-columns: minmax(0, 1fr); }
  .antrag-form .row.end .btn, .frage-form .row.end .btn { flex: 1; text-align: center; }
  .vl-eintrag { gap: 9px; }
  .vl-zeit { flex: 1 1 100%; margin-left: 0; padding-left: 0; }
  .il-titel h3 { font-size: 17px; }
}

/* Links in Vorgängen und Formularen: im hellen wie im dunklen Design lesbar */
.inbox-detail a:not(.btn):not(.btn-icon):not(.chip), .antrag a:not(.btn):not(.btn-icon):not(.chip) { color: var(--sap-blue); }
[data-theme="dark"] .inbox-detail a:not(.btn):not(.btn-icon):not(.chip), [data-theme="dark"] .antrag a:not(.btn):not(.btn-icon):not(.chip) { color: #6cb8ff; }

/* alt -> neu auf dem Handy: alle drei Spalten bleiben ohne seitliches Wischen sichtbar */
@media (max-width: 700px) {
  .tbl-wrap table.diff { min-width: 0; table-layout: fixed; }
  table.diff th, table.diff td { padding: 8px 8px; font-size: 12.5px; }
  table.diff td:first-child { width: 28%; }
  .diff-alt { width: 34%; }
  table.diff .chip { white-space: normal; }
}
table.diff td:first-child { overflow-wrap: break-word; hyphens: auto; }

/* ---------- Bearbeiter: wer dran ist ---------- */
.avatar.mini { width: 18px; height: 18px; font-size: 8.5px; }
.bearb { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 12px; color: var(--text-muted); min-width: 0; }
.bearb.ich { color: var(--sap-blue); font-weight: 600; }
.bearb.frei { color: var(--high); font-weight: 600; }
.bearb-punkt { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--high); box-sizing: border-box; flex-shrink: 0; }
.iz-bearb { margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
[data-theme="dark"] .bearb.ich { color: #6cb8ff; }
.vd-bearbeiter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--sap-blue);
  border-radius: 8px; padding: 8px 14px; margin: 0 0 12px; }
.vd-bearbeiter.frei { border-left-color: var(--high); }
.vb-text { display: flex; flex-direction: column; flex: 1 1 150px; min-width: 0; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.vb-titel { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.vb-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.leer-avatar { background: transparent; color: var(--high); border: 2px dashed var(--high); box-sizing: border-box; }

/* ---------- Verlauf: Bearbeiter-Schritte, per E-Mail, Anhänge ---------- */
.vl-eintrag.vl-still .vl-kopf { color: var(--text-muted); font-size: 12.5px; }
.vl-eintrag.vl-still .vl-kopf b { font-weight: 600; }
.vl-eintrag.vl-still .avatar { opacity: .75; }
.chip-mail { margin-left: 8px; background: rgba(10,110,209,.13); color: var(--sap-blue); border-color: transparent; font-weight: 600; }
[data-theme="dark"] .chip-mail { color: #6cb8ff; }
.vl-abgelehnt { margin-top: 6px; font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.anhaenge { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.anhaenge li { min-width: 0; max-width: 100%; }
a.anhang { display: flex; align-items: center; gap: 10px; max-width: 280px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px 6px 6px; background: var(--surface);
  text-decoration: none; color: var(--text) !important; min-height: 44px; box-sizing: border-box; }
a.anhang:hover { border-color: var(--sap-blue); }
.anhang-bild { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; background: var(--surface-hover); flex-shrink: 0; }
.anhang-art { width: 44px; height: 32px; border-radius: 5px; background: var(--surface-hover); color: var(--text-muted); font-size: 10.5px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: .03em; }
.anhang-text { display: flex; flex-direction: column; min-width: 0; }
.anhang-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anhang-groesse { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

/* ---------- Schreiben: Hinweis «per E-Mail», Dateien anhängen ---------- */
.mail-hinweis { display: flex; gap: 8px; align-items: flex-start; background: rgba(10,110,209,.10); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.mail-symbol { color: var(--sap-blue); font-size: 14px; line-height: 1.3; }
[data-theme="dark"] .mail-symbol { color: #6cb8ff; }
.composer textarea { display: block; width: 100%; box-sizing: border-box; }
.composer-fuss { margin-top: 10px; }
.anhang-feld { margin-top: 8px; }
.anhang-wahl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.anhang-wahl li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 4px 4px 12px; background: var(--surface-alt); min-height: 40px; box-sizing: border-box; }
.anhang-wahl li.laedt { opacity: .7; }
.anhang-wahl .anhang-name { flex: 1; min-width: 0; }
.anhang-weg { font-size: 20px; width: 36px; height: 36px; flex-shrink: 0; }
.anhang-notiz { margin-top: 6px; color: var(--high); }
.empf-wahl { margin-top: 2px; }
.empf-hinweis { margin-top: -4px; }
.empf-mail { margin-bottom: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.empf-mail[hidden], .anhang-wahl[hidden] { display: none; }

@media (max-width: 520px) {
  .vb-knoepfe { width: 100%; }
  .vb-knoepfe .btn { flex: 1 1 auto; text-align: center; }
  a.anhang { max-width: 100%; }
  .anhaenge li { flex: 1 1 100%; }
  .composer-fuss .btn { flex: 1 1 auto; text-align: center; }
  .composer-fuss .spacer { display: none; }
  .empf-mail { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Hinweis einer App (z. B. «Neues Ticket»): statt eines Antwortfelds der Weg in die App */
.hinweis-app { border-top: 1px solid var(--border); padding-top: 14px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--text-muted); font-size: 13.5px; }
.hinweis-app .btn { white-space: nowrap; }

/* Handy: Filter gut antippbar, Kleinstschrift auf 12 px (wie in den übrigen Ansichten, portal.css) */
@media (max-width: 700px) {
  .filter-chip { padding: 8px 12px; font-size: 13px; }
  .iz-zeit, .vb-titel { font-size: 12px; }
  .ib-suche input { font-size: 16px; }
}
@media (max-width: 520px) {
  .antrag-form .row.end .btn, .frage-form .row.end .btn { flex: 1 1 auto; }
}

/* ---------- Drucken: nur der geöffnete Vorgang, hell ---------- */
@media print {
  html, html[data-theme="dark"] { --text: #1a1a1a; --text-muted: #555; --surface: #fff; --surface-alt: #fff; --surface-hover: #f3f3f3; --bg: #fff; --border: #c9c9c9; --sap-dark: #1a1a1a; --shadow: none; }
  body { background: #fff; }
  header.shell, footer.site-footer, .ib-leiste, .ib-ordner, .ib-liste, .il-antwort, .vd-zurueck, .toast { display: none !important; }
  .ib-raster { display: block; height: auto; min-height: 0; border: none; box-shadow: none; overflow: visible; }
  .ib-lesen { display: block !important; overflow: visible; padding: 0; background: #fff; }
  .vl-eintrag, .panel { break-inside: avoid; }
}

/* Formatierter Text im Verlauf: die Karte ist der Rahmen – kein zweiter darin */
.vl-inhalt .kb-inhalt.se-anzeige { border: none; background: transparent; padding: 0; margin-top: 6px; font-size: 13.5px; }
