/* ===== NVL — Zu verrechnende Leistungen ===== */
.nvl-stichtag { display:flex; align-items:center; gap:8px; margin:0 0 16px; flex-wrap:wrap; }
.nvl-stichtag label { font-size:12.5px; color:var(--text-muted); font-weight:600; }
.nvl-stichtag input[type=date] { padding:6px 10px; border:1px solid var(--border); border-radius:8px; font-size:13px; }
.nvl-qbtn { padding:6px 12px; border:1px solid var(--border); background:var(--surface,#fff); border-radius:8px; font-size:12.5px; cursor:pointer; color:var(--text-muted); }
.nvl-qbtn:hover { border-color:var(--brand); }
.nvl-qbtn.active { background:var(--brand-soft); color:var(--brand-dark); border-color:var(--brand); font-weight:600; }

.nvl-hist { display:flex; align-items:center; gap:8px; background:#fef3c7; color:#92400e; padding:8px 12px; border-radius:8px; font-size:12.5px; margin-bottom:14px; }
.nvl-hist i { width:14px; height:14px; }

.nvl-cards { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.nvl-card { background:var(--surface,#fff); border:1px solid var(--border); border-radius:10px; padding:12px 16px; min-width:150px; display:flex; flex-direction:column; gap:2px; }
.nvl-card-l { font-size:11.5px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.3px; }
.nvl-card-v { font-size:19px; font-weight:700; color:var(--text); }
.nvl-card-sub { font-size:11px; color:var(--text-dim); }
.nvl-card.total { background:var(--brand-soft); border-color:var(--brand); }
.nvl-card.total .nvl-card-v { color:var(--brand-dark); }

.nvl-total-bar { display:flex; align-items:center; gap:14px; background:var(--brand-soft); border:1px solid var(--brand); border-radius:10px; padding:10px 16px; margin-bottom:16px; }
.nvl-total-l { font-size:11.5px; color:var(--brand-dark); text-transform:uppercase; letter-spacing:.3px; font-weight:600; }
.nvl-total-v { font-size:20px; font-weight:700; color:var(--brand-dark); }
.nvl-total-sub { font-size:12px; color:var(--text-muted); }
.nvl-total-cnt { margin-left:auto; font-size:12px; color:var(--text-muted); }

/* Baum */
.nvl-tree .nvl-grp { cursor:pointer; }
.nvl-tree .nvl-grp td { padding:8px 14px; }
.nvl-grp-s td { background:var(--bg-soft,#f2f4f7); font-weight:700; font-size:13px; color:var(--text); border-top:1px solid var(--border); }
.nvl-grp-v td { background:var(--surface,#fff); font-weight:600; font-size:12.5px; color:var(--text-muted); }
.nvl-grp:hover td { filter:brightness(.98); }
.nvl-caret { width:15px; height:15px; vertical-align:-3px; }
.nvl-caret.sm { width:13px; height:13px; }
.nvl-grp-sum { font-weight:700; color:var(--text); }
.nvl-grp-sum.sm { font-weight:600; color:var(--text-muted); }
.nvl-grp-cnt { display:inline-block; margin-left:6px; padding:0 7px; border-radius:20px; background:var(--border,#e5e7eb); color:var(--text-muted); font-size:11px; font-weight:600; }

.nvl-indent { display:inline-block; width:18px; }
.nvl-indent2 { display:inline-block; width:54px; }
.nvl-pen { width:14px; height:14px; color:var(--text-dim); }
.nvl-rowact { white-space:nowrap; }
.nvl-done { width:16px; height:16px; color:var(--text-dim); cursor:pointer; margin-right:10px; vertical-align:-3px; }
.nvl-done:hover { color:#16a34a; }
/* Delegieren an Kadersitzung — Platzhalter, absichtlich deaktiviert (Funktion kommt später) */
.nvl-delegate { width:16px; height:16px; color:var(--border); cursor:not-allowed; opacity:.55; margin-right:10px; vertical-align:-3px; pointer-events:auto; }
.nvl-delegate:hover { color:var(--border); }

/* Erledigt-Popup */
.nvl-pop { position:fixed; z-index:1100; background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.18); padding:12px; width:220px; }
.nvl-pop-t { font-size:12px; font-weight:600; color:var(--text-muted); margin-bottom:6px; }
.nvl-pop input[type=date] { width:100%; padding:7px 9px; border:1px solid var(--border); border-radius:8px; font-size:13px; }
.nvl-pop-btns { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.nvl-pop-btns .btn { padding:5px 12px; font-size:12.5px; }
.nvl-obj { max-width:420px; }

/* Inline-Editor */
.nvl-edit td { background:#f0f9ff; border-top:1px solid var(--brand); }
.nvl-edit-extra td { background:#f0f9ff; border-bottom:1px solid var(--brand); padding-top:0; }
.nvl-edit-extra label { font-size:11.5px; color:var(--text-muted); font-weight:600; margin-right:14px; display:inline-flex; align-items:center; gap:5px; }
.nvl-in { padding:5px 7px; border:1px solid var(--border); border-radius:6px; font-size:12.5px; }
.nvl-in.ktr { width:70px; }
.nvl-in.name { width:180px; }
.nvl-in.num { width:100px; text-align:right; }
.nvl-in.cur { width:64px; }
.nvl-in.wide { width:240px; }
.nvl-edit-obj { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.nvl-edit-actions { white-space:nowrap; }
.nvl-icbtn { border:1px solid var(--border); background:#fff; border-radius:6px; padding:4px 7px; cursor:pointer; color:var(--text-muted); }
.nvl-icbtn.ok { border-color:var(--brand); color:var(--brand-dark); }
.nvl-icbtn i { width:14px; height:14px; vertical-align:-2px; }

.nvl-tablewrap { background:var(--surface,#fff); border:1px solid var(--border); border-radius:12px; overflow:auto; max-height:calc(100vh - 330px); }
.nvl-table { width:100%; border-collapse:collapse; font-size:13px; }
.nvl-table thead th { position:sticky; top:0; z-index:3; text-align:left; padding:10px 14px; background:var(--bg-soft,#f7f8fa); color:var(--text-muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.3px; border-bottom:1px solid var(--border); box-shadow:0 1px 0 var(--border); }
.nvl-table th.num, .nvl-table td.num { text-align:right; white-space:nowrap; }
.nvl-table tbody td { padding:9px 14px; border-bottom:1px solid var(--border-soft,#eef0f3); }
.nvl-row td { color:var(--text); }
.nvl-table tbody tr:last-child td { border-bottom:none; }
.nvl-clk { cursor:pointer; }
.nvl-clk:hover { background:var(--brand-soft); }
.nvl-ktr { font-variant-numeric:tabular-nums; font-weight:600; color:var(--brand-dark); }
.nvl-bem-cell { color:var(--text-dim); }
.nvl-bem { display:inline-flex; align-items:baseline; gap:5px; color:var(--text-dim); font-size:.92em; line-height:1.3; white-space:normal; }
.nvl-bem i { width:13px; height:13px; flex:none; align-self:center; }
.nvl-note-cell { white-space:nowrap; }
.nvl-note-cell .nvl-notebtn { margin-left:0; }
.nvl-th-note { text-align:left; }

/* Positionszeile ohne Unterrand, wenn Notiz-Unterzeile/Panel folgt */
.nvl-row-nb td { border-bottom:none !important; }

/* Letzte Notiz als Unterzeile (Vorschau, klickbar → voller Verlauf) */
.nvl-noteprev-row > td { padding:0 !important; background:transparent; }
.nvl-noteprev { display:flex; align-items:baseline; gap:6px; padding:2px 14px 8px 68px; cursor:pointer; }
.nvl-noteprev i { width:12px; height:12px; color:var(--brand); flex:none; align-self:center; }
.nvl-noteprev-txt { font-size:12px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:52ch; }
.nvl-noteprev-meta { font-size:10.5px; color:var(--text-dim); white-space:nowrap; }
.nvl-noteprev:hover .nvl-noteprev-txt { color:var(--brand-dark); }
.nvl-table td.empty { text-align:center; color:var(--text-dim); padding:20px; }
.nvl-foot { font-size:12px; color:var(--text-dim); margin-top:10px; }

.nvl-kat { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:600; background:#eef0f3; color:#475569; }
.nvl-kat.k-garantierueckbehalt { background:#fef3c7; color:#92400e; }
.nvl-kat.k-nachtrag { background:#dbeafe; color:#1d4ed8; }
.nvl-kat.k-ertragsabgrenzung { background:#e0e7ff; color:#4338ca; }
.nvl-kat.k-kreditor { background:#fce7f3; color:#9d174d; }

/* Modal */
.nvl-modal-bg { position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; z-index:1000; padding:20px; }
.nvl-modal { background:#fff; border-radius:14px; width:min(560px,100%); max-height:90vh; overflow:auto; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.nvl-modal-head { display:flex; align-items:center; padding:16px 20px; border-bottom:1px solid var(--border); }
.nvl-modal-head h3 { margin:0; font-size:16px; }
.nvl-x { margin-left:auto; background:none; border:none; cursor:pointer; color:var(--text-muted); }
.nvl-x i { width:18px; height:18px; }
.nvl-form { padding:16px 20px; display:flex; flex-direction:column; gap:12px; }
.nvl-form label { display:flex; flex-direction:column; gap:4px; font-size:12.5px; font-weight:600; color:var(--text-muted); }
.nvl-form input, .nvl-form select, .nvl-form textarea { padding:8px 10px; border:1px solid var(--border); border-radius:8px; font-size:13px; font-weight:400; color:var(--text); }
.nvl-form-row { display:flex; gap:12px; }
.nvl-form-row label { flex:1; }
.nvl-form hr { border:none; border-top:1px solid var(--border); margin:2px 0; }
.nvl-hint { font-size:11.5px; color:var(--text-dim); margin:0; }
.nvl-modal-foot { display:flex; justify-content:flex-end; gap:10px; padding:14px 20px; border-top:1px solid var(--border); }

/* ===== Notiz-History (Diskussions-/Besprechungsverlauf pro Position) ===== */
.nvl-notebtn { display:inline-flex; align-items:center; gap:3px; margin-left:8px; padding:1px 7px; border-radius:20px; background:#eef0f3; color:var(--text-muted); cursor:pointer; font-size:11px; vertical-align:1px; }
.nvl-notebtn i { width:13px; height:13px; }
.nvl-notebtn:hover { background:var(--brand-soft); color:var(--brand-dark); }
.nvl-notebtn.has { background:#fef3c7; color:#92400e; }
.nvl-notebtn.on { background:var(--brand); color:#fff; }
.nvl-notebtn b { font-weight:700; }
.nvl-note-row > td { background:#f7fbfd !important; border-bottom:1px solid var(--brand) !important; padding:0 !important; }
.nvl-notes { padding:12px 18px 12px 68px; }
.nvl-notes-h { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:var(--brand-dark); margin-bottom:8px; }
.nvl-notes-h i { width:14px; height:14px; }
.nvl-note-list { display:flex; flex-direction:column; gap:6px; }
.nvl-note { background:#fff; border:1px solid var(--border); border-radius:8px; padding:6px 10px; }
.nvl-note-meta { font-size:10px; color:var(--text-muted); margin-bottom:2px; }
.nvl-note-txt { font-size:12px; color:var(--text); white-space:pre-wrap; }
.nvl-note-empty { font-size:12px; color:var(--text-muted); font-style:italic; }
.nvl-note-add { display:flex; gap:6px; margin-top:8px; }
.nvl-note-add input { flex:1; padding:5px 9px; border:1px solid var(--border); border-radius:8px; font-size:12px; }
.nvl-note-add .btn { white-space:nowrap; }
