:root{--ink:#10212f;--muted:#6b7a86;--line:#dce4e9;--soft:#f3f7f8;--paper:#fff;--nav:#112b32;--accent:#0a8f88;--accent2:#08736e;--good:#16835b;--warn:#aa6c09;--bad:#b94747;--shadow:0 12px 35px rgba(23,43,53,.08)}
*{box-sizing:border-box}body{margin:0;background:#edf2f4;color:var(--ink);font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:14px}.topbar{height:70px;background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;color:#fff;background:linear-gradient(145deg,#13a79e,#08736e);font-size:22px;font-weight:900}.brand strong,.brand small{display:block}.brand strong{font-size:16px}.brand small{color:var(--muted);margin-top:2px}.top-actions,.filters,.integration-actions,.form-row{display:flex;align-items:center;gap:10px}.shell{display:grid;grid-template-columns:235px minmax(0,1fr);min-height:calc(100vh - 70px)}aside{background:var(--nav);color:#dbe9e9;padding:20px 14px;display:flex;flex-direction:column;justify-content:space-between}nav{display:grid;gap:5px}.nav-item{border:0;color:#c5d4d6;background:transparent;padding:12px 13px;border-radius:9px;text-align:left;font:inherit;display:flex;gap:10px;align-items:center;cursor:pointer}.nav-item:hover,.nav-item.active{background:rgba(255,255,255,.11);color:#fff}.nav-item span{width:18px;text-align:center;font-size:17px}.count{margin-left:auto;background:#df715f;color:#fff;border-radius:99px;min-width:21px;padding:2px 6px;text-align:center;font-size:11px}.sidebar-note{display:grid;gap:7px;color:#b5c8ca;font-size:12px;line-height:1.5;padding:14px;border:1px solid rgba(255,255,255,.11);border-radius:10px}.sidebar-note b{color:#fff}main{padding:28px;overflow:hidden}.page{display:none}.page.active{display:block}.page-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:20px}.page-head h1{font-size:25px;margin:0 0 5px}.page-head p,.panel p,.dialog-head p{margin:0;color:var(--muted)}label{display:grid;gap:5px;color:var(--muted);font-size:12px;font-weight:600}input,select{height:39px;border:1px solid #cbd6dc;border-radius:8px;background:#fff;padding:0 10px;color:var(--ink);min-width:120px;font:inherit}.button,.icon-button{border:1px solid #cbd6dc;background:#fff;color:var(--ink);border-radius:8px;padding:10px 13px;font:inherit;font-weight:650;cursor:pointer;text-decoration:none;display:inline-block}.button:hover{border-color:#8ca1aa}.button.primary{background:var(--accent);border-color:var(--accent);color:#fff}.button.primary:hover{background:var(--accent2)}.button.danger-soft{color:var(--bad);background:#fff7f5}.button.small{padding:6px 9px;font-size:12px}.icon-button{padding:5px 9px;font-size:20px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:13px;margin-bottom:18px}.metric-card{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow)}.metric-card span{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}.metric-card strong{font-size:23px}.metric-card small{display:block;color:var(--muted);margin-top:7px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:18px;box-shadow:var(--shadow);margin-bottom:18px}.panel.flush{padding:0}.panel-head{display:flex;justify-content:space-between;margin-bottom:12px}.panel h2{font-size:17px;margin:0 0 5px}.table-wrap{overflow:auto;max-height:68vh}table{border-collapse:separate;border-spacing:0;width:100%;min-width:850px}th,td{border-bottom:1px solid #e7ecef;padding:10px 12px;text-align:left;white-space:nowrap}th{position:sticky;top:0;background:#f5f8f9;color:#54636e;font-size:11px;letter-spacing:.03em;text-transform:uppercase;z-index:2}tbody tr:hover{background:#f5fbfa}td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}.project-table table{min-width:1900px}.project-link{font-weight:750;color:var(--accent2);cursor:pointer}.money-negative{color:var(--bad)}.money-positive{color:var(--good)}.status{display:inline-flex;border-radius:99px;padding:4px 8px;font-size:11px;font-weight:750}.status.open,.status.review{background:#fff3d8;color:#90600c}.status.partial{background:#e8f0ff;color:#315f9d}.status.paid,.status.processed{background:#dcf5ea;color:#126344}.status.error{background:#fde4e1;color:#a63232}.badge{border-radius:99px;padding:6px 10px;font-size:12px}.badge.neutral{background:#eef2f3;color:#5f6d75}.badge.good{background:#dcf5ea;color:#126344}.badge.warn{background:#fff3d8;color:#90600c}.integration-actions{align-items:stretch}.integration-actions>div{flex:1;background:var(--soft);border-radius:10px;padding:17px}.integration-actions .button{margin:15px 5px 0 0}.form-row{align-items:end;flex-wrap:wrap}.form-row label{flex:1;min-width:140px}.form-row .button{margin-bottom:0}.notice{padding:12px;border-radius:8px;background:#e8f7f5;color:#17665f;margin-top:16px!important}.hidden{display:none!important}dialog{width:min(980px,calc(100vw - 30px));max-height:90vh;border:0;border-radius:15px;padding:0;box-shadow:0 30px 90px rgba(0,0,0,.28)}dialog::backdrop{background:rgba(12,25,31,.6)}.dialog-head{display:flex;justify-content:space-between;align-items:start;padding:20px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:4}.dialog-head h2{margin:0 0 5px}.dialog-body{padding:20px 22px}.detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}.detail-section{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.detail-section h3{margin:0 0 10px}.item-list{display:grid;gap:8px}.item{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr auto;align-items:center;gap:10px;padding:10px;background:var(--soft);border-radius:8px}.item small{color:var(--muted)}#toast{position:fixed;right:25px;bottom:25px;background:#132d34;color:#fff;border-radius:9px;padding:12px 16px;opacity:0;transform:translateY(12px);pointer-events:none;transition:.2s;z-index:50}#toast.show{opacity:1;transform:none}.empty{text-align:center!important;color:var(--muted);padding:30px!important}.mobile-only{display:none}
@media(max-width:900px){.shell{grid-template-columns:1fr}aside{display:none;position:fixed;inset:70px auto 0 0;width:235px;z-index:15}aside.open{display:flex}.mobile-only{display:inline-block}.brand small,.sync-badge{display:none}.topbar{padding:0 12px}.top-actions .badge{display:none}main{padding:18px}.metrics{grid-template-columns:repeat(2,1fr)}.page-head{align-items:start;flex-direction:column}.filters{flex-wrap:wrap}.integration-actions{flex-direction:column}.detail-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.brand strong{font-size:14px}.top-actions .button{padding:8px;font-size:12px}.metrics{grid-template-columns:1fr}.detail-grid{grid-template-columns:1fr}}

.brand-logo{display:block;width:132px;height:42px;object-fit:contain;object-position:left center}
@media(max-width:700px){.brand-logo{width:92px;height:34px}.brand>div{display:none}}
.link-button{border:0;background:transparent;padding:0;color:var(--accent2);font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.compact{height:32px;min-width:110px;width:125px}.num-input{text-align:right;max-width:120px}.danger-soft{color:var(--bad)!important;background:#fff7f5!important}

/* Excel-artige Baustellen- und DP-Ansicht */
.project-table table{min-width:max-content}
.project-table th,.project-table td{padding:8px 9px;font-size:12px;border-right:1px solid #d7e0e4}
.project-table th{color:#08232a;text-transform:none;letter-spacing:0;font-size:12px;font-weight:800}
.project-table .sticky-project{position:sticky;left:0;z-index:3;background:#d6eef4}
.project-table td.sticky-project{z-index:1}
.project-table .head-service{background:#bde2ec}
.project-table .head-sub{background:#f04438;color:#111}
.project-table .head-nl{background:#fff200;color:#111}
.project-table .head-es{background:#00a85a;color:#071f14}
.project-table .head-total,.project-table .head-profit,.project-table .head-paid,.project-table .head-difference,.project-table .head-discount{background:#00a85a;color:#071f14}
.project-table .head-cost{background:#f04438;color:#111}
.project-table .head-cancel{background:#f2d4d1;color:#772c26}
.project-table .sub-cell{background:#fff7f6}
.project-table .discount-cell{background:#fffde4;padding:3px}
.project-table .final-cell{background:#eefaf4}
.project-table .total-cell,.project-table .profit-cell{font-weight:750}
.project-table .paid-cell.has-payment{background:#b7efcf;color:#0b5a37;font-weight:800}
.project-table .table-payment-input{width:92px;min-width:92px;height:30px;border:1px solid #b8c7cd;border-radius:4px;padding:0 6px;text-align:right;background:#fff}
.project-table .paid-cell.has-payment .table-payment-input{border-color:#15965b;background:#c9f5dc;color:#084d30;font-weight:800}
.project-table .cancel-cell{text-align:center}
.project-table .cancel-cell input{min-width:0;width:17px;height:17px;accent-color:var(--bad)}
.project-table .table-money-input{width:72px;min-width:72px;height:30px;border:1px solid #e2cd00;border-radius:4px;padding:0 6px;text-align:right;background:#fffef1}
.project-table tr.project-cancelled td{color:#89959b;background:#f2f4f5}
.project-table tr.project-cancelled td:not(.cancel-cell){text-decoration:line-through}
.project-table tr.project-cancelled .sticky-project{background:#e5e8e9}
.form-row .checkbox-label{display:flex;align-items:center;gap:8px;min-height:39px}
.form-row .checkbox-label input{min-width:0;width:18px;height:18px;accent-color:var(--bad)}
.inline-field{display:flex;gap:6px;align-items:center}.inline-field input{min-width:105px}.suggestion-card{display:grid;width:100%;gap:4px;text-align:left;padding:14px;margin:0 0 10px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);cursor:pointer}.suggestion-card:hover{border-color:var(--accent);box-shadow:0 5px 18px rgba(15,55,65,.1)}.suggestion-card strong{color:var(--accent2);font-size:16px}.suggestion-card span,.suggestion-card small{white-space:normal}
.pdf-link{display:inline-block;margin-left:7px;color:#08736e;font-weight:750;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.pdf-preview{position:fixed;right:22px;top:88px;width:min(560px,calc(100vw - 44px));height:min(680px,calc(100vh - 110px));padding:0;background:#fff;color:var(--ink);border:1px solid #b9c7cd;border-radius:12px;box-shadow:0 24px 70px rgba(8,29,38,.28);z-index:45;display:flex;flex-direction:column;overflow:hidden}
.pdf-preview-head{height:49px;flex:0 0 49px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 8px 7px 14px;background:#eaf2f4;border-bottom:1px solid var(--line);cursor:move;touch-action:none;user-select:none}
.pdf-preview-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdf-preview-head>div{display:flex;align-items:center;gap:6px}.pdf-preview-head .icon-button{font-size:18px;padding:3px 8px}
.pdf-preview iframe{width:100%;height:100%;border:0;background:#edf2f4}
.status.overdue{background:#fde4e1;color:#a63232}.status.due_soon{background:#fff3d8;color:#90600c}
.chart-wrap{width:100%;overflow-x:auto}.chart-wrap canvas{display:block;min-width:620px}
.table-payment-input{width:92px;min-width:92px;height:30px;border:1px solid #b8c7cd;border-radius:4px;padding:0 6px;text-align:right;background:#fff}
.paid-cell.has-payment{background:#b7efcf;color:#0b5a37;font-weight:800}.paid-cell.has-payment .table-payment-input{border-color:#15965b;background:#c9f5dc;color:#084d30;font-weight:800}
.date-input{width:142px}
.monitoring-head{padding:16px 18px 0;margin-bottom:8px}
#monitoring .table-money-input{width:86px;min-width:86px;height:30px;padding:0 6px;text-align:right}
.paid-check{display:flex;align-items:center;justify-content:flex-end;gap:7px}
.paid-check>input[type="checkbox"]{width:17px;height:17px;min-width:17px;accent-color:var(--good)}
