/* ── Projektstatusblatt ──────────────────────────────────────────────────────── */

/* Tooltip-Icon (ⓘ) neben Feldbezeichnungen */
.psb-tt {
    color: #cbd5e1;
    font-size: .65rem;
    margin-left: 5px;
    cursor: help;
    vertical-align: middle;
    transition: color .15s;
}
.psb-tt:hover { color: #60a5fa; }
.psb-wrap { padding: 16px 20px; max-width: 1100px; margin: 0 auto; }

/* Toolbar — 3 Zeilen übereinander */
.psb-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    margin-bottom: 18px; }
.psb-toolbar h2 { margin: 0; font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
/* Zeile 3: Blatt-Auswahl + Aktions-Buttons nebeneinander */
.psb-toolbar-row3 { display: flex; align-items: center; gap: 8px; }
.psb-select-wrap { display: flex; gap: 8px; align-items: center; }
/* Buttons immer sichtbar, nur deaktiviert wenn kein PSB geladen */
#psb-del-btn:disabled, #psb-refresh-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.psb-select-wrap select { padding: 6px 10px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .88rem; background: white;
    min-width: 220px; cursor: pointer; }
/* Speichern + Drucken oben rechts */
.psb-action-btns { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.psb-action-btn  { padding: 7px 12px !important; font-size: .88rem; }
.psb-save-status { font-size: .8rem; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.psb-save-status.ok  { background: #dcfce7; color: #166534; }
.psb-save-status.err { background: #fee2e2; color: #991b1b; }

/* PDS-Verknüpfungs-Balken — Zeile 2, kein Umbruch */
.psb-pds-bar { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.psb-pds-label { font-size: .78rem; font-weight: 600; color: #3b82f6;
    white-space: nowrap; padding: 4px 8px; background: #eff6ff;
    border-radius: 4px; border: 1px solid #bfdbfe; }
.psb-pds-sel { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: var(--radius);
    font-size: .86rem; background: #ffffff; cursor: pointer; min-width: 150px; }
.psb-pds-sel:disabled { opacity: .5; cursor: default; background: #f1f5f9; }
.psb-pds-sel:not(:disabled):focus { outline: none; border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
.psb-pds-sel-wide { min-width: 220px; }

/* Searchable-Select Combobox */
.psb-pds-ss-wrap { position: relative; min-width: 170px; }
.psb-pds-ss-wide  { min-width: 250px; }
.psb-ss { position: relative; }
.psb-ss-inp { width: 100%; padding: 6px 28px 6px 10px; border: 1px solid #cbd5e1;
    border-radius: var(--radius); font-size: .86rem; font-family: inherit;
    background: #ffffff; box-sizing: border-box; cursor: pointer; }
.psb-ss-inp:disabled { opacity: .5; cursor: default; background: #f1f5f9;
    border-color: #e2e8f0; }
.psb-ss-inp:not(:disabled):focus { outline: none; border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
.psb-ss-arrow { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    font-size: .75rem; color: #64748b; pointer-events: none; }
.psb-ss-drop { position: absolute; top: calc(100% + 3px); left: 0; right: 0;
    background: white; border: 1px solid #bfdbfe; border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 9100;
    max-height: 260px; overflow-y: auto;
    display: none; }
.psb-ss-drop.open { display: block; }
.psb-ss-opt { padding: 7px 12px; font-size: .86rem; cursor: pointer;
    color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psb-ss-opt:hover, .psb-ss-opt.focused { background: #eff6ff; }
.psb-ss-opt.active { background: #dbeafe; font-weight: 600; color: #1d4ed8; }
.psb-ss-empty { padding: 8px 12px; font-size: .84rem; color: #94a3b8; font-style: italic; }

/* Form body */
.psb-form { background: white; border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; }

/* Global header band */
.psb-header-band { background: #0f3460; color: white; padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.psb-header-band h1 { margin: 0; font-size: 1.25rem; font-weight: 700;
    letter-spacing: .02em; }
.psb-header-meta { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.psb-header-meta label { color: #93c5fd; font-size: .8rem; margin-right: 4px; }
.psb-header-meta input[type=date] { background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.3); color: white; border-radius: 5px;
    padding: 4px 8px; font-size: .88rem; }
.psb-kw-badge { background: rgba(255,255,255,.18); border-radius: 5px;
    padding: 4px 10px; font-size: .88rem; font-weight: 600; white-space: nowrap; }

/* Section headers */
.psb-section-head { background: #1e3a5f; color: white; padding: 8px 16px;
    font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.psb-section-head i { opacity: .8; font-size: .9rem; }

/* Rows */
.psb-row { display: grid; grid-template-columns: 320px 1fr;
    border-bottom: 1px solid #e2e8f0; min-height: 34px; }
.psb-row:last-child { border-bottom: none; }
.psb-row.psb-alt { background: #f8fafc; }

.psb-row-full { display: flex; flex-direction: column; gap: 4px;
    padding: 8px 14px; border-bottom: 1px solid #e2e8f0; }
.psb-row-full.psb-alt { background: #f8fafc; }
.psb-lbl-full { font-size: .83rem; color: #334155; font-weight: 500; }

.psb-lbl { padding: 7px 14px; font-size: .83rem; color: #334155;
    display: flex; align-items: center; border-right: 1px solid #e2e8f0;
    line-height: 1.3; }
.psb-lbl strong { font-weight: 700; color: #1e293b; }

.psb-val { padding: 4px 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Input types */
.psb-inp { border: 1px solid #cbd5e1; border-radius: 4px; padding: 4px 8px;
    font-size: .85rem; font-family: inherit; width: 100%; box-sizing: border-box;
    background: #eff6ff; transition: border-color .15s; }
.psb-inp:focus { outline: none; border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.2); }
.psb-inp.psb-pds { background: #dbeafe; }
.psb-inp.psb-narrow { width: 120px; }
.psb-inp.psb-mid   { width: 160px; }
.psb-inp.psb-full  { width: 100%; }
.psb-inp-num { text-align: right; }
.psb-inp-wide { width: 280px; }

textarea.psb-inp { resize: vertical; min-height: 72px; padding: 6px 8px; }
textarea.psb-autosize { resize: vertical; overflow: hidden; min-height: 72px; }

/* Reines Anzeigefeld (kein Input, kein Blau) */
.psb-disp { display: block; font-size: .88rem; color: #1e293b; padding: 2px 0;
    min-height: 1.4em; line-height: 1.5; }
.psb-disp:empty::before { content: attr(data-ph); color: #94a3b8; font-style: italic; }
.psb-disp-num { text-align: right; }

/* PDS badge */
.psb-pds-tag { font-size: .68rem; background: #bfdbfe; color: #1d4ed8;
    padding: 1px 5px; border-radius: 3px; font-weight: 600; flex-shrink: 0; }

/* Toggle-Button für leere Abrechnungszeilen */
.psb-ab-toggle-btn {
    background: none; border: 1px dashed #cbd5e1; border-radius: 6px;
    color: #64748b; font-size: .78rem; cursor: pointer;
    padding: 4px 14px; display: inline-flex; align-items: center; gap: 6px;
    transition: color .15s, border-color .15s;
}
.psb-ab-toggle-btn:hover { color: #334155; border-color: #94a3b8; }

/* PDS Write-Back Toast-Benachrichtigung */
#psb-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    padding: 10px 16px; border-radius: 8px; font-size: .875rem; font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,.18); display: flex; align-items: center; gap: 8px;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.psb-toast-ok  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.psb-toast-err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Calculated values */
.psb-calc-val { font-size: .88rem; color: #1e293b; font-weight: 500; }
.psb-calc-val.psb-red { color: #dc2626; font-weight: 700; font-size: .93rem; }
.psb-calc-val.psb-bold { font-weight: 700; }
.psb-calc-bg { background: #e0f2fe; padding: 4px 8px; border-radius: 4px;
    font-size: .85rem; color: #0369a1; width: 100%; box-sizing: border-box; min-height: 28px;
    display: flex; align-items: center; }

/* Total rows */
.psb-row.psb-total .psb-lbl { font-weight: 700; color: #1e293b; }
.psb-row.psb-total .psb-val  { font-weight: 700; }

/* Projektart & Status toggles */
.psb-toggle-group { display: flex; gap: 6px; flex-wrap: wrap; }
.psb-toggle-group label { display: flex; align-items: center; gap: 5px;
    cursor: pointer; font-size: .85rem; padding: 4px 10px; border-radius: 5px;
    border: 1px solid #cbd5e1; transition: .15s; user-select: none; }
.psb-toggle-group label:has(input:checked) { background: #dbeafe;
    border-color: #3b82f6; color: #1d4ed8; font-weight: 600; }
.psb-toggle-group input { display: none; }

/* Geplante Abrechnungen table */
.psb-ab-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.psb-ab-table th { background: #f1f5f9; padding: 6px 10px; text-align: left;
    font-weight: 600; color: #475569; border-bottom: 2px solid #e2e8f0; }
.psb-ab-table td { padding: 4px 8px; border-bottom: 1px solid #f1f5f9;
    vertical-align: middle; }
.psb-ab-table td .psb-inp { width: 100%; }
.psb-ab-table tr:hover td { background: #f8fafc; }
.psb-ab-nr { color: #64748b; font-size: .78rem; font-weight: 600;
    text-align: center; width: 32px; }

/* Nachtrag block */
.psb-nachtrag { border: 1px solid #e2e8f0; border-radius: 6px; margin: 10px;
    overflow: hidden; }
.psb-nachtrag-head { background: #f8fafc; padding: 8px 14px; display: flex;
    align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    font-weight: 700; font-size: .9rem; color: #1e40af; }
.psb-nachtrag-toggle { display: flex; gap: 14px; }
.psb-nachtrag-toggle label { display: flex; align-items: center; gap: 5px;
    font-size: .83rem; font-weight: 400; cursor: pointer; }
.psb-nachtrag-body { padding: 10px; display: grid; gap: 6px; }
.psb-nachtrag-row { display: grid; grid-template-columns: 200px 1fr; gap: 8px;
    align-items: center; font-size: .84rem; }
.psb-nachtrag-row .psb-lbl { border: none; padding: 0 6px; font-size: .82rem; }

/* Checkliste */
.psb-check-table { width: 100%; }
.psb-check-row { display: grid; grid-template-columns: 1fr 80px 80px;
    border-bottom: 1px solid #e2e8f0; min-height: 36px; align-items: center; }
.psb-check-row:last-child { border-bottom: none; }
.psb-check-row:nth-child(even) { background: #f8fafc; }
.psb-check-q   { padding: 6px 14px; font-size: .84rem; color: #334155; }
.psb-check-opt { text-align: center; }
.psb-check-opt label { display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 28px; border-radius: 5px; cursor: pointer;
    border: 1px solid #cbd5e1; font-size: .8rem; font-weight: 600; transition: .15s; }
.psb-check-opt label:has(input:checked) { background: #dcfce7;
    border-color: #16a34a; color: #15803d; }
.psb-check-opt label.psb-nein:has(input:checked) { background: #fee2e2;
    border-color: #dc2626; color: #dc2626; }
.psb-check-opt input { display: none; }

/* Materialkosten-Tabelle */
.psb-mat-table { width: 100%; border-collapse: collapse; font-size: .84rem;
    margin: 6px 0; }
.psb-mat-table th { background: #f1f5f9; padding: 6px 10px; font-weight: 600;
    color: #475569; border-bottom: 2px solid #e2e8f0; text-align: left; }
.psb-mat-table td { padding: 4px 8px; border-bottom: 1px solid #f1f5f9; }
.psb-mat-table .psb-sum-row td { background: #f1f5f9; font-weight: 700; }

/* Besprechungsprotokoll */
.psb-bp-block { border: 1px solid #e2e8f0; border-radius: 6px;
    margin: 8px 10px; overflow: hidden; }
.psb-bp-head { background: #f8fafc; padding: 8px 14px; font-weight: 700;
    font-size: .86rem; color: #1e293b; display: flex; align-items: center;
    justify-content: space-between; gap: 8px; }
.psb-bp-status { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: .82rem; }
.psb-bp-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.psb-bp-dot.rot    { background: #ef4444; }
.psb-bp-dot.gelb   { background: #eab308; }
.psb-bp-dot.gruen  { background: #22c55e; }
.psb-bp-body { padding: 10px 14px; display: grid; gap: 8px; }
.psb-bp-field { display: grid; grid-template-columns: 130px 1fr; gap: 8px;
    align-items: start; font-size: .83rem; }
.psb-bp-field span { color: #64748b; padding-top: 5px; }

/* Summen-Zeile hervorheben */
.psb-sum-row td { background: #eff6ff !important; font-weight: 700; }
.psb-row-red .psb-lbl { color: #dc2626; font-weight: 700; }
.psb-row-red .psb-val  { color: #dc2626; font-weight: 700; }

/* Save-Bar */
.psb-save-bar { position: sticky; bottom: 0; background: #1e293b;
    padding: 10px 16px; display: flex; align-items: center; justify-content: flex-end;
    gap: 10px; z-index: 50; border-top: 2px solid #0f172a; margin-top: 1px; }
.psb-save-status { font-size: .82rem; color: #94a3b8; flex: 1; }
.psb-save-status.ok { color: #4ade80; }
.psb-save-status.err { color: #f87171; }

/* Empty state */
.psb-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.psb-empty i { font-size: 2.5rem; opacity: .25; display: block; margin-bottom: 12px; }

/* Inline-grid rows for sub-columns */
.psb-multicol { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.psb-multicol-lbl { font-size: .78rem; color: #64748b; white-space: nowrap; }
.psb-nachtrag-body .psb-multicol input.psb-inp,
.psb-nachtrag-body .psb-multicol span.psb-calc-val { margin-left: auto; text-align: right; }
.psb-nachtrag-body .psb-multicol span.psb-calc-val {
    display: inline-block;
    width: 160px;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 8px;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .psb-row { grid-template-columns: 1fr; }
    .psb-lbl { border-right: none; border-bottom: 1px solid #e2e8f0; }
    .psb-check-row { grid-template-columns: 1fr auto auto; }
    .psb-wrap { padding: 10px 12px; }
}

/* ── PSB Sync-Badge (analog .kap-ist-status) ─────────────────────────────────── */
.psb-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 2px 7px;
    cursor: default;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRINT HEADER (immer im DOM, nur beim Drucken sichtbar)
   ═══════════════════════════════════════════════════════════════════════════════ */
.psb-print-header {
    display: none;
}
.psb-ph-nr    { font-weight: 700; font-size: .95rem; }
.psb-ph-bez   { font-size: .82rem; color: #475569; }
.psb-ph-pl    { font-size: .8rem;  color: #475569; }
.psb-ph-pl i  { font-size: .75rem; margin-right: 3px; }
.psb-ph-date  { font-size: .78rem; color: #94a3b8; }

/* ═══════════════════════════════════════════════════════════════════════════════
   @MEDIA PRINT
   ═══════════════════════════════════════════════════════════════════════════════ */
@media print {
    /* Seite 1: kein Top-Margin (print-header liefert eigenen Abstand),
       aber Seiten 2+ brauchen einen Top-Abstand damit Content nicht am Rand klebt.
       Margin-Boxen überschreiben Browser-Footer: URL leer, nur Seitenzähler rechts */
    @page {
        margin: 9mm 12mm 10mm 12mm;
        size: A4 portrait;
        @top-left    { content: ''; }
        @top-center  { content: ''; }
        @top-right   { content: ''; }
        @bottom-left { content: ''; }
        @bottom-center { content: ''; }
        @bottom-right {
            content: counter(page) ' / ' counter(pages);
            font-size: 8pt;
            color: #94a3b8;
            font-family: sans-serif;
        }
    }
    @page :first {
        margin: 0 12mm 10mm 12mm;
        @bottom-right {
            content: counter(page) ' / ' counter(pages);
            font-size: 8pt;
            color: #94a3b8;
            font-family: sans-serif;
        }
    }

    /* ── Layout: Sidebar + Topbar ausblenden, PSB-Bereich strecken ── */
    .sidebar,
    .header,
    #nav-flyout                 { display: none !important; }
    .main-content               { margin-left: 0 !important; padding: 0 !important; }
    body, html                  { background: #fff !important; }

    /* ── PSB-Toolbar (alle Steuerelemente) ausblenden ── */
    .psb-toolbar                { display: none !important; }

    /* ── Print-Header: kein eigenes padding-left, @page-Margin reicht ── */
    .psb-print-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        padding: 6mm 0 10px 0;
        margin-bottom: 8px;
        border-bottom: 3px solid #002C6B;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .psb-ph-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .psb-ph-bez-left {
        font-size: .92rem;
        font-weight: 600;
        color: #1e293b;
        line-height: 1.3;
        white-space: nowrap;
        padding-left: 52px;
    }
    .psb-ph-logo-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .psb-ph-logo {
        height: 42px;
        width: auto;
    }
    .psb-ph-brand {
        font-size: 1.5rem;
        font-weight: 600;
        color: #002C6B;
        letter-spacing: 0;
        white-space: nowrap;
    }
    .psb-ph-subtitle {
        font-size: .85rem;
        font-weight: 600;
        color: #64748b;
        letter-spacing: .12em;
        padding-left: 2px;
        margin-top: 2px;
    }
    .psb-ph-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }

    /* ── Innerer Formular-Header: h1 weg, Meta linksbündig, KW rechts ── */
    .psb-header-band h1          { display: none !important; }
    .psb-header-band             { display: flex !important; align-items: center !important;
                                   justify-content: space-between !important; padding: 8px 18px !important; }
    .psb-header-meta             { flex: 1; }
    .psb-kw-badge                { margin-left: auto; flex-shrink: 0; }

    /* ── Wrap + Form: alle Card-Borders, Schatten, Radius weg ── */
    .psb-wrap                   { box-shadow: none !important; border: none !important; border-radius: 0 !important; padding: 0 !important; }
    .psb-form                   { border: none !important; border-radius: 0 !important;
                                   box-shadow: none !important; overflow: visible !important;
                                   padding: 0 !important; }

    /* ── Sektion-Header: Farbe erhalten ── */
    .psb-section-head {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        color: #fff !important;
    }

    /* ── BP-Blöcke: Border, Radius und Hintergrundfarben erzwingen ── */
    .psb-bp-block {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        border: 1px solid #e2e8f0 !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        margin: 8px 10px !important;
    }
    .psb-bp-head {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        background: #f8fafc !important;
        padding: 8px 14px !important;
    }
    .psb-bp-num-badge {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        background: #1e3a5f !important;
        color: white !important;
    }

    /* ── BP-Statusdot: Farbe erzwingen, Select ausblenden ── */
    .psb-bp-dot {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        display: inline-block !important;
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }
    .psb-bp-dot.gruen { background: #22c55e !important; }
    .psb-bp-dot.rot   { background: #ef4444 !important; }
    select.psb-inp    { display: none !important; }
    .psb-bp-val-print { display: inline !important; font-size: .85rem; font-weight: 600; color: #1e293b; }

    /* ── Inputs/Textareas als Nur-Lese-Felder: kein Rahmen, transparent ── */
    .psb-inp:not(textarea),
    .psb-disp                   { border-color: transparent !important; background: transparent !important; box-shadow: none !important; }
    textarea.psb-inp            { display: none !important; }
    .psb-ta-print               { border: 1px solid #e2e8f0 !important; background: #fafafa !important;
                                  padding: 6px 8px !important; border-radius: 4px !important;
                                  font-size: .86rem !important; line-height: 1.45 !important; }

    /* ── Seitenumbrüche ── */
    /* Sektionen dürfen umbrechen (sonst entstehen riesige Lücken) */
    .psb-section                { break-inside: auto; page-break-inside: auto; }
    /* Sektion-Header bleibt mit erster Zeile zusammen */
    .psb-section-head           { break-after: avoid; page-break-after: avoid; }
    /* Einzelne Zeilen bleiben zusammen */
    .psb-row                    { break-inside: avoid; page-break-inside: avoid; }
    .psb-row-full               { break-inside: avoid; page-break-inside: avoid; }
    /* BP-Blöcke (Besprechungsprotokoll) komplett zusammenhalten */
    .psb-bp-block               { break-inside: avoid; page-break-inside: avoid; }
    /* Tabellen-Zeilen zusammenhalten, Tabelle selbst darf umbrechen */
    .psb-mass-table tr,
    .psb-nachtrag-table tr,
    .psb-ab-table tr            { break-inside: avoid; page-break-inside: avoid; }
    .psb-mass-table,
    .psb-nachtrag-table,
    .psb-ab-table               { break-inside: auto; page-break-inside: auto; }

    /* tfoot nicht auf jeder Seite wiederholen — Chrome wiederholt table-footer-group bei Umbruch */
    .psb-ab-table tfoot,
    .psb-mass-table tfoot,
    .psb-mat-table tfoot        { display: table-row-group; }

    /* Inputs: Placeholder, Box-Shadow und Outline ausblenden → clean wie auto-PDF */
    .psb-inp::placeholder       { color: transparent !important; opacity: 0 !important; }
    .psb-inp:not(textarea)      { box-shadow: none !important; outline: none !important; }

    /* Nachtrag-Body: 2-Spalten-Grid mit festen Prozenten — garantiert gleiche Spaltenbreite pro Zeile */
    .psb-nachtrag-body {
        display: grid !important;
        grid-template-columns: 55% 45% !important;
        gap: 4px 6px !important;
        padding: 8px 10px 10px 14px !important;
    }
    .psb-nachtrag-body > .psb-multicol {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: baseline !important;
        gap: 4px !important;
    }
    .psb-nachtrag-body > .psb-multicol > .psb-multicol-lbl {
        flex: 1 1 auto !important;
        white-space: nowrap !important;
        font-size: .82rem !important;
        color: #64748b !important;
    }
    .psb-nachtrag-body > .psb-multicol > input.psb-inp,
    .psb-nachtrag-body > .psb-multicol > span.psb-calc-val {
        flex: 0 0 110px !important;
        width: 110px !important;
        margin-left: 0 !important;
        text-align: right !important;
        white-space: nowrap !important;
        font-size: .86rem !important;
        overflow: visible !important;
    }
    /* Nachtrag-Block: Seitenumbruch + Box-Styling wie BP-Blöcke erzwingen */
    .psb-nachtrag {
        break-inside: avoid;
        page-break-inside: avoid;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        border: 1px solid #e2e8f0 !important;
        border-radius: 6px !important;
        overflow: visible !important;
        margin: 8px 10px !important;
    }
    .psb-nachtrag-head {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        background: #f8fafc !important;
        padding: 8px 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* ── Footer: @page margin übernimmt Abstand, kein extra padding nötig ── */
    .psb-form                   { padding-bottom: 0 !important; }

    /* ── Buttons, Badges, Tooltip-Icons, FA-Deko-Icons verstecken ── */
    .btn,
    .psb-sync-badge,
    .psb-save-status,
    .psb-mass-toggle,
    .psb-tt,
    .psb-bp-dot-wrap .fa-circle,
    .psb-pds-bar,
    .psb-section-head i         { display: none !important; }

    /* ── Comboboxen (Searchable-Select Wrapper) ── */
    .psb-pds-ss-wrap            { display: none !important; }

    /* ── MU/VF-Zeilen: Label-Spalte schmaler + alles in einer Zeile ── */
    .psb-row:has(#psb-mu_stunden),
    .psb-row:has(#psb-vf_stunden) {
        grid-template-columns: 180px 1fr !important;
    }
    .psb-val .psb-multicol {
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 4px !important;
    }
    .psb-val .psb-multicol .psb-multicol-lbl {
        white-space: nowrap !important;
        font-size: .78rem !important;
    }
    .psb-val .psb-multicol input.psb-inp {
        width: 60px !important;
        font-size: .82rem !important;
        flex-shrink: 0 !important;
    }
    .psb-val .psb-multicol .psb-calc-val {
        white-space: nowrap !important;
        font-size: .82rem !important;
    }
    .psb-val .psb-multicol .psb-bp-val-print {
        font-size: .82rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }
    .psb-val .psb-multicol .psb-bp-dot {
        flex-shrink: 0 !important;
    }

    /* ── Scrollbalken weg ── */
    * { scrollbar-width: none; }
}
