/* Redesign Runde 57 (2.122.0): Belegliste, Zeilen mit 48 px, feste Spalte für Typ und Schloss, eine Pille, Zeile ganz klickbar mit Chevron.
   Copyright © Fabian Stamminger @ The Platform Group */
:root { --r57-row: 48px; }
.dr-pill { align-self: flex-start; height: 24px; line-height: 1; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.dr-pill-bad { background: #FEE2E2; color: #991B1B; }
.dr-pill-warn { background: #FEF3C7; color: #92400E; }
.dr-pill-review { background: #E8EAEF; color: #0E1115; }
.dr-pill-more { display: inline-flex; align-items: center; margin-left: 6px; font-size: .8125rem; font-weight: 700; color: #565C67; }
/* Typ-Symbol und Schloss belegen eine feste Spalte, der Lieferantenname beginnt in jeder Zeile an derselben Stelle */
@media (min-width: 768px) {
    .documents-grid .doc-table .dr-vendor-link .dr-ftype,
    .documents-grid .doc-table .dr-vendor-link .dr-lock { display: inline-block; box-sizing: border-box; width: 52px; text-align: left; }
    .documents-grid .doc-table .dr-vendor-link .dr-lock { width: 54px; }
}
.documents-grid .doc-table .dr-vendor-link .dr-ftype { font-size: .6875rem; }
.documents-grid .doc-table .dr-amt-chip { background: none !important; border: 0 !important; padding: 0 !important; margin-left: 6px; border-radius: 0 !important; min-height: 0 !important; font-size: .75rem; font-weight: 600; color: #565C67 !important; }
@media (min-width: 768px) {
    html body .documents-grid .doc-table .doc-row.doc-card, html body .documents-grid .doc-table .doc-row { height: var(--r57-row) !important; min-height: var(--r57-row) !important; max-height: var(--r57-row) !important; padding-top: 0 !important; padding-bottom: 0 !important; align-items: center; cursor: pointer; }
    .documents-grid .doc-table .doc-row .dr-meta { line-height: 1.2; }
    .documents-grid .doc-table .doc-row .dr-meta .dr-m1, .documents-grid .doc-table .doc-row .dr-meta .dr-m2 { line-height: 1.2; }
    /* Chevron statt Knopf mit Text, der Beleg öffnet mit der ganzen Zeile; Zuordnen bleibt ein Knopf */
    .documents-grid .doc-table .dr-actcol .dr-act:not(.dr-act-assign) { font-size: 0 !important; width: 44px !important; min-width: 44px !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; position: relative; }
    .documents-grid .doc-table .dr-actcol .dr-act:not(.dr-act-assign)::after { content: "\203A"; font-size: 1.5rem; line-height: 1; color: #0E1115; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
}
@media (min-width: 1100px) {
    html body .documents-grid .doc-table.no-status:not(.has-co) .doc-thead, html body .documents-grid .doc-table.no-status:not(.has-co) .doc-row { grid-template-columns: minmax(0, 1.6fr) minmax(185px, 1fr) 128px 156px 96px !important; }
    html body .documents-grid .doc-table.no-status .dr-status { display: none !important; }
}

.documents-grid .doc-table .dr-status { display: flex; align-items: center; white-space: nowrap; min-width: 0; }
@media (min-width: 768px) { .documents-grid .doc-table .doc-row .dr-sub-file { display: none; } }
.list-review-go { min-height: 44px; margin-left: auto; margin-right: 8px; white-space: nowrap; }

.dr-main-chip { display: inline-flex; align-items: center; }
@media (max-width: 767px) {
    .list-seg-bar { flex-wrap: wrap; }
    .list-review-go { order: 5; flex: 1 0 100%; margin: 8px 0 0; }
}
html body .documents-grid .doc-row .dr-status > .dr-pill { min-height: 24px; height: 24px; padding: 0 10px; }
html body .documents-grid .doc-row .dr-status > .dr-pill-more { min-height: 24px; height: auto; padding: 0; }

/* R57-02: Schrittbalken im Beleg als Liste */
.todo-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.todo-step { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 10px; border-top: 3px solid #D8DCE4; color: #565C67; font-size: .8125rem; }
.todo-step.is-done { border-top-color: #0E1115; color: #0E1115; }
.todo-step.is-current { border-top-color: #0E1115; color: #0E1115; font-weight: 700; }
.todo-step-dot { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #D8DCE4; background: #F5F6F8; font-size: .75rem; font-weight: 700; }
.todo-step.is-done .todo-step-dot { background: #0E1115; border-color: #0E1115; color: #fff; }
.todo-step.is-current .todo-step-dot { background: #fff; border: 2px solid #0E1115; box-shadow: 0 0 0 3px #D8DCE4; color: #0E1115; }
.todo-step-label { overflow-wrap: anywhere; line-height: 1.25; }
.todo-step-now { font-size: .75rem; font-weight: 700; color: #0E1115; }
@media (max-width: 599px) { .todo-step:not(.is-current) .todo-step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .todo-steps { gap: 4px; } }

/* R57-02: Brotkrümel im Beleg, Oberkante von Vorschau und Karte gleich */
.doc-crumb { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: .8125rem; color: #565C67; min-width: 0; }
.doc-crumb a { color: #565C67; text-decoration: none; }
.doc-crumb a:hover { text-decoration: underline; color: #0E1115; }
.doc-crumb [aria-current="page"] { color: #0E1115; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body #docDetailPreview { margin-top: 0 !important; top: 0 !important; }

/* R57-04: Dashboard, Fortschritt heute, Lieferant fehlt als gleichwertige Zeile, gleiche Kartenhöhen */
.dash-waiting-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.dash-waiting-sub .dash-sub-progress { font-weight: 700; color: #0E1115; font-variant-numeric: tabular-nums; }
.dash-clarify-head .dash-clarify-label { display: inline-flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 600; color: #0E1115; letter-spacing: 0; }
.dash-clarify-head .dash-clarify-go { min-height: 44px; }
@media (min-width: 1100px) {
    .dash-waiting, .dash-recent { align-self: stretch; }
    .dash-waiting { display: flex; flex-direction: column; }
    .dash-waiting-list { display: flex; flex-direction: column; flex: 1 1 auto; }
    .dash-waiting-list .dash-clarify-head { margin-top: auto; border-top: 1px solid #EEF0F4; padding-top: 8px; }
}
.doc-crumb .doc-crumb-help { margin-left: 8px; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #D8DCE4; border-radius: 6px; font-weight: 700; color: #0E1115; }

/* R57 Nacharbeit (D-2693): Neuigkeiten wirklich einspaltig, Text nutzt die volle Kartenbreite, keine Wortbrüche */
html body #newsList .news-entry { display: block; grid-template-columns: none; max-width: 760px; }
html body #newsList .news-entry .news-entry-meta { position: static; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: 0 0 .5rem; }
html body #newsList .news-entry .news-entry-body { width: 100%; box-sizing: border-box; }
html body #newsList .news-entry-body li { display: block; width: 100%; max-width: none; }
html body #newsList .news-entry-body li .news-item-text, html body #newsList .news-entry-body li > span { display: block; max-width: none; overflow-wrap: break-word; word-break: normal; hyphens: manual; }
/* D-2692: Hauptknopf im Upload-Duplikat bleibt lesbar */
html body .uw a.btn-primary.uw-open-existing, html body .uw a.btn-primary.uw-open-existing:visited, html body .uw a.btn-primary.uw-open-existing:hover { color: #fff !important; background: #0E1115; text-decoration: none; }

/* D-2698: Zahlungen mobil, IBAN (maskiert) unter dem Lieferanten, Pille bricht nicht um */
@media (max-width: 767px) {
  .pf-table .pf-iban-m { white-space: nowrap; }
  .pf-table .pf-iban-m .pf-pill-bad { white-space: nowrap; display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; }
  .pf-table .pf-iban-m .pf-iban-val { font-size: .75rem; color: #565C67; }
  .pf-table .pf-iban-m .pf-iban-src { display: none; }
}

/* R58-04: Designsystem-Grundlagen. Tokens, runder 32-px-Hilfeknopf, Header-Selects, Pillen, reduced-motion (zuletzt geladene CSS) */
:root { --r-pill: 999px; --r-md: 12px; --r-sm: 8px; --bd: 1px solid #D8DCE4; --h-sm: 32px; --h-md: 40px; --h-lg: 48px; --pill-h: 24px; --pill-px: 10px; }
html body .page-help-link, html body .page-head .page-help-link { width: var(--h-sm); height: var(--h-sm); min-width: var(--h-sm); min-height: var(--h-sm); border-radius: 50%; padding: 0; box-sizing: border-box; font-size: .875rem; line-height: 1; }
html body .app-header select, html body .header-select { border: var(--bd); border-radius: var(--r-sm); min-height: var(--h-md); background-color: #fff; color: #0E1115; }
html body .pf-pill-bad, html body .dr-pill, html body .doc-pill, html body .status-pill { min-height: var(--pill-h); box-sizing: border-box; padding-left: var(--pill-px); padding-right: var(--pill-px); }
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
/* R58-02: aktuelles Segment des Schrittbalkens dicker (Text "Aktuell" trägt die Information, nicht nur Farbe) */
html body .todo-step.is-current { border-top-width: 6px; padding-top: 7px; }
/* R58-03: Grund für den gesperrten SEPA-Start */
html body .pay-flow-reason { display: block; margin-top: 8px; font-size: .875rem; color: #565C67; }
html body .pay-flow-reason .pay-flow-reason-link { color: #0E1115; font-weight: 700; text-decoration: underline; }
html body .pay-flow-go[aria-disabled="true"] { background: #D8DCE4; border-color: #D8DCE4; color: #565C67; cursor: not-allowed; }
/* R58-05: Als Nächstes, eine Hauptzeile mit dunklem Knopf, übrige Zeilen ruhig mit Chevron; Karten gleich hoch */
html body .dash-waiting-go.dash-waiting-chev { min-width: 44px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #565C67; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
html body .dash-waiting-go.dash-waiting-chev:hover { background: #F5F6F8; color: #0E1115; }
@media (min-width: 900px) { html body .dash-cols, html body .dash-grid { align-items: stretch; } }
@media (max-width: 767px) { html body .page-help-link, html body .page-head .page-help-link { width: 44px; height: 44px; min-width: 44px; min-height: 44px; } }
