/* Redesign 2026, Runde 50 (2.115.0): Prüfen in einem Schritt, eine Wizard-Schale, Zahlungen, Belegliste, Dashboard. Letzte CSS-Schicht. */

/* R50-01: Antwortknöpfe der Empfängerfrage statt Radios; Titel am Handy ohne Ellipse */
.todo-answers { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.todo-answers .todo-answer { min-height: 44px; flex: 0 1 auto; justify-content: center; }
@media (max-width: 599px) { .todo-answers { flex-direction: column; } .todo-answers .todo-answer { width: 100%; } }
@media (max-width: 767px) {
  html body #documentDetailModal .dph-row1 .doc-detail-title, html body #documentDetailModal .doc-page-head .doc-detail-title { display: block !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; -webkit-line-clamp: unset !important; line-clamp: unset !important; overflow-wrap: anywhere; line-height: 1.25; }
}
.doc-approved .doc-done-card h2 { margin-bottom: 1rem; }
html body .doc-approve-btn[aria-disabled="true"] { background: #D8DCE4; border-color: #D8DCE4; color: #565C67; opacity: 1; cursor: not-allowed; }

/* R50-02: Belegkarten in Schritt 1 */
html body .rw-doc { min-height: 56px; }
html body .rw-doc strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* R50-03: eine Fußleiste für alle Assistenten (Reisekosten inklusive), deaktiviertes Weiter lesbar */
html body .tw-foot { display: block; padding-left: 24px; padding-right: 24px; }
html body .tw-foot > .sw-foot-inner { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box; }
html body .tw-foot .tw-hint { order: -1; flex: 1 0 100%; text-align: left; margin: 0; font-size: .875rem; }
html body .tw-foot .tw-hint.is-empty { display: none; }
html body .tw-foot .tw-back { flex: 0 0 auto; margin-right: auto; min-width: 0; }
html body .tw-foot .tw-next { flex: 0 0 auto; width: 200px; max-width: 200px; margin-left: auto; white-space: nowrap; justify-content: center; }
html body .tw .tw-col { max-width: 720px; }
html body .tw[data-step="3"] .tw-col { max-width: 880px; }
@media (max-width: 767px) {
  html body .tw-foot { padding-left: 16px; padding-right: 16px; }
  html body .tw-foot .tw-next { flex: 1 1 0; width: auto; max-width: 200px; }
}
html body .tw-foot .tp-btn[aria-disabled="true"], html body .sw-foot .sw-main[aria-disabled="true"], html body .sw-foot .btn-primary[aria-disabled="true"], html body .ow-foot .btn-primary[aria-disabled="true"] { background: #D8DCE4; border-color: #D8DCE4; color: #565C67; opacity: 1; cursor: not-allowed; }
html body .sw-foot .sw-main { max-width: 200px; }
html body .sw-foot > .sw-foot-inner .sw-main { flex: 0 0 auto; width: 200px; margin-left: auto; }
html body .sw-foot > .sw-foot-inner .sw-back { margin-right: auto; }
@media (max-width: 767px) { html body .sw-foot > .sw-foot-inner .sw-main { flex: 1 1 0; width: auto; max-width: 200px; } }
.sw-foot .sw-reason { font-size: .875rem; }

/* R50-04: Zahlungen */
@media (max-width: 767px) {
  html body #paymentsHead .page-title { white-space: normal; overflow-wrap: anywhere; }
  html body #paymentsHead .page-head-actions { width: 100%; }
  html body #paymentsHead .pay-head-actions { flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  html body .ph-icon-btn.pay-reload { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; }
  html body .ph-icon-btn.pay-reload .pay-reload-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
html body .pay-gap.pay-empty { min-height: calc(100dvh - 430px); justify-content: center; }
html body .pay-gap .pay-steps-list { margin: .25rem 0 0; }

/* R50-05: Belegliste, eine Suche (die Kopfsuche filtert), ruhige Zeilen am Handy */
html body .docfilters-search { display: none; }
html body .documents-grid .list-seg-bar { margin-bottom: 24px; }
html body .docfilters + .documents-grid, html body .documents-grid .doc-table { margin-top: 16px; }
html body .doc-thead .dr-amount { text-align: right; justify-content: flex-end; }
#globalSearchInput { height: 40px; min-height: 40px; }
.list-seg-bar { position: relative; }
/* R53-01: Listen-Umbruch bei 1100 px */
@media (max-width: 1099px) {
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card { grid-template-areas: "main amount" "meta due" "status status" !important; grid-template-columns: minmax(0, 1fr) auto !important; row-gap: 2px !important; column-gap: 10px !important; padding: 8px 32px 8px 12px !important; min-height: 56px; height: auto !important; position: relative; cursor: pointer; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-sel, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-kind, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-co, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-act, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-actcol, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-tap { display: none !important; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-status:has(.badge-info), html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-status:empty { display: none !important; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-status { grid-area: status; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-vendor { display: block; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-vendor-link { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-ftype, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-meta .dr-m2, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-sub, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-due .due-overdue-icon { display: none !important; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-meta { margin: 0 !important; padding: 0 !important; min-height: 0 !important; height: auto !important; align-self: center; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-due, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-amount { min-height: 0 !important; height: auto !important; margin: 0 !important; padding: 0 !important; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-vendor-link { min-height: 44px !important; padding: 0 !important; align-items: center; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-due .dr-due-d { display: none; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-due .dr-due-m { display: inline; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-due, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-amount { text-align: right; justify-self: end; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card::after { content: "\203A"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; color: #565C67; }
  html body .documents-grid .doc-selall-m, html body .documents-grid .doc-selall { display: none !important; }
  html body .list-seg-bar { overflow: hidden; position: relative; }
  html body .list-seg-bar::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 28px; pointer-events: none; background: linear-gradient(90deg, rgba(245,246,248,0), #F5F6F8); }
}

/* R50-06: Dashboard-Kacheln am Handy lesbar, Zeilen mit fester Chip-Spalte */
@media (max-width: 767px) {
  html body .dash-kpi-sub, html body .dash-kpi-label, html body .dash-kpi-value { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
}
@media (max-width: 599px) { .dash-kpis { grid-template-columns: minmax(0, 1fr); } }
html body .dash-recent-status { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
html body .dash-recent-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html body .dash-recent-link { min-width: 0; }
html body .dash-waiting-item .dr-amt-credit, html body .rl-row .dr-amt-credit, html body .dash-recent-status .dr-amt-credit { font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid #A7F3D0; background: #ECFDF5; color: #065F46; white-space: nowrap; }

/* R50-07: Neuigkeiten, Verlauf-Spalte bleibt stehen */
@media (min-width: 1200px) { html body .news-jump { position: sticky; top: 16px; align-self: flex-start; } }
.news-earlier-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 16px; border: 1px solid #D8DCE4; border-radius: 999px; background: #fff; color: #0E1115; font-weight: 700; cursor: pointer; }
.news-earlier-btn .fa-chevron-down { transition: transform .15s ease; }
.news-earlier-btn[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }

/* R50-03: Bewegung nur, wenn gewünscht. Globale Regel am Ende der letzten Schicht. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* R50 Nacharbeit (D-2394, D-2395, D-2397, D-2398) */
@media (min-width: 768px) {
  html body .dash-waiting-item .dash-waiting-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; column-gap: 0; row-gap: 2px; align-items: center; min-width: 0; }
  html body .dash-waiting-item .dash-waiting-main .dash-waiting-vendor { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  html body .dash-waiting-item .dash-waiting-main .dash-waiting-meta { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
}
/* R53-01: Listen-Umbruch bei 1100 px */
@media (min-width: 1100px) {
  html body .dash-waiting-item .dash-waiting-main .dr-amt-chip, html body .dash-waiting-item .dash-waiting-main .dash-row-chip, html body .dash-waiting-item .dash-waiting-main .dash-recent-flag { grid-row: 1; grid-column: auto; margin: 0 0 0 8px; align-self: center; justify-self: start; width: auto; white-space: nowrap; }
}
html body .dash-recent-item { flex-wrap: nowrap; align-items: center; }
html body .dash-recent-item > .dash-recent-link { flex: 1 1 0; min-width: 0; }
html body .dash-recent-item > .dash-recent-status { flex: none; }
html body .sw-foot .btn-primary[aria-disabled="true"], html body .sw-foot .btn-primary[aria-disabled="true"]:hover, html body .sw-foot .sw-main[aria-disabled="true"] { opacity: 1 !important; background: #D8DCE4 !important; border-color: #D8DCE4 !important; color: #565C67 !important; cursor: not-allowed; }
html body .sw-foot .btn-primary[aria-disabled="true"] .sw-kbd, html body .sw-foot .btn-primary[aria-disabled="true"] i { color: #565C67 !important; border-color: #A9AFBB; }
html body .sw-body:has(.rw-docs.is-all) { overflow: hidden; display: flex; flex-direction: column; }
html body .sw-body:has(.rw-docs.is-all) > .sw-card { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; margin-left: auto; margin-right: auto; }
html body .sw-card .rw-docs.is-all { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
