/* Redesign Runde 36 (2.101.0): Dashboard-Zeilen, Belegliste, Prüf-Flow, Hilfe-Knöpfe.
   Copyright © Fabian Stamminger @ The Platform Group */

/* ---- R36-02 Dashboard ---- */
.dash-columns { align-items: start; }
.dash-assign-hint { display: block; margin: 6px 0 0; color: var(--orlop-text-2, #5B616B); font-size: .8125rem; }
.dash-waiting-more { list-style: none; padding: 10px 0 0; }
.dash-row-chip { display: none; }
.mshell-tab[aria-current="page"]::after { content: none !important; }
.mshell-tab { position: relative; }
.mshell-badge { position: absolute; top: 4px; left: 50%; margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #0E1115; color: #fff; font-size: .75rem; font-weight: 700; line-height: 18px; text-align: center; font-style: normal; }
@media (max-width: 767px) {
  .dash-row-chip { display: inline-flex; align-items: center; }
  .dash-waiting-item { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 4px; align-items: center; min-height: 64px; padding: 10px 0 !important; }
  .dash-waiting-item .dash-waiting-main { grid-column: 1; grid-row: 1 / span 2; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 4px; align-items: center; min-width: 0; }
  .dash-waiting-item .dash-waiting-vendor { grid-column: 1 / -1; grid-row: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-waiting-item .dash-row-chip, .dash-waiting-item .dash-recent-flag { grid-column: 1; grid-row: 2; margin: 0; }
  .dash-waiting-item .dash-waiting-meta { grid-column: 2; grid-row: 2; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; min-width: 0; }
  .dash-waiting-item .dash-waiting-amount { grid-column: 2; grid-row: 1; align-self: start; }
  .dash-waiting-item .dash-waiting-age { display: none !important; }
  .dash-recent-item { align-items: center; }
}
@media (max-width: 767px) {
  .dash-waiting-item .dash-waiting-vendor { font-size: 1rem; line-height: 1.3; padding: 0; min-height: 0; }
  .dash-waiting-item { row-gap: 2px; padding: 8px 0 !important; }
  .dash-waiting-item .dm-no, .dash-waiting-item .dm-sep { display: none; }
  .dash-waiting-item .dash-row-chip .badge, .dash-waiting-item .dash-recent-flag { font-size: .75rem; }
}

/* ---- R36-03 Belegliste: Spaltengrid, Platzhalter-Kästchen, ruhige Aktionen ---- */
.docs-sel-hint { margin: 0 0 8px; color: var(--orlop-text-2, #5B616B); font-size: .8125rem; }
.dr-ph-box { display: inline-block; width: 18px; height: 18px; box-sizing: border-box; border: 1.5px solid #B8BEC9; border-radius: 4px; background: #F5F6F8; cursor: not-allowed; }
.dr-sel-off, .dr-sel-none { cursor: not-allowed; }
.dr-lock { font-size: .75rem; color: #565C67; margin-right: 4px; }
.doc-mine-mark { text-decoration: none !important; font-weight: 600; }
@media (min-width: 1100px) {
  .documents-grid .doc-table .doc-thead, .documents-grid .doc-table .doc-row,
  .documents-grid .doc-table.has-co .doc-thead, .documents-grid .doc-table.has-co .doc-row,
  .documents-grid .doc-table.has-sel .doc-thead, .documents-grid .doc-table.has-sel .doc-row,
  .documents-grid .doc-table:not(.has-co):not(.has-sel) .doc-thead, .documents-grid .doc-table:not(.has-co):not(.has-sel) .doc-row {
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) 200px 130px 130px 220px 140px !important;
    column-gap: 24px !important; align-items: center; width: 100%; box-sizing: border-box;
  }
  .documents-grid .doc-table.has-co .doc-thead, .documents-grid .doc-table.has-co .doc-row { grid-template-columns: minmax(240px, 1fr) minmax(180px, 280px) 200px 130px 130px 220px 140px !important; }
  .documents-grid .doc-table .dr-kind { display: none !important; }
  .documents-grid .doc-table .doc-thead .dr-amount, .documents-grid .doc-table .doc-thead .dr-amount .dr-sort, .documents-grid .doc-table .doc-row .dr-amount { justify-content: flex-end; text-align: right; }
  .documents-grid .doc-table .dr-actcol { justify-self: end; width: 100%; display: flex; justify-content: flex-end; }
  .documents-grid .doc-table .doc-thead .dr-amount .dr-sort { padding-right: 0; margin-right: 0; }
  .documents-grid .doc-table .doc-thead .dr-amount, .documents-grid .doc-table .doc-row .dr-amount { padding-right: 0 !important; }
  .documents-grid .doc-table .doc-row:hover { background: #F5F6F8; }
  .documents-grid .doc-table .dr-sel, .documents-grid .doc-table .dr-selhead { width: 44px; }
  .documents-grid .doc-table.has-sel .doc-thead, .documents-grid .doc-table.has-sel .doc-row { padding-left: 44px !important; padding-right: 16px !important; }
}
/* Aktionspillen: Outline, gefüllt nur bei Hover/Fokus der Zeile; Schrift mind. 12 px, Zielhöhe mind. 32 px */
.documents-grid .doc-row .dr-act { min-height: 32px; font-size: .8125rem; background: #fff !important; color: #0E1115 !important; border: 1px solid #0E1115 !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; }
/* R53-01: Listen-Umbruch bei 1100 px */
@media (max-width: 1099px) {
  .documents-grid .doc-row .dr-act { min-height: 44px; }
}

/* ---- R36-01 Prüf-Flow: zweiebener Kopf, Mehr-Menü im Kopf, Empfängerfrage, Abweisen-Dialog ---- */
#documentDetailModal .doc-page-head { display: block !important; padding: 4px var(--page-gutter, 16px) 6px !important; }
#documentDetailModal .dph-row1 { display: flex; align-items: center; gap: 8px; min-height: 48px; max-height: 56px; }
#documentDetailModal .dph-row1 .doc-detail-title { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; max-width: none !important; margin: 0; font-size: 1.125rem; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; overflow-wrap: normal !important; }
#documentDetailModal .dph-row1 .doc-page-back { flex: none; min-width: 44px; min-height: 44px; padding: 0 10px; }
#documentDetailModal .dph-row1 .doc-review-nav { flex: none; display: inline-flex; align-items: center; gap: 2px; position: static !important; margin: 0 !important; padding: 0 !important; }
#documentDetailModal .dph-more { position: relative; flex: none; display: inline-flex; }
#documentDetailModal .dph-more .doc-detail-more { position: static !important; inset: auto !important; margin: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; padding: 0; font-size: 0; }
#documentDetailModal .dph-more .doc-detail-more i { font-size: 1.125rem; margin: 0; }
#documentDetailModal .dph-more .doc-detail-more-menu { display: block; position: absolute; top: calc(100% + 6px); bottom: auto; right: 0; z-index: 30; min-width: 220px; padding: .25rem; background: #fff; border: 1px solid #D8DCE4; border-radius: 12px; box-shadow: 0 12px 32px rgba(14,17,21,.16); }
#documentDetailModal .dph-more .doc-detail-more-menu[hidden] { display: none; }
#documentDetailModal .dph-more .doc-detail-more-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: transparent; font: inherit; text-align: left; border-radius: 8px; cursor: pointer; color: #0E1115; }
#documentDetailModal .dph-more .doc-detail-more-menu button:hover, #documentDetailModal .dph-more .doc-detail-more-menu button:focus-visible { background: #F5F6F8; }
#documentDetailModal .dph-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0 0 2px; min-width: 0; }
#documentDetailModal .dph-row2 .doc-head-stage { white-space: normal; flex: 1 1 200px; min-width: 0; }
@media (max-width: 767px) {
  #documentDetailModal .dph-back-t { display: none; }
  #documentDetailModal .dph-row1 { gap: 4px; min-height: 48px; }
  #documentDetailModal .dph-row1 .doc-detail-title { font-size: 1rem; }
  #documentDetailModal .dph-row1 .doc-review-nav .btn-icon-quick { width: 40px; height: 40px; min-width: 40px; }
  #documentDetailModal .dph-row1 .doc-review-nav { gap: 0; }
  #documentDetailModal .dph-row1 .doc-review-nav .doc-review-pos-long { display: none; }
  #documentDetailModal .dph-row1 .doc-review-nav .doc-review-pos-short { display: inline; }
}
#docPageBody, #docDetailPanel, .doc-detail-box { scroll-padding-bottom: calc(var(--doc-bar-h, 72px) + 16px); }
#docPageBody { padding-bottom: calc(var(--doc-bar-h, 72px) + 16px); }
.todo-radios { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.todo-radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid #D8DCE4; border-radius: 10px; cursor: pointer; background: #fff; }
.todo-radio:has(input:checked) { border-color: #0E1115; box-shadow: inset 0 0 0 1px #0E1115; }
.todo-radio input { width: 20px; height: 20px; accent-color: #0E1115; margin: 0; }
.todo-radio:focus-within { outline: 2px solid #0E1115; outline-offset: 2px; }
/* Abweisen: kleiner Dialog, am Handy Bottom-Sheet in Inhaltshöhe */
[data-docact-small] > div { max-width: 30rem !important; }
@media (max-width: 767px) {
  [data-docact-small] { align-items: flex-end !important; padding: 0 !important; overflow: hidden !important; }
  [data-docact-small] > div { max-width: none !important; border-radius: 16px 16px 0 0 !important; }
}
[data-docact-small] .rj-chips { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
[data-docact-small] .rj-chip { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; border-radius: 10px; text-align: left; padding: 0 12px; }
[data-docact-small] .rj-chip[aria-checked="true"] { background: #fff; color: #0E1115; border-color: #0E1115; box-shadow: inset 0 0 0 1px #0E1115; }
.rj-dot { flex: none; width: 18px; height: 18px; box-sizing: border-box; border: 2px solid #8A909C; border-radius: 50%; background: #fff; }
.rj-chip[aria-checked="true"] .rj-dot { border-color: #0E1115; background: radial-gradient(circle, #0E1115 0 45%, #fff 50%); }
[data-docact-small] textarea { min-height: 56px; }
[data-docact-submit][aria-disabled="true"] { background: #D8DCE4 !important; color: #0E1115 !important; border-color: #D8DCE4 !important; cursor: not-allowed; }

/* ---- R36-04 Login: Abstand, Feldrand, Fokusring, Versionslink ---- */
#loginForm { margin-top: 24px; }
#loginForm input { border-color: var(--orlop-field-border, #6B717C) !important; }
#loginForm input:focus, #loginForm input:focus-visible { outline: 2px solid #0E1115; outline-offset: 2px; border-color: #0E1115 !important; box-shadow: none; }
.login-version-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.login-reset-link { color: inherit; font-weight: 700; text-decoration: underline; }
/* Neuigkeiten: dünne linke Kante in Linienfarbe */
.news-entry { border-left: 1px solid #D8DCE4; }
/* Ein ? je Screen: nie zwei, keines auf Neuigkeiten und Hilfe */
body.no-title-help .page-help-link { display: none !important; }
#helpHeaderBtn[hidden] { display: none !important; }

/* ---- R36-05 Hilfe: Seitennavigation mit aktivem Abschnitt, Sidebar mit eigenem Scroll, FAQ als Akkordeon ---- */
.help-toc a[aria-current="true"] { border-left-color: #0E1115; background: rgba(14,17,21,.06); font-weight: 700; }
.help-side, .help-toc { max-height: calc(100vh - var(--chrome-h, 64px) - 28px); overflow-y: auto; overscroll-behavior: contain; }
.help-faq { display: flex; flex-direction: column; gap: 6px; }
.help-faq-group { margin: 14px 0 4px; font-size: .9375rem; font-weight: 800; letter-spacing: -.01em; }
.help-faq-item { border: 1px solid var(--orlop-line, #D8DCE4); border-radius: 12px; background: #fff; }
.help-faq-item summary { min-height: 44px; display: flex; align-items: center; padding: 0 14px; cursor: pointer; font-weight: 600; list-style: none; }
.help-faq-item summary::-webkit-details-marker { display: none; }
.help-faq-item summary::after { content: "+"; margin-left: auto; font-weight: 700; padding-left: 12px; }
.help-faq-item[open] summary::after { content: "–"; }
.help-faq-item p { margin: 0; padding: 0 14px 14px; color: var(--orlop-text-2, #5B616B); }
.help-figure--sec { margin: 12px 0 20px; }
.help-keys th[scope="row"] { font-weight: 600; text-align: left; white-space: nowrap; }

/* ---- R36-02 Zahlungen am Handy: Aktualisieren als Symbolknopf in der Titelzeile ---- */
@media (max-width: 767px) {
  #paymentsHead { position: relative; }
  #paymentsHead .page-title { padding-right: 56px; }
  #paymentsHead .ph-icon-btn { position: absolute; top: 4px; right: 0; width: 44px; height: 44px; }
}

/* R36 Nacharbeit: der einzige Fußknopf (Empfängerfrage, ohne Abweisen daneben) nimmt die volle Breite, Text nie abgeschnitten */
@media (max-width: 767px) {
  #documentDetailModal .doc-detail-actionbar .doc-bar-right > .doc-approve-wrap:first-child { grid-column: 1 / -1; }
  #documentDetailModal .doc-detail-actionbar .doc-approve-btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
}
