/* Redesign Runde 52 Nacharbeit (2.117.1). Copyright © Fabian Stamminger @ The Platform Group */

/* R52-04: ein Status-Chip unter dem Lieferanten, keine Statusspalte */
.dr-main-chip { display: none; }
/* R54-03: Listen-Spalten stehen gesammelt am Dateiende (eine Regel je Zustand) */

/* Handy: gleich hohe Karten mit Pfeil, Lieferant und Rechnungsnummer einzeilig */
@media (max-width: 767px) {
  /* Belegdetail: Weiter-Pfeil sichtbar, Sperrgrund 14 px */
  html body #documentDetailModal .dph-row2 .doc-review-nav { flex: none; min-width: max-content; overflow: visible; }
  html body #documentDetailModal .dph-row2 .doc-head-nr { flex: 1 1 auto; }
  html body #documentDetailModal .doc-detail-actionbar #docApproveNote, html body #documentDetailModal .doc-detail-actionbar .doc-approve-note, html body #documentDetailModal .doc-detail-actionbar .is-reason { font-size: .875rem !important; }
}
/* R53-01: Kartenzeilen unter 1100 px (Tablet und Handy): Lieferant, Rechnung, Fälligkeit, Betrag, Chip darunter, Pfeil mittig */
@media (max-width: 1099px) {
  html body .documents-grid .doc-table .doc-thead { display: none !important; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card { height: auto !important; min-height: 72px !important; max-height: none !important; grid-template-rows: none !important; grid-template-columns: minmax(0, 1fr) auto !important; align-content: center; overflow: hidden; box-sizing: border-box; padding: 12px 36px 12px 12px !important; position: relative; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-vendor-link { display: block !important; -webkit-line-clamp: unset; line-clamp: unset; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; min-height: 0 !important; height: 24px; line-height: 24px; overflow-wrap: normal !important; padding: 0 !important; }
  /* Tippfläche 44 px ohne die Zeile zu vergrößern */
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-vendor-link { min-height: 44px !important; height: 44px; line-height: 44px; margin: -10px 0 !important; position: relative; z-index: 1; }
  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 { overflow: hidden; min-width: 0; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-meta .dr-m1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-co { display: block !important; grid-column: 1 / -1; font-size: .8125rem; color: #565C67; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-amt-chip, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main-chip { display: none !important; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-status { min-height: 0; align-self: center; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card::after { display: block !important; content: "\203A" !important; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; color: #565C67; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card.is-overdue-row, html body .documents-grid .doc-table .doc-row.doc-card.doc-card[data-overdue="1"] { box-shadow: inset 3px 0 0 #B42318; }
}

@media (min-width: 768px) and (max-width: 1099px) {
  /* Tablet: lange Lieferantennamen umbrechen statt Ellipsis */
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-vendor-link { white-space: normal !important; text-overflow: clip !important; height: auto; line-height: 1.3; min-height: 24px !important; margin: 0 !important; overflow-wrap: anywhere !important; }
}
/* R53-01: Toolbar als Flex-Zeile im Fluss, nichts liegt mehr absolut über den Reitern */
html body #docFilters .docfilters-more, html body #docFilters .docfilters-sheet-btn { display: none !important; }
html body #docFilters:not(:has(.docfilters-chips:not([hidden]))):not(.is-more-open) { padding: 0; margin: 0; min-height: 0; border: 0; }
html body #docFilters:not(:has(.docfilters-chips:not([hidden]))):not(.is-more-open) .docfilters-bar { gap: 0; min-height: 0; }
html body .documents-grid .list-seg-bar { display: flex; flex-direction: row !important; overflow: visible !important; flex-wrap: nowrap; align-items: center; gap: 12px; margin: 0 0 16px; padding: 0; position: relative; border-bottom: 1px solid #D8DCE4; }
html body .documents-grid .list-seg-bar .list-seg { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0 0 12px; border-bottom: 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
html body .documents-grid .list-seg-bar .list-seg::-webkit-scrollbar { display: none; }
html body .list-seg-bar::after { content: none !important; }
html body .documents-grid .list-seg-bar > .list-seg { border-bottom: 0 !important; }
html body .documents-grid .list-seg-bar { margin-bottom: 16px !important; }
html body .documents-grid .list-seg-bar .docseg-filter { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; margin: 0 0 12px; border-radius: 999px; white-space: nowrap; align-self: flex-start; }
html body .documents-grid .list-seg-bar .list-assign-banner { flex: none; margin: 0 0 12px; padding: 0; border: 0; background: transparent; min-height: 0; align-self: flex-start; }
html body .documents-grid .list-seg-bar .list-assign-banner > span { display: none; }
html body .documents-grid .list-seg-bar .list-assign-banner .list-assign-go { min-height: 40px; padding: 0 16px; font-size: .875rem; background: #fff; color: #0E1115; border: 1px solid #0E1115; white-space: nowrap; }
@media (max-width: 767px) {
  html body .documents-grid .list-seg-bar { flex-wrap: wrap; gap: 0 8px; }
  html body .documents-grid .list-seg-bar .list-seg { flex: 1 1 0; }
  html body .documents-grid .list-seg-bar .docseg-filter { width: 44px; min-height: 44px; padding: 0; margin: 0 0 8px; }
  html body .documents-grid .list-seg-bar .docseg-filter-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html body .documents-grid .list-seg-bar .list-assign-banner { order: 3; flex: 1 1 100%; margin: 0 0 12px; }
  html body .documents-grid .list-seg-bar .list-assign-banner .list-assign-go { width: 100%; min-height: 44px; }
}

/* R53-01: Tippfläche des Lieferantennamens im Dashboard am Handy 44 px (Probe) */
@media (max-width: 767px) {
  html body .dash-waiting-item .dash-waiting-main .dash-waiting-vendor { min-height: 44px !important; display: flex !important; align-items: center; }
}

/* R53-02: Bezahlen als eine Reise in drei Stufen */
.pay-flow { background: #fff; border: 1px solid #D8DCE4; border-radius: 16px; box-shadow: 0 1px 2px rgba(14, 17, 21, .04); padding: 20px 24px; margin: 0 0 24px; display: flex; align-items: center; gap: 24px; }
.pay-flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; flex: 1 1 auto; min-width: 0; }
.pay-flow-step { display: flex; gap: 12px; min-width: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; }
.pay-flow-step.is-active { background: #F5F6F8; border-color: #D8DCE4; }
.pay-flow-n { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #6B717C; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .875rem; color: #0E1115; }
.pay-flow-step.is-active .pay-flow-n { background: #0E1115; border-color: #0E1115; color: #fff; }
.pay-flow-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-flow-title { font-weight: 700; color: #0E1115; }
.pay-flow-big { font-weight: 900; letter-spacing: -.01em; font-size: 1.375rem; font-variant-numeric: tabular-nums; color: #0E1115; }
.pay-flow-sub { font-size: .875rem; color: #565C67; overflow-wrap: anywhere; }
.pay-flow-link { align-self: flex-start; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; color: #0E1115; text-decoration: none; border-bottom: 1px solid #0E1115; }
.pay-flow-act { flex: none; display: flex; align-items: center; }
.pay-flow-go { white-space: nowrap; min-height: 44px; }
.pay-flow-hint, .pay-flow-note { font-size: .875rem; color: #565C67; margin: 0 0 16px; }
.pay-empty--compact { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; min-height: 0 !important; height: auto !important; }
.pay-empty--compact h2 { margin: 0; font-size: 1.25rem; font-weight: 900; letter-spacing: -.01em; }
.pay-empty--compact p { margin: 0; color: #565C67; }
.pay-empty-ico { font-size: 1.5rem; color: #6B717C; }
.pay-empty-tiles { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.pay-empty-tile { background: #F5F6F8; border: 1px solid #D8DCE4; border-radius: 12px; padding: 12px 16px; min-width: 140px; display: flex; flex-direction: column; }
.pay-empty-tile strong { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.pay-empty-tile span { font-size: .875rem; color: #565C67; }
@media (max-width: 767px) { .pay-flow { padding: 12px; gap: 12px; } .pay-flow-act { order: -1; } .pay-flow-act .pay-flow-go { width: 100%; } .pay-flow-step { padding: 8px; } .pay-flow-big { font-size: 1.125rem; } }
@media (max-width: 1099px) { .pay-flow { flex-direction: column; align-items: stretch; } .pay-flow-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; } .pay-flow-act .pay-flow-go { width: 100%; justify-content: center; } }

/* R53-04: Fußknopf wartet, solange ein Schritt der Karte offen ist (graue Fläche, Kontrast mindestens 3:1) */
html body #documentDetailModal .doc-approve-btn.is-waiting, html body #documentDetailModal .doc-approve-btn.is-waiting:hover { background: #E7EAF0 !important; color: #0E1115 !important; border: 1px solid #6B717C !important; box-shadow: none !important; }
html body #documentDetailModal .todo-doneline { list-style: none; padding: 0; margin: 4px 0 0; }
html body #documentDetailModal .todo-done-details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: #565C67; }
html body #documentDetailModal .todo-done-list { list-style: none; margin: 0; padding: 0; }
html body #documentDetailModal .doc-preview-mark { margin-left: auto; min-height: 36px; padding: 0 12px; font-size: .875rem; }
html body #documentDetailModal .doc-preview-mark[aria-pressed="true"] { background: #F5F6F8; border-color: #0E1115; }

/* R53-05: ein IconButton-Token (40 px am Desktop, 44 px bei Touch, Radius 12) und eine feste Kopfhöhe */
:root { --icon-btn: 44px; --icon-btn-radius: 12px; }
@media (min-width: 768px) and (pointer: fine) { :root { --icon-btn: 40px; } }
html body .header-help-btn, html body .app-header #workQueueBell, html body #documentDetailModal .doc-review-nav .btn-icon-quick, html body .ph-icon-btn, html body .page-head .page-help-link {
  width: var(--icon-btn); height: var(--icon-btn); min-width: var(--icon-btn); min-height: var(--icon-btn); border-radius: var(--icon-btn-radius); box-sizing: border-box;
}
@media (min-width: 768px) { html body .app-header { min-height: 64px; box-sizing: border-box; } }

/* R53-07: Suchfeld der Hilfe bleibt am Handy oben sichtbar, Treffer erscheinen als Liste */
@media (max-width: 900px) {
  html body .help-side { display: flex; position: static; margin: 0 0 12px; }
  html body .help-side .help-nav { display: none; }
  html body .help-side.is-searching .help-nav { display: flex; }
}

/* R54-01: Bezahlen, Stufenleiste mit Primaerknopf in Stufe 2, Tabelle der freigegebenen Belege */
.pay-flow { display: block; }
.pay-flow-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pay-flow-step .pay-flow-act { margin-top: 8px; }
.pay-flow-link.is-muted { opacity: .6; }
.pay-flow-link { align-self: flex-start; margin-top: 8px; text-decoration: none; }
.pay-flow-sub { font-size: .875rem; }
.pay-flow-table { background: #fff; border: 1px solid #D8DCE4; border-radius: 16px; box-shadow: 0 1px 2px rgba(14, 17, 21, .04); padding: 20px 24px; margin: 0 0 24px; width: 100%; box-sizing: border-box; }
.pf-title { font-size: 1.125rem; font-weight: 900; letter-spacing: -.01em; margin: 0 0 12px; color: #0E1115; }
.pf-scroll { overflow-x: auto; }
.pf-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.pf-table th { text-align: left; font-weight: 700; color: #565C67; font-size: .8125rem; padding: 8px 12px; border-bottom: 1px solid #D8DCE4; }
.pf-table td { padding: 0 12px; height: 56px; border-bottom: 1px solid #EEF0F4; vertical-align: middle; }
.pf-table .pf-chk { width: 44px; padding: 0 4px; }
.pf-table .pf-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-table .pf-vendor a { color: #0E1115; text-decoration: none; }
.pf-table .pf-vendor a:hover { text-decoration: underline; }
.pf-sub { display: block; font-size: .8125rem; color: #565C67; }
.pf-ok { color: #1B6B3A; font-weight: 600; }
.pf-warn { color: #B42318; font-weight: 600; }
.pf-table tr.off td { opacity: .55; }
.pay-empty-actions { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 1099px) { .pay-flow-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) { .pay-flow-table { padding: 12px; } .pay-flow-step .pay-flow-act .pay-flow-go { width: 100%; } .pf-table td { height: 64px; padding: 0 8px; } .pf-table .pf-iban { display: none; } .pf-table th:nth-child(4) { display: none; } }
@media (max-width: 767px) { .pay-flow-step .pay-flow-act { order: 0; } }

/* R54-02: Belegdetail, eine Fortschrittsanzeige, ruhige Fussleiste, flache Felder, Fokus nie verdeckt */
.todo-progress { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.todo-segs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.todo-seg { height: 6px; border-radius: 3px; background: #D8DCE4; }
.todo-seg.is-done { background: #0E1115; }
.todo-seg.is-current { background: #6B717C; }
.todo-progress .todo-count { font-size: .9375rem; color: #0E1115; white-space: normal; }
html:has(#documentDetailModal) { scroll-padding-bottom: calc(var(--doc-bar-h, 72px) + 24px); }
#docDetailPanel, #docPageBody, #documentDetailModal .doc-detail-body { scroll-padding-bottom: calc(var(--doc-bar-h, 72px) + 24px); }
#docDetailPanel .doc-field, #docDetailPanel .dp-card, #docDetailPanel .todo-item, #docDetailPanel .ds-row { scroll-margin-bottom: calc(var(--doc-bar-h, 72px) + 24px); }
#docDetailPanel .doc-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-bottom: 16px; }
#docDetailPanel .doc-field { margin-bottom: 16px; }
#docDetailPanel .doc-field-grid .doc-field { margin-bottom: 0; }
#docDetailPanel .dp-card { background: transparent; border: 0; border-top: 1px solid #D8DCE4; border-radius: 0; box-shadow: none; margin: 0; }
#docDetailPanel .dp-card > summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; padding-left: 0; padding-right: 0; }
#docDetailPanel .dp-card .dp-card-body { padding: 0 0 16px; }
.doc-detail-preview-body.is-loading { position: relative; min-height: 320px; }
.doc-detail-preview-body.is-loading::before { content: ""; position: absolute; inset: 24px 48px; border-radius: 8px; background: linear-gradient(90deg, #EEF0F4 0%, #F5F6F8 50%, #EEF0F4 100%); background-size: 200% 100%; animation: r54-skel 1.2s linear infinite; }
@keyframes r54-skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .doc-detail-preview-body.is-loading::before { animation: none; } }
@media (max-width: 767px) {
  #docDetailPanel .doc-field-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #documentDetailModal .doc-detail-actionbar .doc-keys-hint, #documentDetailModal .doc-detail-actionbar .doc-approve-step, #documentDetailModal .doc-detail-actionbar .doc-save-state { display: none; }
  #documentDetailModal .doc-detail-actionbar #docApproveNote:not(.is-reason) { display: none; }
  #documentDetailModal .doc-detail-actionbar #docApproveNote.is-reason { font-size: .8125rem; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
  #documentDetailModal .dph-row1 button, #documentDetailModal .dph-row1 a, #documentDetailModal .dph-row2 button, #documentDetailModal .dph-row2 a { min-height: 44px; min-width: 44px; }
  #documentDetailModal .doc-detail-title { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* R54-03: Belegliste, eine Gitterregel je Zustand (has-co, not has-co), Stand als eigene Spalte, Zeilenhoehe 56 px */
@media (min-width: 1100px) {
  html body .documents-grid .doc-table .doc-row .dr-main-chip { display: none !important; }
  html body .documents-grid .doc-table:not(.has-co) .doc-thead, html body .documents-grid .doc-table:not(.has-co) .doc-row { grid-template-columns: minmax(0, 1.6fr) minmax(185px, 1fr) 128px 156px 188px 96px !important; column-gap: 16px !important; }
  html body .documents-grid .doc-table.has-co .doc-thead, html body .documents-grid .doc-table.has-co .doc-row { grid-template-columns: minmax(0, 1.4fr) minmax(185px, 1fr) minmax(0, 1fr) 128px 156px 188px 96px !important; column-gap: 16px !important; }
  html body .documents-grid .doc-table .doc-row .dr-status, html body .documents-grid .doc-table .doc-thead .dr-status { display: flex !important; position: static !important; width: auto !important; height: auto !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; overflow: hidden !important; visibility: visible !important; align-items: center; }
  html body .documents-grid .doc-table .doc-row { height: 56px !important; min-height: 56px !important; max-height: 56px !important; box-sizing: border-box; }
  html body .documents-grid .doc-table .doc-row .dr-co { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  html body .documents-grid .doc-table .doc-row .dr-meta, html body .documents-grid .doc-table .doc-row .dr-due { min-width: 0; }
  html body .documents-grid .doc-table .doc-thead .dr-amount, html body .documents-grid .doc-table .doc-thead .dr-amount .dr-sort, html body .documents-grid .doc-table .doc-row .dr-amount { text-align: right; justify-content: flex-end; }
}
@media (max-width: 767px) {
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card { min-height: 64px !important; }
}
@media (max-width: 767px) {
  html body .documents-grid .list-seg-bar .list-seg { scroll-snap-type: x proximity; scroll-padding-inline: 8px; }
  html body .documents-grid .list-seg-bar .list-seg .list-seg-tab { scroll-snap-align: start; }
  html body #docsHeading { font-size: 1.75rem; }
}

/* R54-04: Dashboard, ruhige Karten */
html body .dash-next-all { margin-top: auto; padding-top: 8px; list-style: none; display: flex; align-items: center; }
html body .dash-next-all .btn-textlink, html body .dash-clarify-go { color: #0E1115; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
html body .dash-next-all .btn-textlink::after { content: "\2192"; }
html body .dash-next-all .btn-textlink:hover, html body .dash-clarify-go:hover { text-decoration: underline; }
html body .dash-batch-chip { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #EEF0F4; color: #333840; font-size: .8125rem; font-weight: 600; vertical-align: middle; white-space: nowrap; }
html body .dash-recent-meta { font-size: .8125rem; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
html body .dash-waiting-meta, html body .dash-waiting-age, html body .dash-kpi-sub { font-size: .8125rem; }
html body .dash-kpi-sub { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 767px) {
  html body .dash-waiting-item, html body .dash-recent-item { padding: 12px 16px; }
}

/* R54-05: Upload-Assistent im Raster der gemeinsamen Huelle (720-px-Spalte), Links im Orlop-Stil, Aktionen 44 px */
.uw .uw-card { max-width: 720px; min-height: 0; }
.uw .sw-foot-inner { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; box-sizing: border-box; }
.uw .uw-link, .uw .uw-list a { color: #0E1115; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; min-height: 44px; display: inline-flex; align-items: center; }
.uw .uw-list li.uw-state-error .uw-act, .uw .uw-list li.uw-state-duplicate .uw-act { flex-direction: column; align-items: stretch; }
.uw .uw-list .uw-act .btn-secondary, .uw .uw-list .uw-act .uw-x { min-height: 44px; }

/* R54-07: Hilfe-Navigation einklappbar und mitlaufend, Kopf ohne zweites Fragezeichen */
html body #helpHeaderBtn { display: none !important; }
html body .help-nav .help-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; background: transparent; border: 0; padding: 0 8px; cursor: pointer; font: inherit; font-weight: 700; color: #0E1115; text-align: left; }
html body .help-nav .help-group-toggle i { transition: transform .15s; }
html body .help-nav .help-group-toggle[aria-expanded="false"] i { transform: rotate(-90deg); }
html body .help-nav a[hidden] { display: none !important; }
@media (min-width: 901px) { html body .help-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; align-self: flex-start; } }
@media (prefers-reduced-motion: reduce) { html body .help-nav .help-group-toggle i { transition: none; } }

/* R54-02: keine zweite dunkle Aktion in der Karte, keine Karte in der Karte, Rechnungsnummer im Kopf ungekuerzt */
html body #documentDetailModal .todo-card .todo-answer.is-primary { background: #fff !important; color: #0E1115 !important; border: 1.5px solid #0E1115 !important; }
html body #docDetailPanel .doc-field-grid, html body #docDetailPanel .doc-field-grid > .doc-field, html body #docDetailPanel form > .doc-field { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
@media (max-width: 767px) {
  html body #documentDetailModal .dph-row2 { flex-wrap: wrap; row-gap: 4px; }
  html body #documentDetailModal .dph-row2 .doc-head-nr { order: 3; flex: 1 0 100%; white-space: normal; overflow: visible; text-overflow: clip; }
}
@media (min-width: 1100px) {
  html body .documents-grid .doc-table .doc-thead .dr-amount .dr-arrow.is-idle { display: none; }
  html body .documents-grid .doc-table .doc-row .dr-status .badge, html body .documents-grid .doc-table .doc-row .dr-status .status-chip { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body .documents-grid .doc-table .doc-row .dr-actcol { justify-content: flex-end; min-width: 0; }
}
html body .dash-recent-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
html body .dash-recent-name .dash-recent-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .dash-recent-name .dash-batch-chip { flex: none; margin-left: 0; }
html body .dash-clarify-go { border: 1px solid #0E1115; border-radius: 999px; padding: 0 16px; background: #fff; text-decoration: none !important; min-height: 40px; font-size: .875rem; }
@media (max-width: 767px) {
  html body .documents-grid .list-seg-bar .list-seg { gap: 2px; }
  html body .documents-grid .list-seg-bar .list-seg .list-seg-tab { padding-inline: 8px; font-size: .875rem; }
}
.sw-empty p + p { margin-top: 8px; }
.sw-empty p:last-child { margin-top: 20px; display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
@media (min-width: 1100px) {
  html body .documents-grid .doc-table .doc-row .dr-amount { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-start; gap: 6px; white-space: nowrap; }
  html body .documents-grid .doc-table .doc-row .dr-amount .dr-amt-chip { margin: 0 !important; position: static; flex: none; }
  html body .documents-grid .doc-table .doc-row .dr-amount { text-align: right; }
}
@media (min-width: 1100px) {
  html body .documents-grid .doc-table .doc-row { border-bottom-width: 0 !important; box-shadow: inset 0 -1px 0 #EEF0F4; padding-top: 0 !important; padding-bottom: 0 !important; align-items: center; }
  html body .documents-grid .doc-table .doc-row .dr-sel { align-self: center; height: auto; min-height: 0; }
  html body .documents-grid .doc-table .doc-row.is-overdue-row, html body .documents-grid .doc-table .doc-row[data-overdue="1"] { box-shadow: inset 0 -1px 0 #EEF0F4, inset 3px 0 0 #B42318; }
}

/* R54-04: Dashboard am Handy, Karteninnenabstand 16 bis 20 px, drei Zeilen von "Als Nächstes" ohne Scrollen */
@media (max-width: 767px) {
  html body .dash-waiting, html body .dash-recent-wrap, html body #dashboardRecent { padding: 16px !important; }
  html body .dash-waiting .dash-waiting-head { margin-bottom: 4px; }
  html body .dash-waiting-sub { margin: 0 0 4px; font-size: .8125rem; }
  html body .dash-waiting-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; align-items: center; }
  html body .dash-waiting-item .dash-waiting-main { grid-column: 1; min-width: 0; }
  html body .dash-waiting-item .dash-waiting-amount { grid-column: 2; grid-row: 1; text-align: right; }
  html body .dash-waiting-item .dash-waiting-age { grid-column: 2; grid-row: 2; text-align: right; font-size: .8125rem; }
  html body .dash-waiting-item .dash-waiting-go { grid-column: 1 / -1; min-height: 44px; }
  html body .dash-waiting-meta { font-size: .8125rem; }
}
