/* Runde 40 (2.105.0): sichtbare Dashboard-Pille, Zuordnen als festes Vollbild, ruhige Detail-Fußleiste, Belegliste in voller Breite. Copyright © Fabian Stamminger @ The Platform Group */

/* ---- R40-01: dunkle Primärpille "Lieferanten zuordnen (n)" ---- */
.dash-waiting-empty.is-warn .dash-assign-pill, .dash-waiting-empty .dash-pill.dash-assign-pill, button.dash-pill.dash-assign-pill {
  background: #0E1115; color: #fff !important; border: 0; border-radius: 9999px; min-height: 44px; padding: 0 24px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.dash-waiting-empty.is-warn .dash-assign-pill:hover { background: #333840; }
.dash-waiting-empty.is-warn .dash-assign-pill:focus-visible { outline: 2px solid #0E1115; outline-offset: 3px; }

/* ---- R40-02: Zuordnen als festes Vollbild, Fuß immer am unteren Rand ---- */
.sw { position: fixed; inset: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 0 !important; margin: 0 !important; overflow: hidden; }
.sw > .sw-head, .sw > .sw-foot { flex: none; }
.sw > .sw-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sw > .sw-foot { position: static; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); margin: 0; }
.sw > .sr-only { position: absolute; }
body:has(.sw) .app-content { padding-bottom: 0 !important; }
.sw-kbd { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; font: inherit; font-size: .75rem; font-weight: 700; line-height: 1.4; opacity: .75; }
.sw-foot .btn-primary .sw-kbd { border-color: rgba(255,255,255,.6); }
@media (hover: none) and (pointer: coarse) { .sw-kbd { display: none; } }
.sw-file { margin: 0 0 4px; font-weight: 700; overflow-wrap: anywhere; }
.sw-recv { margin: 0 0 12px; font-size: .875rem; }
.sw-beleg h2 { margin-bottom: 4px; }
.sw-beleg .sw-prev { margin-top: 16px; border: 0; border-top: 1px solid #D8DCE4; border-radius: 0; background: transparent; }
.sw-beleg .sw-prev summary { padding: 0; font-weight: 800; }
.sw-beleg .sw-prev-box { border: 1px solid #D8DCE4; border-radius: 10px; overflow: hidden; }
.sw-opt { min-height: 48px; justify-content: center; }
.sw-opt-met, .sw-opt-meta { line-height: 1.25; }
.sw-done .sw-muted { text-align: center; }
@media (max-width: 767px) {
  .sw-head { flex-wrap: nowrap; align-items: center; gap: 4px; padding: 8px 12px; min-height: 56px; }
  .sw-head > .btn-ghost.sw-back { padding: 0; width: 44px; min-width: 44px; justify-content: center; }
  .sw-back span { display: none !important; }
  .sw-head > .sw-back, .sw-head > .sw-help-btn, .sw-head > h1 { padding-bottom: 0; margin-bottom: 0; }
  .sw-head > .sw-help-btn { margin-left: 0; flex: none; }
  .sw-head-main { flex: 1 1 auto; min-width: 0; padding-bottom: 0; flex-direction: column; align-items: flex-start; gap: 0; }
  .sw-head h1 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.2; }
  .sw-step { font-size: .8125rem; line-height: 1.2; }
  .sw-head > h1 { flex: 1 1 auto; min-width: 0; }
  .sw-foot { gap: 8px; }
  .sw-foot .btn-primary { order: -1; flex: 1 1 100%; }
  .sw-foot .btn-ghost, .sw-foot .btn-secondary { flex: 1 1 auto; }
  .sw-spacer { display: none; }
}

/* ---- R40-02: Beleg-Detail 390: Fußleiste = eine Statuszeile + ein Knopf ---- */
@media (max-width: 767px) {
  #documentDetailModal .doc-detail-actionbar.has-decision .doc-bar-summary { flex: 1 1 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9375rem; }
  #documentDetailModal .doc-bar-summary .bar-due + .bar-sep, #documentDetailModal .doc-bar-summary .bar-due + .bar-sep + .bar-status { display: none; }
  #docApproveNote.is-reason, #docApproveNote:not(:empty) { font-size: .8125rem; line-height: 1.3; text-align: left; margin: 0; }
  #documentDetailModal .doc-detail-actionbar.has-decision { gap: 4px; padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- R40-04: Leerzustände nach Datenstand ---- */
.doc-done-check[data-neutral] { background: #F5F6F8; color: #333840; border: 1px solid #D8DCE4; }
.pay-empty .pill-btn + .btn-secondary, .pay-empty .btn-primary + .btn-secondary { margin-top: .5rem; }
#travelNewBtn.tp-btn-primary, .tp-empty .tp-btn-primary { background: #0E1115; color: #fff; border-radius: 9999px; min-height: 44px; padding: 0 24px; font-weight: 700; }

/* ---- R40-05: Belegliste ruhig: Dateityp-Chip statt Schloss, Massen-Status grau ---- */
.dr-ftype { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: #F5F6F8; border: 1px solid #D8DCE4; color: #565C67; font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1.6; vertical-align: 1px; }
.doc-bulk-band { background: #F5F6F8; border: 1px solid #D8DCE4; color: #333840; }
.doc-bulk-band .doc-bulk-band-head strong { color: #0E1115; }
/* R53-01: Listen-Umbruch bei 1100 px */
@media (min-width: 1100px) {
  .documents-grid .doc-row .dr-act { min-height: 32px; padding: 0 16px; }
}
.app-footer .app-footer-when { margin-left: .3em; }

/* ---- R40b: Zeilenhöhe 48 px, flache Kein-Vorschau-Zeile in Zuordnen ---- */
.sw-opt, .sw-opt:hover { min-height: 48px; padding: 4px 14px; gap: 0; justify-content: center; }
.sw-opt .sw-opt-name { line-height: 1.25; }
.sw-opt .sw-opt-meta { font-size: .8125rem; line-height: 1.2; }
.sw-opt .sw-chip { line-height: 1.2; padding-top: 0; padding-bottom: 0; font-size: .75rem; }
.sw-noprev { padding: 12px; }
.sw-noprev-text { margin: 0 0 8px; font-weight: 600; }
.sw-noprev .preview-empty-actions { justify-content: flex-start; margin-top: 0; }
.sw-beleg .sw-prev-box.has-no-preview { border: 0; background: #F5F6F8; height: auto; min-height: 0; aspect-ratio: auto; }
