/* Redesign 2026, Runde 41 (2.106.0): Zuordnen am Handy, Fokus, Hierarchie in Liste und Dashboard, Upload-Ablauf */

/* R41-05: ein Fokus-Token. --focus-ring ist die Farbe, --focus-shadow der Weißrand dazu. */
:root { --focus-ring: #0E1115; --focus-shadow: 0 0 0 2px #fff, 0 0 0 4px #0E1115; }
:where(a, button, input, select, textarea, summary, [role="tab"], [role="option"], [tabindex]:not([tabindex="-1"])):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible, h2[tabindex="-1"]:focus-visible, .sw-done h2:focus, .sw-done h2:focus-visible { outline: 0 !important; box-shadow: none !important; }
.mshell-tabbar .mshell-tab { min-width: 0; }
.mshell-tab span { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mshell-tab[aria-current="page"] span { font-weight: 800; }
.wq-bell #workQueueBadge { background: #B91C1C; color: #fff; }

/* R41-01: Zuordnen am Handy, der Hauptjob steht über der Falz */
.sw-detline { display: none; margin: 0; color: #333840; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sw-assign-hint { margin: 0; color: var(--orlop-muted-text, #565C67); font-size: .875rem; }
.sw-assign-hint[hidden] { display: none; }
.sw > .sw-body { scroll-padding-bottom: 88px; }
.sw-skipbtn { min-height: 48px; padding: 0 12px; }
.sw-prevbtn i { display: none; }
.sw-beleg .sw-prev.is-noprev { margin-top: 8px; padding-top: 8px; }
.sw-beleg .sw-prev.is-noprev > summary { display: none; }
.sw-beleg .sw-prev.is-noprev .sw-prev-box { border: 0; background: transparent; }
.sw-noprev { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0; }
.sw-noprev .sw-noprev-text { margin: 0; font-weight: 600; font-size: .875rem; }
.sw-noprev .preview-empty-actions { margin: 0; gap: 0; }
.sw-noprev [data-pe="reload"] { display: none; }
.sw-noprev [data-pe="download"] { background: none; border: 0; padding: 0; min-height: 32px; text-decoration: underline; font-weight: 600; color: #0E1115; }
@media (max-width: 767px) {
  .sw-body { padding: 12px 16px; }
  .sw-grid { gap: 12px; }
  .sw-col { gap: 12px; }
  .sw-beleg { padding: 12px 14px; }
  .sw-beleg > h2, .sw-beleg .sw-recv, .sw-dl-wrap { display: none; }
  .sw-detline { display: block; font-size: .875rem; }
  .sw-file { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 2px; }
  .sw-beleg .sw-prev { margin-top: 8px; padding-top: 4px; }
  .sw-beleg .sw-prev summary { min-height: 40px; }
  .sw-right { padding: 12px 14px; gap: 8px; }
  .sw-right .sw-h2 { margin: 0; }
  .sw-list { max-height: none; }
  .sw-foot { flex-wrap: nowrap; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .sw-foot .btn-primary { order: 0; flex: 1 1 auto; justify-content: center; }
  .sw-foot .btn-ghost, .sw-foot .btn-secondary, .sw-foot .btn-textlink { flex: 0 0 auto; }
  .sw-prevbtn { width: 48px; padding: 0; justify-content: center; }
  .sw-prevbtn i { display: inline-block; }
  .sw-prevtxt { display: none; }
  .sw-spacer { display: block; flex: 1 1 0; min-width: 0; }
  .sw-foot .sw-spacer { display: none; }
  .sw-hint { padding: 8px 12px; font-size: .875rem; }
}

/* R41-04: Belegliste, Aktionsspalte fest 168 px, gleiche Knöpfe mit Innenpolster */
/* R53-01: Listen-Umbruch bei 1100 px */
@media (min-width: 1100px) {
  .documents-grid .doc-table:not(.has-co):not(.has-sel) { --g-act: 168px; }
  .documents-grid .doc-table.has-co .doc-thead, .documents-grid .doc-table.has-co .doc-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 150px) minmax(80px, 110px) minmax(80px, 110px) minmax(120px, 170px) 168px !important; }
  .documents-grid .doc-table .doc-row .dr-actcol, .documents-grid .doc-table .dr-actcol { width: 168px; min-width: 168px; justify-self: end; display: flex; justify-content: flex-end; align-items: center; }
  .documents-grid .doc-table .doc-row .dr-act { box-sizing: border-box; height: 32px; min-height: 32px; width: 152px; padding: 0 14px !important; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8125rem; font-weight: 600; background: #fff !important; color: #0E1115 !important; border: 1px solid #6B717C !important; }
  .documents-grid .doc-row:hover .dr-act, .documents-grid .doc-row:focus-within .dr-act, .documents-grid .doc-row .dr-act:focus-visible { background: #0E1115 !important; color: #fff !important; border-color: #0E1115 !important; }
}
.dr-sel-off { cursor: not-allowed; }

/* R41-04: Dashboard, genau eine dunkle Pille; Zuordnen sekundär */
.dash-waiting-go, .dash-waiting-vendor-go { background: #fff !important; color: #0E1115 !important; border: 1px solid #6B717C !important; width: 112px; min-width: 112px; justify-content: center; padding-left: 14px; padding-right: 14px; }
body #dashUploadBtn, body.has-clarify #dashUploadBtn { background: #0E1115 !important; color: #fff !important; border: 1px solid #0E1115 !important; }
body #dashUploadSecondary, body.has-clarify #dashUploadSecondary { background: #fff !important; color: #0E1115 !important; border: 1px solid #6B717C !important; }
body #dashWaitingAssign, body.has-clarify #dashWaitingAssign { background: #fff; color: #0E1115; border: 1px solid #6B717C; border-radius: 999px; text-decoration: none; font-weight: 700; padding: 0 16px; min-height: 40px; }
.dash-waiting-all.btn-secondary, .dash-section-action { background: #fff; color: #0E1115; border: 1px solid #6B717C; }
.dash-meta-wrap, .dash-waiting-meta, .dash-recent-meta { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }

/* R41-02: Upload-Wizard */
.uw-row-skel { display: block; height: .75rem; width: 8rem; margin-top: .35rem; border-radius: 6px; background: linear-gradient(90deg, #EEF0F4, #F8F9FB, #EEF0F4); background-size: 200% 100%; animation: uwSkel 1.2s linear infinite; }
.uw-drop:focus-visible { outline: 2px solid #0E1115; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .uw-row-skel { animation: none; } }

/* R41-06: kein Mandantenwähler auf Neuigkeiten */
body.on-news #orgSelector { display: none; }
.uw .sw-foot-inner button[disabled], .uw .sw-foot-inner .btn-primary[disabled] { opacity: .45; cursor: not-allowed; }
.uw-top > .sw-close { order: 3 !important; margin-left: 0; }
.uw-top > h1 { order: 0 !important; }
.uw-top > .uw-steps { order: 1 !important; }
.uw-top > .uw-mini { order: 2 !important; margin-left: auto; }
@media (max-width: 767px) { .uw-top > .sw-close { order: 1 !important; margin-left: auto; } .uw-top > .uw-mini { margin-left: 0; flex: 1 0 100% !important; } }
.uw-list li { flex-wrap: wrap; }
.uw-list li .uw-name { flex: 1 1 12rem; }
.uw-list li > button.btn-secondary { margin-left: auto; }
@media (max-width: 767px) { .uw-list li > .uw-name { flex-basis: calc(100% - 2.5rem); } .uw-list li > button { margin-left: 2.25rem; } .uw-list li > button.uw-x { margin-left: auto; } }
@media (max-width: 767px) {
  .dash-waiting-item .dash-waiting-meta, .dash-waiting-item .dash-waiting-main .dash-waiting-meta { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
}
/* R53-01: Listen-Umbruch bei 1100 px */
@media (max-width: 1099px) {
  .dr-yr { display: none; }
}

/* R41 Nacharbeit: D-1979 Dashboard 390 ohne Überlauf, D-1980 Eingangsdatum ohne Jahr und ohne Kappung, D-1981 Tour-Knopf sekundär */
@media (max-width: 767px) {
  .dash-waiting-go, .dash-waiting-vendor-go { width: auto; min-width: 0; max-width: 100%; flex: 0 0 auto; }
}
/* R53-01: Listen-Umbruch bei 1100 px */
@media (max-width: 1099px) {
  .documents-grid .doc-row .dr-sub-file { white-space: normal; overflow: visible; text-overflow: clip; }
}
.tour-hint-start { background: #fff !important; color: #0E1115 !important; border: 1px solid #6B717C !important; }
