/* Offene Posten und DATEV-Export: baut auf den gemeinsamen Verwaltungsbausteinen (.wm, workspace-modules.css) auf; hier nur Ergänzungen.
   Tokens --wm-* aus .wm, im Dialog (außerhalb von .wm) die Lila-Tokens --compact-* mit Rückfallwerten. */
@media screen {
  .open-items .admin-metrics { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
  .open-items .wm-row-actions { flex-wrap:nowrap; }
  .open-items-table td:first-child strong, .open-items-table td:nth-child(3) strong { white-space:nowrap; }
  .open-items .data-table th { white-space:normal; }
  .open-items-table td:nth-child(5) { min-width:120px; }
  .open-items .data-table th, .open-items .data-table td { padding-left:10px; padding-right:10px; }
  .open-items-case-link { padding:0; border:0; background:none; font:inherit; font-weight:650; color:var(--wm-accent); cursor:pointer; text-align:left; white-space:nowrap; }
  .open-items-case-link:hover { text-decoration:underline; }
  .open-items .admin-metrics > div { display:flex; flex-direction:column; justify-content:center; min-height:68px; padding:10px 16px; }
  .open-items .admin-metrics > .accent { background:var(--wm-tint); }
  .open-items-branches { padding:0 2px; }
  .open-items-table .num { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
  .open-items-table td.open strong { color:var(--wm-accent); font-weight:700; }
  .open-items-table tfoot td { padding:12px 14px; border-top:2px solid var(--wm-line); border-bottom:0; background:var(--wm-heading); font-size:13px; font-weight:600; color:var(--wm-text); }
  .open-items-table tfoot td.open strong { color:var(--wm-accent); }
  .open-items-overdue, .open-items-table td small.open-items-overdue { color:var(--wm-danger); }
  .open-items-dunning, .open-items-table td small.open-items-dunning { color:var(--wm-accent); }
  .open-items-note { margin:0; }
  .open-items-table th:first-child, .open-items-table td:first-child { padding-left:18px; }
  .open-items-table th:last-child, .open-items-table td:last-child { padding-right:18px; }
  @media (max-width:720px) {
    .open-items .admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .open-items .admin-metrics > * { border-right:0; border-bottom:1px solid var(--wm-line); }
    .open-items .admin-metrics > :nth-child(odd) { border-right:1px solid var(--wm-line); }
  }
}

/* Dialog „DATEV-Buchungsstapel“ (Modal außerhalb von .wm) */
.datev-dialog { --dv-line:var(--compact-line,#e3dce8); --dv-soft:var(--compact-soft,#f4f1f6); --dv-tint:var(--compact-tint,#f2ecf6); --dv-text:var(--compact-text,#28212e); --dv-muted:var(--compact-muted,#6e6576); --dv-accent:var(--compact-accent,#643182); display:grid; gap:18px; color:var(--dv-text); }
.datev-dialog h3 { margin:0 0 8px; display:flex; align-items:center; gap:8px; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--dv-accent); }
.datev-dialog h3 small { font-weight:500; font-size:11.5px; letter-spacing:0; text-transform:none; color:var(--dv-muted); }
.datev-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px 12px; }
.datev-grid label { display:grid; gap:4px; font-size:12px; font-weight:600; color:var(--dv-text); }
.datev-grid input, .datev-grid select { min-height:36px; padding:6px 10px; border:1px solid var(--lila-border,#dccfe4); border-radius:8px; background:var(--compact-surface,#fff); color:inherit; font:inherit; }
.datev-grid input:focus-visible, .datev-grid select:focus-visible { outline:2px solid var(--dv-accent); outline-offset:1px; }
.datev-grid.accounts input { font-variant-numeric:tabular-nums; }
.datev-presets { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 6px; }
.datev-details { margin-top:10px; padding:10px 12px; border:1px solid var(--dv-line); border-radius:10px; background:var(--dv-soft); }
.datev-details summary { cursor:pointer; font-weight:600; font-size:13px; color:var(--dv-accent); }
.datev-details .datev-grid { margin-top:10px; }
.datev-preview { margin-top:10px; }
.datev-preview-summary { display:flex; flex-wrap:wrap; gap:8px 16px; margin-bottom:8px; font-size:12.5px; color:var(--dv-muted); }
.datev-preview-summary strong { color:var(--dv-accent); }
.datev-preview-table { max-height:260px; overflow:auto; border:1px solid var(--dv-line); border-radius:10px; }
.datev-preview-table table { width:100%; border-collapse:collapse; font-size:12px; }
.datev-preview-table th { position:sticky; top:0; background:var(--dv-soft); font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--dv-muted); }
.datev-preview-table th, .datev-preview-table td { padding:6px 8px; border-bottom:1px solid var(--dv-line); text-align:left; white-space:nowrap; }
.datev-preview-table td:last-child { white-space:normal; min-width:200px; }
.datev-preview-table .num { text-align:right; font-variant-numeric:tabular-nums; }
.open-items .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
