/* Redesign 2026, Runde 23 (2.85.0) */

/* R23-02: Bestätigungsdialog, passt von 320 bis 1920 px */
.ui-confirm .modal-content { width: min(480px, calc(100vw - 32px)); max-width: 480px; box-sizing: border-box; }
.ui-confirm .modal-body { padding-bottom: 8px; }
.ui-confirm .ui-confirm-text { margin: 0 0 12px; line-height: 1.5; overflow-wrap: anywhere; }
.ui-confirm .ui-choice-list { display: flex; flex-direction: column; gap: 12px; }
.ui-confirm .ui-choice-card { width: 100%; min-height: 48px; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 16px; border-radius: 14px; border: 1px solid #D8DCE4; background: #fff; color: #0E1115; font: inherit; cursor: pointer; white-space: normal; height: auto; }
.ui-confirm .ui-choice-card:hover { background: #F5F6F8; border-color: #6B717C; }
.ui-confirm .ui-choice-card:focus-visible { outline: 2px solid #0E1115; outline-offset: 2px; }
.ui-confirm .ui-choice-title { font-weight: 700; font-size: 1rem; }
.ui-confirm .ui-choice-hint { font-size: .875rem; color: var(--orlop-muted-text, #565C67); line-height: 1.4; font-weight: 400; }
.ui-confirm .ui-choice-card.is-danger { border-color: #E5B8B8; background: #fff; color: #0E1115; }
.ui-confirm .ui-choice-card.is-danger .ui-choice-title { color: #8A1C1C; }
.ui-confirm .ui-choice-card.is-danger:hover { background: #FDF3F3; border-color: #B42318; }
.ui-confirm .ui-confirm-cancel { min-height: 48px; padding: 8px 16px; border: 0; background: transparent; color: #0E1115; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 10px; }
.ui-confirm .ui-confirm-cancel:focus-visible { outline: 2px solid #0E1115; outline-offset: 2px; }
.ui-confirm .modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.ui-confirm .modal-footer button { min-height: 48px; height: auto; white-space: normal; border-radius: 14px; }
@media (max-width: 479px) {
  .ui-confirm .modal-footer { flex-direction: column-reverse; align-items: stretch; }
  .ui-confirm .modal-footer button { width: 100%; }
}

/* R23-03: Belegliste, Lieferant | Rechnung und Datum | Fällig | Betrag | Status | Aktion. Rest geht an die Lieferantenspalte. */
/* R53-01: Listen-Umbruch bei 1100 px */
@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.no-status .doc-thead,
  .documents-grid .doc-table.no-status .doc-row {
    grid-template-columns: minmax(200px, 1fr) minmax(160px, 1fr) 120px 120px minmax(170px, 1fr) 96px; column-gap: 24px; align-items: center;
  }
  .documents-grid .doc-table .doc-row { padding-left: 16px; padding-right: 16px; }
  .documents-grid .doc-table .doc-thead { padding-left: 16px; padding-right: 16px; }
  .documents-grid .doc-table .dr-actcol { display: flex; justify-content: flex-end; padding: 0; min-width: 0; }
  .documents-grid .doc-table .dr-act { min-height: 32px; padding-left: 14px; padding-right: 14px; }
  .documents-grid .doc-table.no-status .dr-status { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; }
  .documents-grid .doc-table .dr-due, .documents-grid .doc-table .dr-h.dr-due { justify-self: start; }
  .documents-grid .doc-table .dr-amount, .documents-grid .doc-table .dr-h.dr-amount { justify-self: end; text-align: right; font-variant-numeric: tabular-nums; }
  .documents-grid .doc-table .dr-status { justify-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
  .documents-grid .doc-table .dr-m-status { display: none; }
  .documents-grid .doc-table { max-width: 1480px; }
}
.doc-wait-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; border: 1px solid #0E1115; background: #0E1115; color: #fff; font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; white-space: nowrap; position: relative; z-index: 2; }
.doc-wait-chip:hover { background: #333840; }
.doc-wait-chip:focus-visible { outline: 2px solid #0E1115; outline-offset: 2px; }
.doc-wait-chip[aria-pressed="true"] { background: #fff; color: #0E1115; }
.documents-grid .doc-table .dr-sort { min-height: 32px; }
/* R53-01: Listen-Umbruch bei 1100 px */
@media (max-width: 1099px) {
  .documents-grid .doc-table .doc-row .dr-m1 .dr-m-status { display: inline; font-size: 12px; color: var(--orlop-muted-text, #565C67); white-space: nowrap; }
  .documents-grid .doc-table .doc-row .dr-m1 .dr-m-status .dr-sep { display: inline; margin: 0 4px; }
  .documents-grid .doc-table .doc-row .dr-m1 .dr-m-status[data-st-word="bad"] { color: #8A1C1C; }
  .documents-grid .doc-table .doc-row .dr-m1 { display: block; white-space: nowrap; text-overflow: ellipsis; }
}

/* R23-05: Seite für ausgeschaltete Module */
.module-off { margin-top: 24px; align-items: center; }
.module-off-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.module-off-actions .btn-primary, .module-off-actions .btn-secondary { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 767px) { .module-off-actions .btn-primary, .module-off-actions .btn-secondary { width: 100%; justify-content: center; } }

/* R23-04: Dashboard. "Wartet auf dich" vor den Kacheln, Nullen als eine ruhige Zeile */
#tabDashboard > .dash-columns { order: 3; }
#tabDashboard > .step-strip { order: 4; }
#tabDashboard > #dashZeroLine { order: 4; }
.dash-columns { align-items: start; }
.dash-columns > section { height: auto; }
.dash-zero-line { display: flex; align-items: center; gap: 8px; margin: 0 0 24px; color: var(--orlop-muted-text, #565C67); font-size: .9375rem; }
.dash-zero-line i { color: #047857; }
#tabDashboard .step-tile { min-height: 7.5rem; }
#tabDashboard .step-tile.is-zero .stat-value { color: var(--orlop-muted-text, #565C67); }
.dash-recent-status .badge { white-space: nowrap; }
@media (max-width: 767px) {
  #tabDashboard #dashStrip .step-tile.is-extra { display: none !important; }
  #tabDashboard #dashStrip .step-tile { min-height: 56px; }
}

/* R23-04: Leerzustand als eine Karte, drei Schritte als gleichmäßiges Raster über die volle Breite */
.dash-first-card:not([hidden]) { display: block; background: #fff; border: 1px solid var(--orlop-line, #D8DCE4); border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(14, 17, 21, .06); }
.dash-first-card .dash-first-left { margin: 0 0 24px; }
.dash-first-card .dash-first-left > p { margin: 8px 0 0; color: var(--orlop-muted-text, #565C67); max-width: 64ch; }
.dash-first-card .dash-first-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.dash-first-card .dash-first-cta { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.dash-first-card .dash-first-cta .btn-primary { min-height: 44px; }
.dash-first-card .dash-first-tour { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; color: #0E1115; cursor: pointer; min-height: 44px; }
@media (max-width: 767px) {
  .dash-first-card:not([hidden]) { padding: 16px; }
  .dash-first-card .dash-first-steps { grid-template-columns: 1fr; }
  .dash-first-card .dash-first-cta .btn-primary { width: 100%; }
}
#tabDashboard #dashStrip .step-tile[hidden] { display: none !important; }
@media (max-width: 767px) {
  #tabDashboard > #dashZeroLine { order: 2; margin: 0 0 16px; }
}

/* R23-04: Zahlungen, Seitenkopf wie die anderen Hauptseiten, 24-px-Rhythmus */
.pay-head-actions .ph-icon-btn { border: 1px solid #6B717C !important; background: #fff !important; width: 44px; height: 44px; }
.pay-head-actions .ph-icon-btn:hover:not([disabled]) { background: #F5F6F8 !important; }
.pay-sepa-reason-line { display: block; font-size: .9375rem; color: var(--orlop-muted-text, #565C67); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pay-runs-line { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--orlop-line, #D8DCE4); color: var(--orlop-muted-text, #565C67); font-size: .875rem; }
.pay-runs-line i { margin-right: 6px; }
.pay-empty { margin-top: 24px !important; }
@media (max-width: 767px) { .pay-sepa-reason-line { white-space: normal; } }
#tabDashboard.dashboard-empty #tourHint, #tabDashboard.dashboard-empty .tour-hint, #tabDashboard.dashboard-empty .tour-band { display: none !important; }
.dash-first-card .dash-first-steps { width: 100%; max-width: none; }

/* R23-01: Abteilungs-Wizard, Schrittanzeige in der Kopfzeile, Fuß in Inhaltsbreite, Erfolg mittig */
.ow.dwz .dwz-stepbar { background: #fff; border-bottom: 1px solid var(--orlop-line, #D8DCE4); padding: 24px 1rem 12px; }
.ow.dwz .dwz-stepbar .ow-steps { flex: none; justify-content: center; margin: 0 auto; max-width: 720px; }
.ow.dwz .dwz-stepbar .ow-steps li { color: #4a505b; font-size: 14px; }
.ow.dwz .dwz-stepbar .ow-steps li[aria-current="step"] { color: #0E1115; }
.ow.dwz .dwz-mobile-steps { display: none; }
.ow.dwz .ow-card { min-height: 380px; }
.ow.dwz .ow-foot { padding-left: max(1rem, calc((100% - 720px) / 2)); padding-right: max(1rem, calc((100% - 720px) / 2)); }
.ow.dwz.is-done .ow-body { align-items: center; }
.ow.dwz.is-done .ow-card { min-height: 0; }
.ow.dwz .ow-card { animation-duration: 150ms; }
.ow.dwz .dwz-money { position: relative; }
.ow.dwz .dwz-money .ow-input { padding-right: 2.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.ow.dwz .dwz-suffix { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: #4a505b; font-weight: 700; pointer-events: none; }
.ow.dwz .dwz-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #0E1115; color: #fff; font-size: .75rem; margin-right: 8px; }
.ow.dwz .dwz-fail { text-align: center; }
.ow.dwz .dwz-fail-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #FDF3F3; color: #8A1C1C; font-size: 1.5rem; margin-bottom: 12px; }
.ow.dwz .dwz-fail .ow-actions { justify-content: center; }
@media (max-width: 767px) {
  .ow.dwz .dwz-stepbar { padding: 16px 12px 12px; }
  .ow.dwz .dwz-stepbar .ow-steps { display: none; }
  .ow.dwz .dwz-mobile-steps { display: block; }
  .ow.dwz .dwz-mobile-text { display: block; font-size: 14px; color: #4a505b; margin-bottom: 8px; }
  .ow.dwz .dwz-bar { height: 4px; background: #E7EAF0; border-radius: 2px; overflow: hidden; }
  .ow.dwz .dwz-bar > span { display: block; height: 100%; background: #0E1115; }
  .ow.dwz .ow-card { min-height: 0; }
}

/* R23-06: Fußzeile, Version (Link) und Datum (grau) mit Abstand, Tap-Ziele 44 px, Neuigkeiten Sprungnavigation */
.app-footer-left { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 0; }
.app-footer-left a#footerVersion { text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
.app-footer .app-footer-when { display: inline; color: #4a505b; text-decoration: none; font-size: .875rem; margin-left: 0; }
.app-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.app-footer-links a:last-child { padding-right: 0; }
@media (max-width: 767px) {
  .app-footer { flex-wrap: wrap !important; }
  .app-footer-left { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; flex: 1 1 100%; }
  .app-footer .app-footer-when { display: inline !important; }
  .app-footer-links { flex: 1 1 100%; }
}
.news-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.news-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--orlop-line, #D8DCE4); border-radius: 999px; background: #fff; color: #0E1115; text-decoration: none; font-weight: 700; }
.news-jump a[aria-current="true"] { background: #0E1115; color: #fff; border-color: #0E1115; }
@media (min-width: 1440px) { .news-jump { display: none; } }
.news-entry.is-target, .news-more-list li.is-target { box-shadow: 0 0 0 2px #0E1115; border-radius: 16px; }
.news-version-head:focus:not(:focus-visible) { outline: none; }
.news-item-guide { display: inline-block; margin-top: 4px; color: #0E1115; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; line-height: 44px; }
.news-what .news-item-guide, .news-item-text .news-item-guide { display: block; }

/* R23-01: Abteilungsliste, Aktionen in einer Zeile (36 px, bei Touch 44 px) */
.dept-table td.dept-actions { white-space: nowrap; }
.dept-actions { display: table-cell; }
.dept-actions .dept-edit, .dept-card-actions .dept-edit { min-height: 36px; padding: 0 16px; border-radius: 999px; }
.dept-actions .dept-del, .dept-card-actions .dept-del { min-height: 36px; min-width: 36px; margin-left: 8px; vertical-align: middle; }
.dept-card-actions { display: flex; align-items: center; gap: 8px; }
@media (pointer: coarse) { .dept-actions .dept-edit, .dept-card-actions .dept-edit, .dept-actions .dept-del, .dept-card-actions .dept-del { min-height: 44px; min-width: 44px; } }
@media (max-width: 380px) {
  .ui-confirm .ui-choice-card { padding: 8px 12px; }
  .ui-confirm .ui-choice-title { font-size: .9375rem; }
  .ui-confirm .ui-choice-hint { font-size: .8125rem; line-height: 1.3; }
}
