/* Runde 62 (2.127.0): SEPA in vier Schritten, Dashboard "Als Nächstes", Belegdetail, Assistentenhülle.
   Copyright © Fabian Stamminger @ The Platform Group */

/* R62-04: zentrale Kartenbreite der Assistenten */
:root { --wz-card-w: 720px; }

/* R62-01: SEPA-Assistent */
html body .sw .sw-card { max-width: var(--wz-card-w); margin-left: auto; margin-right: auto; }
html body .sw .sw-card.wide { max-width: 960px; }
html body .sw-table--pick tbody tr { min-height: 56px; }
html body .sw-table--pick input[type="checkbox"] { width: 24px; height: 24px; accent-color: #0E1115; }
html body .sw-np { margin: 16px 0 0; border: 1px solid #D8DCE4; border-radius: 12px; padding: 0 16px; background: #fff; }
html body .sw-np > summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; gap: 10px; list-style: none; }
html body .sw-np > summary::-webkit-details-marker { display: none; }
html body .sw-np .sw-chev { font-size: .75rem; color: #333840; transition: transform .15s ease; }
html body .sw-np[open] .sw-chev { transform: rotate(90deg); }
html body .sw-np .sw-blocked-list { padding-bottom: 8px; }
html body .sw-np .sw-blocked-row { border-top: 1px solid #EEF0F4; }
html body .sw-np .sw-scroll { padding-bottom: 12px; overflow-x: auto; }
@media (prefers-reduced-motion: reduce) { html body .sw-np .sw-chev { transition: none; } }
html body .sw-radios { display: grid; gap: 10px; }
html body .sw-radio { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; border: 1px solid #D8DCE4; border-radius: 12px; background: #fff; cursor: pointer; }
html body .sw-radio.is-on { border-color: #0E1115; box-shadow: 0 0 0 1px #0E1115; }
html body .sw-radio input { width: 22px; height: 22px; accent-color: #0E1115; flex: none; margin: 0; }
html body .sw-radio-t { display: flex; flex-direction: column; min-width: 0; }
html body .sw-radio-t small { color: #333840; font-size: .875rem; }
html body .sw-inline-err { margin: 6px 0 0; color: #B91C1C; font-size: .875rem; font-weight: 600; }
html body .sw-input[aria-invalid="true"] { border-color: #B91C1C; }
html body .sw-bigsum { margin: 8px 0 20px; }
html body .sw-bigsum-n { font-size: 2.75rem; line-height: 1.05; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #0E1115; }
html body .sw-bigsum-c { margin-top: 4px; color: #333840; font-size: 1rem; }
html body .sw-inline-link { color: #0E1115; font-weight: 600; text-decoration: underline; }
html body .sw-file-name { white-space: normal; overflow-wrap: anywhere; text-align: center; }
html body .sw-actions { flex-direction: row; }
@media (max-width: 767px) {
  html body .sw-bigsum-n { font-size: 2.25rem; }
  html body .sw-table--pick tbody tr { min-height: 56px; }
  html body .sw-table--pick td.c-chk { grid-row: 1 / span 2; }
  html body .sw-table--pick td.c-vendor { grid-column: 2; grid-row: 1; font-weight: 700; overflow-wrap: anywhere; }
  html body .sw-table--pick td.c-due { grid-column: 2; grid-row: 2; font-size: .8125rem; color: #333840; }
  html body .sw-table--pick td.num { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
}

/* R62-02: Dashboard "Als Nächstes" (und "Wartet auf dich") ein Muster, keine Überlappung */
html body .dash-next-item, html body .dash-next-item.is-open, html body .dash-next-item.is-ready { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; height: auto; min-height: 56px; padding: 8px 0; }
html body .dash-next-item .dash-next-open { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 16px; align-items: center; min-width: 0; padding: 0; min-height: 44px; }
html body .dash-next-main { display: flex; flex-direction: column; min-width: 0; }
html body .dash-next-vendor { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .dash-next-meta { display: block; font-size: .8125rem; color: #333840; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .dash-next-due { font-size: .8125rem; color: #333840; white-space: nowrap; background: #EEF0F4; border-radius: 999px; padding: 2px 10px; }
html body .dash-next-due.is-late { color: #991B1B; background: #FEE2E2; font-weight: 700; }
html body .dash-next-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
@media (max-width: 640px) {
  html body .dash-next-item .dash-next-open { grid-template-columns: minmax(0, 1fr) auto; }
  html body .dash-next-item .dash-next-open .dash-next-main { grid-column: 1; grid-row: 1; }
  html body .dash-next-item .dash-next-open .dash-next-amount { grid-column: 2; grid-row: 1; }
  html body .dash-next-item .dash-next-open .dash-next-due { grid-column: 1; grid-row: 2; justify-self: start; }
}

/* R62-02: "Prüfen" als sichtbare Pille in jeder Zeile von "Wartet auf dich", Meta mindestens 13 px */
html body .dash-waiting-item .dash-waiting-go:not(#_a):not(#_b) { display: inline-flex !important; align-items: center; justify-content: center; position: static !important; width: auto !important; height: auto !important; min-height: 44px !important; margin: 0 !important; padding: 0 18px !important; overflow: visible !important; clip: auto !important; border-radius: 999px; white-space: nowrap; }
@media (max-width: 767px) { html body .dash-waiting-item .dash-waiting-go:not(#_a):not(#_b) { grid-column: 1 / -1; justify-self: start; } }
html body .dash-waiting-meta, html body .dash-waiting-age, html body .dash-next-meta, html body .dash-next-due { font-size: .8125rem; color: #333840; }
@media (max-width: 767px) {
  html body .dash-waiting-item:not(#_a):not(#_b) { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; grid-template-rows: auto auto !important; height: auto !important; min-height: 0 !important; gap: 8px 12px !important; padding: 12px 0 !important; align-items: start !important; }
  html body .dash-waiting-item:not(#_a):not(#_b) .dash-waiting-main { grid-column: 1 !important; grid-row: 1 !important; display: flex !important; flex-wrap: wrap; gap: 2px 8px; min-width: 0; align-items: center; }
  html body .dash-waiting-item:not(#_a):not(#_b) .dash-waiting-main .dash-waiting-vendor { flex: 1 0 100%; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; min-height: 0 !important; display: block !important; }
  html body .dash-waiting-item:not(#_a):not(#_b) .dash-waiting-main .dash-row-chip, html body .dash-waiting-item:not(#_a):not(#_b) .dash-waiting-main .dash-recent-flag, html body .dash-waiting-item:not(#_a):not(#_b) .dash-waiting-main .dash-waiting-meta { grid-column: auto !important; grid-row: auto !important; margin: 0 !important; }
  html body .dash-waiting-item:not(#_a):not(#_b) .dash-waiting-amount { grid-column: 2 !important; grid-row: 1 !important; text-align: right; font-weight: 800; }
  html body .dash-waiting-item:not(#_a):not(#_b) .dash-waiting-go { grid-column: 1 / -1 !important; grid-row: 2 !important; }
}

/* R62-02: Belegliste am Handy im Auswahlmodus: einzeilige Sammelleiste, Liste endet über der Leiste, Hinweis, Lieferantenname bricht um */
html body .doc-select-hint { display: none; margin: 0 0 8px; font-size: .8125rem; color: #333840; }
html body .doc-selbar-clear { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: #D8DCE4; }
@media (max-width: 767px) {
  html body .doc-selbar { flex-wrap: nowrap !important; gap: 8px !important; padding: 6px 8px 6px 16px !important; justify-content: flex-start !important; }
  html body .doc-selbar .doc-selbar-n { flex: 1 1 auto; white-space: nowrap; }
  html body .doc-selbar .doc-selbar-go { flex: none; min-height: 44px; white-space: nowrap; padding: 0 16px; }
  html body .documents-grid.is-selecting { padding-bottom: calc(64px + 72px + 24px + env(safe-area-inset-bottom, 0px)); scroll-padding-bottom: calc(64px + 72px + 24px + env(safe-area-inset-bottom, 0px)); }
  html body .documents-grid.is-selecting .doc-select-hint { display: block; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-vendor, html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-vendor-link { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
}
@media (max-width: 767px) {
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-vendor-link:not(#_a):not(#_b) { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; display: block !important; }
  html body .documents-grid .doc-table .doc-row.doc-card.doc-card .dr-main .dr-vendor:not(#_a):not(#_b) { white-space: normal !important; overflow: visible !important; -webkit-line-clamp: unset; display: block; }
}

/* R62-03: Belegdetail. Weg des Belegs beschriftet, Kopf ohne doppelte Rückkehr, Lesemodus, Storno als Sekundärknopf */
html body .todo-step .todo-step-label:not(#_a) { position: static !important; width: auto !important; height: auto !important; clip: auto !important; overflow: visible !important; font-size: .8125rem; color: #333840; white-space: nowrap; }
html body .todo-step.is-current .todo-step-label:not(#_a) { color: #0E1115; font-weight: 800; }
html body .todo-steps { position: relative; gap: 0; justify-content: space-between; width: 100%; }
html body .todo-steps .todo-step { flex: 1 1 0; min-width: 0; position: relative; }
html body .todo-steps .todo-step + .todo-step::before { content: ""; position: absolute; left: -50%; right: 50%; top: 12px; height: 2px; background: #D8DCE4; z-index: 0; }
html body .todo-steps .todo-step.is-done + .todo-step::before, html body .todo-steps .todo-step.is-current::before { background: #0E1115; }
html body .todo-steps .todo-step { flex-direction: column; align-items: center; gap: 6px; text-align: center; }
html body .todo-steps .todo-step .todo-step-dot { position: relative; z-index: 1; }
html body .todo-step-m, html body .todo-bar { display: none; }
@media (max-width: 767px) {
  html body .todo-step-m { display: block; margin: 0 0 6px; font-weight: 800; font-size: .9375rem; color: #0E1115; }
  html body .todo-bar { display: block; height: 4px; border-radius: 2px; background: #E7EAF0; margin: 0 0 8px; overflow: hidden; }
  html body .todo-bar > span { display: block; height: 100%; background: #0E1115; }
  html body .todo-steps { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html body .doc-crumb > a:first-child, html body .doc-crumb > .doc-crumb-sep, html body .doc-crumb > [aria-current="page"] { display: none; }
}
@media (min-width: 768px) { html body .doc-page-head .doc-page-back { display: none; } }
html body .doc-head-amt { font-weight: 800; font-variant-numeric: tabular-nums; margin-left: 4px; }
html body .doc-storno-btn { min-height: 44px; border-radius: 999px; white-space: normal; }
html body .doc-locked-notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9375rem; color: #333840; }
/* Lesemodus eines gesperrten Belegs: Werte als Text, nicht als graue Felder */
html body form[data-locked="true"] .doc-field label { font-size: .75rem; color: #333840; font-weight: 600; }
html body form[data-locked="true"] input:disabled, html body form[data-locked="true"] select:disabled, html body form[data-locked="true"] textarea:disabled { background: transparent !important; border-color: transparent !important; color: #0E1115 !important; font-size: 1rem; padding-left: 0 !important; text-align: left !important; -webkit-appearance: none; appearance: none; opacity: 1; -webkit-text-fill-color: #0E1115; }
html body form[data-locked="true"] select:disabled { background-image: none !important; }

/* R62-04: Assistentenhülle, eine Kartenbreite (720 px) in Reisekosten, Weiterverrechnung und Upload */
html body .uw .uw-card, html body .tw .sw-card, html body .tw .tw-col, html body .sw .sw-card:not(.wide) { max-width: var(--wz-card-w) !important; width: 100%; margin-left: auto; margin-right: auto; box-sizing: border-box; }
html body .uw .uw-x, html body .uw [data-uw-remove] { min-width: 44px; min-height: 44px; }
html body .uw-list li.uw-state-error small.err, html body .uw-list li.uw-state-invalid small.err { font-size: .875rem; color: #0E1115; }
html body .uw-list li.uw-state-error .uw-ic, html body .uw-list li.uw-state-invalid .uw-ic { color: #B91C1C; }
html body .uw-other-link { color: #0E1115; font-weight: 600; text-decoration: underline; min-height: 44px; }
html body .sw-foot .sw-reason.is-warn::before { content: "\f05a"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif; font-weight: 900; margin-right: 6px; }
html body .sw-foot .sw-reason, html body .tw-hint { font-size: .875rem; }
