/* Redesign 2026, Runde 18 (2.80.0) */

/* R18-02: eine zentrale Fokusregel, H1 mit tabindex=-1 zeigt nie einen Ring */
:root { color-scheme: light; --focus-shadow: 0 0 0 2px #fff, 0 0 0 4px #0E1115; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid #0E1115; outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
h1[tabindex="-1"], h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible,
h2[tabindex="-1"]:focus, h2[tabindex="-1"]:focus-visible, [tabindex="-1"]:focus:not(:focus-visible) { outline: 0 !important; box-shadow: none !important; }

/* R18-01: Sprung ins Feld */
#documentDetailForm .doc-field, #documentDetailForm :is(input, select, textarea), #docPayeeBlock, #docDuplicateBanner { scroll-margin: 104px 0 140px; }
.is-flash { animation: r18flash 1.4s ease-out 1; border-radius: 10px; }
@keyframes r18flash { 0% { box-shadow: 0 0 0 4px rgba(182, 188, 204, .95); background: rgba(182, 188, 204, .25); } 100% { box-shadow: 0 0 0 4px rgba(182, 188, 204, 0); background: transparent; } }
@media (prefers-reduced-motion: reduce) { .is-flash { animation: none; box-shadow: 0 0 0 3px #B6BCCC; } }
.doc-inline-missing { display: block; margin-top: .35rem; color: #B91C1C; font-size: .8125rem; }
.ds-iban-form { margin-top: .5rem; display: grid; gap: .35rem; }
.ds-iban-form[hidden] { display: none; }
.ds-iban-form label { font-size: .8125rem; color: var(--orlop-text-2, #5B616B); }
.ds-iban-line { display: flex; gap: .5rem; flex-wrap: wrap; }
.ds-iban-line input { flex: 1 1 14rem; min-width: 0; min-height: 44px; }
.ds-iban-hint { margin: 0; font-size: .875rem; color: var(--orlop-text-2, #5B616B); max-width: 60ch; }
.ds-src, .ac-src { display: block; font-size: .8125rem; font-weight: 400; color: var(--orlop-text-2, #5B616B); }
.ds-line2 .ds-src { display: inline; margin-left: .4rem; }
.ac-src.is-warn { color: #92400E; font-weight: 600; }

/* R18-01: Warnkarte Empfänger, zwei gleichwertige Knöpfe */
.doc-warn-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.doc-warn-actions .doc-warn-btn { min-height: 40px; }

/* R18-01: Betrag und Fälligkeit gleich breit */
#documentDetailForm .doc-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#documentDetailForm .doc-field-grid > .doc-field { min-width: 0; }
#documentDetailForm .doc-field-grid .doc-input-suffix, #documentDetailForm .doc-field-grid .tp-dateinput, #documentDetailForm .doc-field-grid input { width: 100%; box-sizing: border-box; }

/* R18-01: Fußleiste, gesperrter Knopf gleiche Pille in Grau, Grund als Textzeile */
.doc-approve-btn[aria-disabled="true"] { background: #E7EAF0 !important; color: #3B424C !important; border-color: #E7EAF0 !important; box-shadow: none !important; cursor: pointer; }
.doc-approve-step { color: #3B424C; }
@media (max-width: 767px) {
  #documentDetailModal .doc-detail-actionbar.has-decision { padding: 3px 1rem calc(4px + env(safe-area-inset-bottom, 0px)); gap: 0; min-height: 0; }
  #documentDetailModal .doc-detail-actionbar.has-decision .doc-bar-right { margin: 0; }
  .doc-page-sub #docHeadStatus { display: inline-flex; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #documentDetailModal .doc-detail-actionbar.has-decision .doc-bar-right { grid-template-columns: 1fr; align-items: center; }
  #documentDetailModal .doc-detail-actionbar .doc-approve-wrap { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 0; }
  #documentDetailModal .doc-detail-actionbar .doc-approve-step { display: block; min-height: 0; font-size: .8125rem; line-height: 24px; height: 24px; margin: 0 !important; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #documentDetailModal .doc-detail-actionbar .doc-approve-step:empty { display: none; }
  #documentDetailModal .doc-detail-actionbar .doc-approve-step .doc-missing-chip { min-height: 24px !important; height: 24px; padding: 0 .5rem; margin: 0 2px 0 0 !important; font-size: .75rem; vertical-align: top; }
  #documentDetailModal .doc-detail-actionbar .doc-approve-btn { min-height: 40px !important; height: 40px; padding-block: 0; }
  #documentDetailModal .doc-detail-actionbar .doc-reject-btn, #documentDetailModal .doc-detail-actionbar .beleg-reject { display: none; }
}

/* R18-01: Bestätigungsdialog, Zeilenvorlage und Bottom-Sheet */
.ac-row dt { font-size: 13px; color: var(--orlop-text-2, #5B616B); }
.ac-row dd { font-size: 16px; font-weight: 600; }
.ac-row .ac-amount { font-size: 20px; font-weight: 900; }
.ac-row { grid-template-columns: minmax(7.5rem, 7.5rem) minmax(0, 1fr); gap: 12px; }
@media (max-width: 599px) {
  .ac-overlay { align-items: flex-end !important; padding: 0 !important; }
  .ac-card { width: 100% !important; max-width: none; border-radius: 18px 18px 0 0 !important; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); max-height: 92dvh; }
  .ac-row { grid-template-columns: minmax(7.5rem, 7.5rem) minmax(0, 1fr) !important; gap: 12px !important; }
  .ac-actions { display: grid; grid-template-columns: 1fr; gap: .5rem; }
  .ac-actions .btn-primary { order: -1; min-height: 44px; }
}

/* R18-02: Fokusring-Token (dunkel statt hellgrau) */
:root { --focus-ring: #0E1115; }

/* R18-02: Seitenkopf-Baustein, Titel und Primäraktion auf einer Linie, gleiche Abstände */
.page-head--row { align-items: flex-start; }
.page-head--row .page-head-actions { margin-left: auto; align-self: flex-start; }
.page-head .page-title, .tp-head .page-title { margin-top: 0; }
.ph-icon-btn { border-color: transparent !important; background: transparent !important; }
.ph-icon-btn:hover:not([disabled]) { background: #E7EAF0 !important; }
.pay-head-actions { align-items: center; }
.pay-runs-none { margin: 1.25rem 0 0; color: var(--orlop-text-2, #5B616B); font-size: .875rem; }
.rk-tabs { margin-top: .25rem; }
@media (max-width: 767px) { .mshell-tab, .mshell-tab span { font-size: .75rem !important; } }

/* R18-03 Nacharbeit: feste Spalten wie R17 (flexible Spalten vergrößerten die Lücke), Betrag rechts */
@media (min-width: 1280px) {
  .documents-grid .doc-table .doc-thead, .documents-grid .doc-table .doc-row { grid-template-columns: minmax(240px, 1fr) 170px 130px 130px 140px 170px 120px; }
  .documents-grid .doc-table.has-co .doc-thead, .documents-grid .doc-table.has-co .doc-row { grid-template-columns: minmax(240px, 1.4fr) 170px minmax(0, 1fr) 130px 130px 140px 170px 120px; }
  .documents-grid .doc-table .dr-amount { text-align: right; justify-self: end; }
  .documents-grid .doc-table .dr-status { justify-self: start; }
}
.dash-stat-lead { color: var(--orlop-text-2, #5B616B); }

/* R18-04: Login ohne Layoutsprung, feste Höhe für den SSO-Block und das Logo */
.auth-logo { aspect-ratio: 212 / 62; height: auto; max-width: 100%; }
.auth-header { min-height: 9.5rem; }
#authSubtitle { min-height: 1.5em; }
.sso-block { min-height: 9.5rem; }
.sso-cta { min-height: 44px; }
.auth-card form { min-height: 0; }

/* R18-06: Neuigkeiten, Zeitleiste links, Karte höchstens 760 px, Versionsverzeichnis rechts */
#newsList .news-entry { max-width: calc(11rem + 1.5rem + 760px); }
#newsList .news-entry-body { max-width: 760px; }
.news-badge { justify-self: start; width: fit-content; max-width: 100%; }
.news-more-toggle { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 44px; padding: .5rem .25rem; border: 0; border-top: 1px solid var(--orlop-line, #D8DCE4); background: transparent; font: inherit; font-weight: 700; color: var(--orlop-ink, #0E1115); cursor: pointer; text-align: left; }
.news-more-toggle .news-more-count { margin-left: auto; min-width: 1.5rem; padding: 0 .5rem; border-radius: 999px; background: #E7EAF0; color: #333840; font-size: .8125rem; text-align: center; }
.news-more-toggle .news-more-chev { transition: transform .15s ease; font-size: .75rem; }
.news-more-toggle[aria-expanded="true"] .news-more-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .news-more-toggle .news-more-chev { transition: none; } }
.news-more-list[hidden] { display: none; }
.news-index { display: none; }
@media (min-width: 1440px) {
  #newsList { display: grid; grid-template-columns: minmax(0, 1fr) 14rem; column-gap: 2rem; align-items: start; }
  #newsList > .news-entry { grid-column: 1; margin-bottom: 1rem; }
  #newsList > .news-index { display: block; grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 1rem; padding: 1rem; background: #fff; border: 1px solid var(--orlop-line, #D8DCE4); border-radius: 14px; }
  .news-index-title { margin: 0 0 .5rem; font-weight: 900; }
  .news-index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
  .news-index li { display: flex; justify-content: space-between; gap: .5rem; font-size: .875rem; }
  .news-index li span { color: var(--orlop-text-2, #5B616B); }
  .news-index a { color: var(--orlop-ink, #0E1115); font-weight: 700; }
}
.help-content > *, .help-article > *, .help-body > *, #helpArticle > * { max-width: 72ch; }

html[data-sso="1"] #ssoBlock[hidden] { display: block; visibility: hidden; }
html[data-sso="1"] #ssoBlock[hidden] * { visibility: hidden; }
/* Mehrere IBAN auf dem Beleg: Auswahl als Radiogruppe, Ziel mindestens 44 px */
.ds-iban-opt { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .75rem; border: 1px solid var(--orlop-border, #D9DCE1); border-radius: 12px; cursor: pointer; font-size: .9375rem; color: var(--orlop-text, #0E1115); }
.ds-iban-opt input { width: 1.125rem; height: 1.125rem; accent-color: #0E1115; }
.ds-iban-opt:focus-within { outline: 2px solid #0E1115; outline-offset: 2px; }
