:root{
  --primary:#17324d;
  --primary-rgb:23,50,77;
  --accent:#d6ad55;
  --accent-rgb:214,173,85;
  --bg:#0b1220;
  --surface:#ffffff;
  --surface-alt:#f7f8fa;
  --soft:#eef2f5;
  --text:#17212b;
  --muted:#66717d;
  --line:#e4e8ec;
  --danger:#a43b3b;
  --success:#247552;
  --warning:#9a6a13;
  --radius-xl:26px;
  --radius-lg:20px;
  --radius-md:14px;
  --shadow-xl:0 28px 80px rgba(3,12,23,.24);
  --shadow-lg:0 18px 48px rgba(4,18,32,.14);
  --shadow-md:0 10px 28px rgba(18,37,55,.10);
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--bg)}
body{margin:0;min-height:100vh;color:var(--text);font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;background:
  radial-gradient(circle at 12% 0%,rgba(var(--primary-rgb),.54),transparent 34rem),
  radial-gradient(circle at 100% 12%,rgba(var(--accent-rgb),.13),transparent 31rem),
  linear-gradient(145deg,var(--bg),#102338 58%,#0a1522);overflow-x:hidden}
button,input,select,textarea{font:inherit}
button{touch-action:manipulation}
.hidden{display:none!important}
.ambient{position:fixed;pointer-events:none;border-radius:50%;filter:blur(12px);opacity:.35;z-index:0}
.ambient-one{width:420px;height:420px;left:-220px;bottom:-190px;background:rgba(var(--accent-rgb),.20)}
.ambient-two{width:520px;height:520px;right:-310px;top:90px;background:rgba(var(--primary-rgb),.34)}

/* Laden */
.loading{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:22px;background:linear-gradient(145deg,rgba(8,17,29,.96),rgba(15,36,55,.97));color:#fff}
.loading-card{width:min(430px,100%);padding:30px;border:1px solid rgba(255,255,255,.13);border-radius:28px;background:rgba(255,255,255,.075);box-shadow:0 30px 90px rgba(0,0,0,.36);backdrop-filter:blur(22px)}
.loading-brand{display:flex;align-items:center;gap:16px}.loading-mark{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#ecd28d,var(--accent));color:#152132;font-size:29px;font-weight:900;box-shadow:0 14px 34px rgba(var(--accent-rgb),.23)}
.loading-brand small{display:block;margin-bottom:5px;font-size:10px;letter-spacing:.18em;color:rgba(255,255,255,.58)}.loading-brand strong{font-size:22px;letter-spacing:-.02em}
.loading-progress{height:4px;margin:26px 0 17px;border-radius:999px;background:rgba(255,255,255,.10);overflow:hidden}.loading-progress span{display:block;width:44%;height:100%;border-radius:inherit;background:linear-gradient(90deg,transparent,var(--accent),transparent);animation:loadingLine 1.35s ease-in-out infinite}
.loading p{margin:0;color:rgba(255,255,255,.68);font-size:13px;line-height:1.55}
@keyframes loadingLine{0%{transform:translateX(-140%)}100%{transform:translateX(330%)}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.app-shell{position:relative;z-index:1;min-height:100vh}
.topbar{position:sticky;top:0;z-index:40;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;min-height:76px;padding:12px clamp(18px,3vw,44px);background:rgba(7,15,26,.84);color:#fff;border-bottom:1px solid rgba(255,255,255,.10);backdrop-filter:blur(26px) saturate(135%);box-shadow:0 10px 34px rgba(0,0,0,.16)}
.icon-button{width:46px;height:46px;border:1px solid rgba(255,255,255,.14);border-radius:15px;display:grid;place-items:center;background:rgba(255,255,255,.07);color:#fff;font-size:23px;cursor:pointer;transition:.18s ease}.icon-button:hover{background:rgba(255,255,255,.13);border-color:rgba(var(--accent-rgb),.55);transform:translateX(-2px)}
.brand{display:flex;align-items:center;gap:13px;min-width:0}.brand-mark{width:48px;height:48px;display:grid;place-items:center;flex:0 0 48px;border-radius:15px;background:linear-gradient(145deg,#efd891,var(--accent));color:#152132;font-size:24px;font-weight:950;box-shadow:0 11px 26px rgba(var(--accent-rgb),.17),inset 0 1px rgba(255,255,255,.58)}
.brand-copy{min-width:0}.brand h1{margin:2px 0 0;font-size:clamp(18px,2vw,25px);line-height:1.1;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand small{display:block;font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.58);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile{display:flex;align-items:center;gap:12px;text-align:right}.profile-copy{display:grid;gap:2px}.profile-copy span{font-size:14px;font-weight:800}.profile small{color:rgba(255,255,255,.56);font-size:11px}.profile-avatar{width:48px;height:48px;border-radius:16px;overflow:hidden;flex:0 0 48px;border:2px solid rgba(var(--accent-rgb),.78);box-shadow:0 10px 28px rgba(0,0,0,.28);background:rgba(255,255,255,.08)}.profile-avatar img{width:100%;height:100%;display:block;object-fit:cover}.profile-avatar[hidden]{display:none!important}

.workspace{max-width:1680px;margin:0 auto;padding:20px clamp(16px,2.7vw,38px) 54px}
.navigation{position:sticky;top:94px;z-index:28;display:flex;gap:7px;width:max-content;max-width:100%;overflow:auto;padding:7px;border:1px solid rgba(255,255,255,.12);border-radius:18px;background:rgba(8,18,30,.72);backdrop-filter:blur(18px);box-shadow:0 14px 36px rgba(0,0,0,.16);scrollbar-width:none}.navigation::-webkit-scrollbar{display:none}
.nav-button{min-height:42px;border:0;border-radius:12px;padding:9px 15px;display:inline-flex;align-items:center;gap:9px;background:transparent;color:rgba(255,255,255,.70);font-size:13px;font-weight:750;cursor:pointer;white-space:nowrap;transition:.18s ease}.nav-button:hover{color:#fff;background:rgba(255,255,255,.07)}.nav-button.active{color:#152132;background:linear-gradient(145deg,#efd992,var(--accent));box-shadow:0 8px 20px rgba(var(--accent-rgb),.20)}
.nav-icon{width:19px;height:19px;display:grid;place-items:center}.nav-icon svg{width:18px;height:18px;display:block;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.content{padding-top:24px;animation:rise .26s ease both}
.page-head{position:relative;display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 20px;padding:25px 27px;border:1px solid rgba(255,255,255,.12);border-radius:var(--radius-xl);color:#fff;background:linear-gradient(125deg,rgba(255,255,255,.095),rgba(255,255,255,.035));box-shadow:0 18px 50px rgba(0,0,0,.15);backdrop-filter:blur(18px);overflow:hidden}
.page-head:after{content:"";position:absolute;width:180px;height:180px;right:-78px;top:-100px;border-radius:50%;background:radial-gradient(circle,rgba(var(--accent-rgb),.30),transparent 66%);pointer-events:none}.page-head-copy{position:relative;z-index:1}.page-kicker{display:block;margin-bottom:7px;color:var(--accent);font-size:10px;line-height:1;font-weight:850;letter-spacing:.16em;text-transform:uppercase}.page-head h2{margin:0;font-size:clamp(28px,4vw,44px);line-height:1.02;letter-spacing:-.04em}.page-head p{max-width:760px;margin:9px 0 0;color:rgba(255,255,255,.66);font-size:14px;line-height:1.55}.actions{position:relative;z-index:1;display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.button{min-height:42px;border:1px solid transparent;border-radius:12px;padding:10px 16px;display:inline-flex;align-items:center;justify-content:center;gap:7px;background:linear-gradient(145deg,var(--primary),#244a69);color:#fff;font-size:13px;font-weight:800;cursor:pointer;box-shadow:0 7px 16px rgba(18,38,55,.12);transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}.button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 11px 24px rgba(18,38,55,.18);filter:brightness(1.03)}.button:active:not(:disabled){transform:translateY(0)}.button.accent{background:linear-gradient(145deg,#efd992,var(--accent));color:#17212b;box-shadow:0 8px 20px rgba(var(--accent-rgb),.18)}.button.secondary{background:#edf1f4;color:#243545;border-color:#e2e7eb;box-shadow:none}.button.danger{background:linear-gradient(145deg,#b64b4b,#8f2f2f)}.button.ghost{background:#fff;color:#344657;border-color:#d9e0e6;box-shadow:none}.button.small{min-height:34px;padding:7px 11px;border-radius:10px;font-size:11px;white-space:nowrap}.button:disabled{opacity:.42;cursor:not-allowed;box-shadow:none}

.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:13px}.kpi{position:relative;min-height:132px;padding:21px 21px 19px;border:1px solid rgba(255,255,255,.76);border-radius:var(--radius-lg);background:linear-gradient(150deg,#fff 0%,#f8fafb 100%);box-shadow:var(--shadow-lg);overflow:hidden}.kpi:before{content:"";position:absolute;left:0;top:0;width:100%;height:4px;background:linear-gradient(90deg,var(--accent),rgba(var(--accent-rgb),.15))}.kpi:after{content:"";position:absolute;width:90px;height:90px;right:-42px;bottom:-48px;border-radius:50%;background:rgba(var(--primary-rgb),.055)}.kpi small{position:relative;z-index:1;color:#74808b;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.kpi strong{position:relative;z-index:1;display:block;margin-top:13px;color:#1a2a39;font-size:clamp(27px,3vw,34px);line-height:1.05;letter-spacing:-.035em}
.panel{margin-top:17px;padding:22px;border:1px solid rgba(255,255,255,.78);border-radius:var(--radius-xl);background:rgba(255,255,255,.97);box-shadow:var(--shadow-xl)}.panel h3{margin:0 0 17px;color:#1b2b3a;font-size:18px;letter-spacing:-.02em}
.table-wrap{overflow:auto;border:1px solid #e2e7eb;border-radius:17px;background:#fff;box-shadow:inset 0 1px rgba(255,255,255,.8)}.data-table{width:100%;min-width:790px;border-collapse:separate;border-spacing:0;background:#fff}.data-table th,.data-table td{padding:14px 15px;text-align:left;border-bottom:1px solid #e9edf0;vertical-align:middle}.data-table th{position:sticky;top:0;z-index:2;background:#f4f6f8;color:#66727d;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.075em}.data-table th:first-child{border-top-left-radius:16px}.data-table th:last-child{border-top-right-radius:16px}.data-table tbody tr{transition:background .14s ease}.data-table tbody tr:hover{background:#fbfaf5}.data-table tbody tr:last-child td{border-bottom:0}.data-table td{font-size:13px;color:#34414d}.data-table td strong{color:#1b2c3c}.data-table td small{color:#7b8790;line-height:1.4}.row-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.link-button{border:0;background:none;color:#234f75;font-weight:800;cursor:pointer;padding:0}
.status{display:inline-flex;align-items:center;min-height:25px;padding:4px 9px;border:1px solid transparent;border-radius:999px;background:#edf1f4;color:#53606c;font-size:10px;font-weight:850;letter-spacing:.025em}.status.Bezahlt{background:#e0f3e8;color:#17613f;border-color:#b9dfc9}.status.Überfällig,.status.Storniert{background:#f7e2e2;color:#8a2828;border-color:#efc5c5}.status.Entwurf{background:#fff1cc;color:#78560a;border-color:#efd995}.status.Teilbezahlt{background:#ece8fa;color:#4e4288;border-color:#d8d0f2}.status.Gutschrift{background:#e6eef7;color:#244e74;border-color:#cbdbea}.empty{padding:38px;text-align:center;color:var(--muted)}.empty.compact{padding:18px}
.paid-row{background:#f4fbf7!important}.paid-row:hover{background:#eaf8f0!important}.paid-check{display:inline-grid;place-items:center;width:22px;height:22px;margin-left:6px;border-radius:50%;background:linear-gradient(145deg,#2d9b6a,#1f7851);color:#fff;font-size:13px;font-weight:950;vertical-align:middle;box-shadow:0 5px 12px rgba(35,144,95,.20)}.paid-check.detail{width:25px;height:25px;margin:0 5px 0 0}

/* Dialoge und Formulare */
.modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:22px;background:rgba(3,8,15,.74);backdrop-filter:blur(7px)}.modal-card{position:relative;width:min(1120px,100%);max-height:92vh;overflow:auto;padding:29px;border:1px solid rgba(255,255,255,.8);border-radius:28px;background:linear-gradient(155deg,#fff,#f7f8fa);box-shadow:0 38px 120px rgba(0,0,0,.46);animation:rise .12s ease both}.modal-card::-webkit-scrollbar{width:10px}.modal-card::-webkit-scrollbar-thumb{background:#ccd4db;border:3px solid #f7f8fa;border-radius:999px}.modal-close{position:absolute;right:17px;top:15px;width:39px;height:39px;border:1px solid #e1e6ea;border-radius:13px;display:grid;place-items:center;background:#f1f4f6;color:#4a5864;font-size:24px;line-height:1;cursor:pointer;transition:.15s ease}.modal-close:hover{background:#e7ecf0;color:#15283a}.modal h2{margin:0 50px 24px 0;color:#17283a;font-size:27px;letter-spacing:-.035em}
.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:15px}.field{display:grid;gap:7px;grid-column:span 4}.field.wide{grid-column:span 8}.field.full{grid-column:1/-1}.field.half{grid-column:span 6}.field label{font-size:10px;font-weight:900;color:#64717c;text-transform:uppercase;letter-spacing:.075em}.field input,.field select,.field textarea{width:100%;min-height:44px;border:1px solid #cfd7de;border-radius:12px;padding:11px 12px;background:#fff;color:#21313f;outline:0;box-shadow:0 1px 0 rgba(255,255,255,.9);transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}.field input:hover,.field select:hover,.field textarea:hover{border-color:#b8c3cc}.field input:focus,.field select:focus,.field textarea:focus{border-color:rgba(var(--primary-rgb),.68);box-shadow:0 0 0 4px rgba(var(--primary-rgb),.09);background:#fff}.field textarea{min-height:96px;resize:vertical}.form-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:24px;padding-top:18px;border-top:1px solid #e5e9ed;flex-wrap:wrap}
.position-list{display:grid;gap:11px}.position-row{display:grid;grid-template-columns:2fr .7fr .8fr 1fr .7fr auto;gap:9px;align-items:end;padding:14px;border:1px solid #e2e7eb;border-radius:16px;background:#f7f9fa}.position-row label{display:block;margin-bottom:5px;font-size:10px;font-weight:800;color:#6b7782}.position-row input,.position-row select{width:100%;min-height:40px;border:1px solid #cbd4dc;border-radius:10px;padding:9px 10px;background:#fff}.remove-position{width:40px;height:40px;border:1px solid #efcccc;border-radius:10px;background:#f9e7e7;color:#8c2626;font-size:17px;cursor:pointer}.invoice-total{display:flex;justify-content:flex-end;margin-top:17px}.invoice-total table{min-width:330px;border-collapse:separate;border-spacing:0;overflow:hidden;border:1px solid #e2e7eb;border-radius:13px;background:#fff}.invoice-total td{padding:9px 12px;border-bottom:1px solid #edf0f2}.invoice-total tr:last-child td{border-bottom:0}.invoice-total td:last-child{text-align:right;font-weight:750}.invoice-total tr.grand-total{font-size:17px;font-weight:900;background:linear-gradient(90deg,#f5ecd4,#f0e1b7)}.invoice-total tr.grand-total td{padding:12px}
.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:11px}.detail-box{padding:15px;border:1px solid #e2e7eb;border-radius:15px;background:#f7f9fa}.detail-box small{display:block;color:#74808b;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.detail-box strong{display:block;margin-top:7px;color:#203140;font-size:15px}.detail-box.success{background:#eaf7ef;border-color:#cde7d7}.detail-box.warning{background:#fff5df;border-color:#eeddae}.payment-summary{margin-bottom:20px}.payment-preview{margin-top:16px;padding:15px 16px;border:1px solid #dce4ea;border-radius:13px;background:#eef3f7;display:grid;gap:4px}.payment-preview span{color:#5d6974}.text-danger{color:#982f2f}
.check-field,.checkbox-line{display:flex!important;align-items:center;gap:10px;text-transform:none!important;letter-spacing:0!important;font-size:14px!important;color:#263746!important;cursor:pointer}.check-field input,.checkbox-line input{width:18px!important;height:18px!important;flex:0 0 auto}.legal-note{display:none;margin-top:10px;padding:13px 14px;border:1px solid #dbc47f;border-radius:12px;background:#fff8df;color:#5d4a12;font-size:13px;line-height:1.5}.check-field:has(input:checked)+.legal-note,.legal-note.visible{display:block}

/* Kundenanalyse */
.customer-overview-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin:0 42px 20px 0}.customer-overview-head small{color:#7a8691;text-transform:uppercase;letter-spacing:.10em;font-size:10px;font-weight:900}.customer-overview-head h2{margin:4px 0 0}.customer-overview-layout{display:grid;grid-template-columns:minmax(270px,350px) minmax(0,1fr);gap:17px;align-items:start}.customer-card,.analytics-card{border:1px solid #e1e7ec;border-radius:20px;background:#fff;box-shadow:var(--shadow-md)}.customer-card{position:sticky;top:0;padding:20px}.customer-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding-bottom:17px;border-bottom:1px solid #e7ebef}.customer-card-head small{color:#7b8791;font-size:11px}.customer-card-head h3{margin:4px 0 0;font-size:23px;letter-spacing:-.03em}.customer-data{display:grid;gap:0;margin:11px 0 0}.customer-data div{padding:11px 0;border-bottom:1px solid #edf0f3}.customer-data div:last-child{border-bottom:0}.customer-data dt{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#7b8791;font-weight:900}.customer-data dd{margin:5px 0 0;color:#243545;line-height:1.45}.customer-note{margin-top:14px;padding:14px;border:1px solid #e3e7eb;border-radius:14px;background:#f6f8f9}.customer-note small{font-size:10px;font-weight:900;color:#687580;text-transform:uppercase;letter-spacing:.06em}.customer-note p{margin:6px 0 0;white-space:pre-wrap;line-height:1.5}.customer-analytics{min-width:0}.analytics-kpis{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px}.analytics-kpis article{position:relative;min-height:104px;padding:17px;border:1px solid rgba(255,255,255,.12);border-radius:17px;background:linear-gradient(145deg,#17324d,#244c6c);color:#fff;box-shadow:0 13px 30px rgba(23,50,77,.17);overflow:hidden}.analytics-kpis article:after{content:"";position:absolute;width:70px;height:70px;right:-31px;bottom:-34px;border-radius:50%;background:rgba(255,255,255,.06)}.analytics-kpis small{color:rgba(255,255,255,.62);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.analytics-kpis strong{display:block;margin-top:9px;font-size:22px;letter-spacing:-.03em}.analytics-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:13px;margin-top:13px}.analytics-card{padding:18px;min-width:0}.recent-card{margin-top:13px}.card-title small{color:#7a8691;text-transform:uppercase;font-size:9px;letter-spacing:.10em;font-weight:900}.card-title h3{margin:5px 0 15px;font-size:18px;letter-spacing:-.02em}.revenue-chart{height:235px;display:flex;align-items:end;gap:9px;padding-top:28px;border-bottom:1px solid #dfe5ea}.revenue-column{flex:1;height:100%;display:grid;grid-template-rows:auto 1fr auto;gap:7px;min-width:0;text-align:center}.revenue-value{font-size:9px;color:#66727e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.revenue-track{height:100%;display:flex;align-items:end;justify-content:center;border-radius:9px 9px 0 0;background:linear-gradient(to top,rgba(var(--primary-rgb),.045),transparent)}.revenue-bar{width:min(42px,72%);min-height:4px;border-radius:8px 8px 2px 2px;background:linear-gradient(180deg,#e5c46d,#b78c32);box-shadow:0 7px 16px rgba(183,140,50,.18)}.revenue-column small{font-size:9px;color:#65717c;padding-bottom:4px}.top-items{display:grid;gap:17px;padding-top:4px}.top-item-head{display:flex;justify-content:space-between;gap:12px;font-size:12px}.top-item-head span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-item-head strong{white-space:nowrap}.top-item-track{height:7px;margin-top:8px;border-radius:999px;background:#e9edf1;overflow:hidden}.top-item-track span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--primary),#477b9e)}.overview-loading{min-height:300px;display:grid;place-content:center;justify-items:center;gap:14px;color:#52606c}

/* Prozess, Toast */
.process-overlay{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:20px;background:rgba(5,11,20,.76);backdrop-filter:blur(12px)}.process-card{position:relative;width:min(430px,100%);display:grid;justify-items:center;gap:10px;padding:31px 30px 27px;border:1px solid rgba(255,255,255,.72);border-radius:26px;text-align:center;background:linear-gradient(155deg,#fff,#f5f7f9);box-shadow:0 35px 100px rgba(0,0,0,.42);overflow:hidden}.process-mark{position:absolute;right:17px;top:13px;color:#d9dee3;font-size:25px;font-weight:900}.process-card strong{font-size:20px;color:#17283a;letter-spacing:-.02em}.process-card span{max-width:330px;color:#66717d;line-height:1.5;font-size:13px}.process-spinner{width:48px;height:48px;margin:1px 0 4px;border:4px solid #e3e8ec;border-top-color:var(--accent);border-radius:50%;animation:spin .78s linear infinite}.process-line{width:100%;height:3px;margin-top:7px;border-radius:999px;background:#e7ebee;overflow:hidden}.process-line i{display:block;width:45%;height:100%;background:linear-gradient(90deg,transparent,var(--accent),transparent);animation:loadingLine 1.25s ease-in-out infinite}.toast{position:fixed;right:22px;bottom:22px;z-index:130;max-width:430px;padding:14px 17px;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:rgba(23,50,77,.96);color:#fff;box-shadow:0 18px 48px rgba(0,0,0,.28);backdrop-filter:blur(12px);font-size:13px}.toast.error{background:rgba(139,42,42,.97)}

@media(max-width:980px){.customer-overview-layout{grid-template-columns:1fr}.customer-card{position:static}.analytics-grid{grid-template-columns:1fr}.analytics-kpis{grid-template-columns:repeat(2,1fr)}.navigation{top:88px}}
@media(max-width:760px){
  .topbar{grid-template-columns:auto minmax(0,1fr) auto;min-height:68px;padding:10px 13px}.brand-mark{width:43px;height:43px;flex-basis:43px}.brand h1{font-size:17px}.brand small{font-size:8px}.profile-copy{display:none}.profile-avatar{width:42px;height:42px;flex-basis:42px;border-radius:14px}.workspace{padding:13px 10px 34px}.navigation{top:78px;width:100%;border-radius:15px;padding:5px}.nav-button{flex:1;justify-content:center;padding:9px 10px;font-size:11px}.nav-icon{display:none}.page-head{align-items:flex-start;flex-direction:column;padding:21px 19px;border-radius:21px}.page-head h2{font-size:29px}.actions{width:100%}.actions .button{flex:1}.kpi-grid{grid-template-columns:1fr 1fr}.kpi{min-height:116px;padding:18px}.kpi strong{font-size:25px}.panel{padding:14px;border-radius:20px}.field,.field.wide,.field.half{grid-column:1/-1}.position-row{grid-template-columns:1fr 1fr}.position-row>div:first-child{grid-column:1/-1}.modal{padding:7px}.modal-card{padding:22px 13px 18px;border-radius:20px}.modal h2{font-size:23px}.customer-overview-head{align-items:flex-start;flex-direction:column}.analytics-kpis{grid-template-columns:1fr 1fr}.revenue-chart{height:205px}.revenue-value{display:none}.form-footer .button{flex:1}.toast{left:12px;right:12px;bottom:12px;max-width:none}
}
@media(max-width:430px){.kpi-grid{grid-template-columns:1fr}.analytics-kpis{grid-template-columns:1fr}.navigation .nav-button{min-width:max-content}.navigation{overflow-x:auto}.brand-copy small{display:none}.page-head p{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}


/* CF-V168 · Kostenvoranschläge */
.status.Kostenvoranschlag{background:rgba(214,173,85,.14);color:#8c671d;border-color:rgba(214,173,85,.3)}
.estimate-row td:first-child strong{color:var(--primary)}
.estimate-row:hover{background:linear-gradient(90deg,rgba(214,173,85,.06),rgba(255,255,255,.72))}
@media (prefers-color-scheme:dark){.estimate-row:hover{background:rgba(214,173,85,.06)}}


/* CF-V168 · Sofort sichtbare Detailfenster und intelligentes Vorladen */
.modal{will-change:opacity;contain:layout style}.modal-card{will-change:transform,opacity;transform:translateZ(0);contain:layout paint style}.instant-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 48px 22px 0}.instant-detail-head small{display:block;margin-bottom:5px;color:#73808c;font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.instant-detail-head h2{margin:0}.instant-live{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;padding:8px 11px;border:1px solid #d9e1e7;border-radius:999px;background:#f5f8fa;color:#60707d;font-size:11px;font-weight:800}.instant-live i{width:8px;height:8px;border-radius:50%;background:#d6ad55;box-shadow:0 0 0 0 rgba(214,173,85,.38);animation:instantPulse 1.1s ease-out infinite}.instant-summary{margin-bottom:16px}.instant-panel{min-height:170px}.instant-table{display:grid;gap:11px;margin-top:15px}.instant-table span{display:block;height:38px;border-radius:10px;background:linear-gradient(100deg,#eef2f5 20%,#f8fafb 38%,#eef2f5 56%);background-size:220% 100%;animation:instantSweep 1.05s ease-in-out infinite}.instant-table span:nth-child(2){width:92%}.instant-table span:nth-child(3){width:83%}.instant-footer{margin-top:15px}@keyframes instantSweep{to{background-position-x:-220%}}@keyframes instantPulse{70%{box-shadow:0 0 0 8px rgba(214,173,85,0)}}
@media(max-width:720px){.instant-detail-head{margin-right:42px;flex-direction:column;gap:9px}.instant-live{padding:6px 9px}.instant-panel{min-height:150px}}
@media(prefers-reduced-motion:reduce){.instant-live i,.instant-table span{animation:none}}


/* ============================================================
   V223D31 · S10 DESKTOP APP-LAYOUT
   Desktop bleibt eine Business-Arbeitsoberfläche:
   kompakte feste Seitenleiste, dichter Inhalt, kleinere KPIs.
   ============================================================ */
html[data-wf-display-resolved="desktop"] body{
  overflow-x:hidden
}
html[data-wf-display-resolved="desktop"] .app-shell{
  min-height:100vh
}
html[data-wf-display-resolved="desktop"] .topbar{
  min-height:64px;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:10px;
  padding:8px 16px
}
html[data-wf-display-resolved="desktop"] .topbar .icon-button{
  width:38px;height:38px;border-radius:11px;font-size:19px
}
html[data-wf-display-resolved="desktop"] .brand{
  gap:9px
}
html[data-wf-display-resolved="desktop"] .brand-mark{
  width:38px;height:38px;flex-basis:38px;border-radius:11px;font-size:19px
}
html[data-wf-display-resolved="desktop"] .brand h1{
  font-size:18px
}
html[data-wf-display-resolved="desktop"] .brand small{
  font-size:8px
}
html[data-wf-display-resolved="desktop"] .profile{
  gap:8px
}
html[data-wf-display-resolved="desktop"] .profile-avatar{
  width:36px;height:36px
}
html[data-wf-display-resolved="desktop"] .profile-copy span{
  font-size:11px
}
html[data-wf-display-resolved="desktop"] .profile-copy small{
  font-size:8px
}

html[data-wf-display-resolved="desktop"] .workspace{
  display:grid;
  grid-template-columns:214px minmax(0,1fr);
  align-items:start;
  gap:12px;
  width:min(1600px,calc(100% - 22px));
  max-width:none;
  margin:0 auto;
  padding:10px 0 34px
}
html[data-wf-display-resolved="desktop"] .navigation{
  position:sticky;
  top:74px;
  z-index:28;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
  width:214px;
  max-width:none;
  height:auto;
  max-height:calc(100vh - 86px);
  overflow-x:hidden;
  overflow-y:auto;
  padding:7px;
  border-radius:15px
}
html[data-wf-display-resolved="desktop"] .nav-button{
  width:100%;
  min-height:38px;
  justify-content:flex-start;
  gap:8px;
  padding:7px 9px;
  border-radius:9px;
  font-size:11px
}
html[data-wf-display-resolved="desktop"] .nav-icon{
  width:24px;height:24px;flex:0 0 24px
}
html[data-wf-display-resolved="desktop"] .nav-icon svg{
  width:16px;height:16px
}

html[data-wf-display-resolved="desktop"] .content{
  min-width:0;
  padding:0
}
html[data-wf-display-resolved="desktop"] .page-head{
  align-items:center;
  gap:14px;
  margin:0 0 10px;
  padding:14px 16px;
  border-radius:15px
}
html[data-wf-display-resolved="desktop"] .page-head:after{
  width:120px;height:120px;right:-48px;top:-72px
}
html[data-wf-display-resolved="desktop"] .page-kicker{
  margin-bottom:4px;
  font-size:8px
}
html[data-wf-display-resolved="desktop"] .page-head h2{
  font-size:27px
}
html[data-wf-display-resolved="desktop"] .page-head p{
  max-width:720px;
  margin-top:5px;
  font-size:11px;
  line-height:1.4
}
html[data-wf-display-resolved="desktop"] .actions{
  gap:6px
}
html[data-wf-display-resolved="desktop"] .button{
  min-height:36px;
  padding:7px 10px;
  border-radius:9px;
  font-size:11px
}

html[data-wf-display-resolved="desktop"] .kpi-grid{
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
  gap:8px
}
html[data-wf-display-resolved="desktop"] .kpi{
  min-height:88px;
  padding:11px 12px 10px;
  border-radius:13px
}
html[data-wf-display-resolved="desktop"] .kpi:before{
  height:3px
}
html[data-wf-display-resolved="desktop"] .kpi small{
  font-size:8px
}
html[data-wf-display-resolved="desktop"] .kpi strong{
  margin-top:7px;
  font-size:22px
}

html[data-wf-display-resolved="desktop"] .panel{
  margin-top:10px;
  padding:13px;
  border-radius:15px
}
html[data-wf-display-resolved="desktop"] .panel h3{
  margin-bottom:10px;
  font-size:15px
}
html[data-wf-display-resolved="desktop"] .table-wrap{
  border-radius:12px
}
html[data-wf-display-resolved="desktop"] .data-table{
  min-width:720px
}
html[data-wf-display-resolved="desktop"] .data-table th,
html[data-wf-display-resolved="desktop"] .data-table td{
  padding:8px 9px
}
html[data-wf-display-resolved="desktop"] .data-table th{
  font-size:8px
}
html[data-wf-display-resolved="desktop"] .data-table td{
  font-size:11px
}
html[data-wf-display-resolved="desktop"] .status{
  min-height:22px;
  padding:3px 7px;
  font-size:8px
}

html[data-wf-display-resolved="desktop"] .form-grid{
  gap:9px
}
html[data-wf-display-resolved="desktop"] .field{
  gap:4px
}
html[data-wf-display-resolved="desktop"] .field label{
  font-size:8px
}
html[data-wf-display-resolved="desktop"] .field input,
html[data-wf-display-resolved="desktop"] .field select,
html[data-wf-display-resolved="desktop"] .field textarea{
  min-height:38px;
  padding:8px 9px;
  border-radius:9px;
  font-size:11px
}
html[data-wf-display-resolved="desktop"] .field textarea{
  min-height:76px
}
html[data-wf-display-resolved="desktop"] .form-footer{
  gap:7px;
  margin-top:14px;
  padding-top:12px
}
html[data-wf-display-resolved="desktop"] .position-list{
  gap:7px
}
html[data-wf-display-resolved="desktop"] .position-row{
  gap:6px;
  padding:9px;
  border-radius:11px
}
html[data-wf-display-resolved="desktop"] .position-row input,
html[data-wf-display-resolved="desktop"] .position-row select{
  min-height:36px;
  padding:7px 8px
}
html[data-wf-display-resolved="desktop"] .remove-position{
  width:36px;height:36px
}

@media(max-width:1050px){
  html[data-wf-display-resolved="desktop"] .workspace{
    grid-template-columns:184px minmax(0,1fr)
  }
  html[data-wf-display-resolved="desktop"] .navigation{
    width:184px
  }
  html[data-wf-display-resolved="desktop"] .nav-button{
    font-size:10px
  }
}


/* ============================================================
   CF-V226T · S10 HANDYOPTIMIERUNG MIT ICON-NAVIGATION
   - echte Touch-Navigation unten
   - SVG-Icons bleiben am Handy sichtbar
   - kurze mobile Beschriftungen
   - kompakter Header und sichere PWA-Safe-Areas
   ============================================================ */
.s10-receipt-icon{width:24px;height:24px;display:block;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.loading-mark .s10-receipt-icon{width:30px;height:30px}
.process-mark .s10-receipt-icon{width:25px;height:25px}

html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] body{
  padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .topbar{
  min-height:62px!important;
  padding:8px 10px!important;
  gap:8px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .icon-button{
  width:40px!important;height:40px!important;border-radius:13px!important;font-size:20px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .brand{gap:9px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .brand-mark{
  width:40px!important;height:40px!important;flex-basis:40px!important;border-radius:13px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .brand-mark .s10-receipt-icon{width:22px;height:22px}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .brand h1{
  font-size:16px!important;line-height:1.08!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .brand small{
  display:block!important;font-size:7px!important;letter-spacing:.08em!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .profile-avatar{
  width:38px!important;height:38px!important;flex-basis:38px!important;border-radius:12px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .workspace{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  padding:10px 8px calc(94px + env(safe-area-inset-bottom,0px))!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .content{
  padding:0!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .navigation{
  position:fixed!important;
  left:8px!important;
  right:8px!important;
  top:auto!important;
  bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;
  z-index:75!important;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:4px!important;
  width:auto!important;
  max-width:none!important;
  height:64px!important;
  max-height:none!important;
  margin:0!important;
  padding:5px!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.13)!important;
  border-radius:19px!important;
  background:rgba(6,15,25,.94)!important;
  box-shadow:0 16px 46px rgba(0,0,0,.38)!important;
  backdrop-filter:blur(22px) saturate(145%)!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .nav-button{
  min-width:0!important;
  width:100%!important;
  min-height:54px!important;
  margin:0!important;
  padding:5px 2px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  border-radius:14px!important;
  font-size:9px!important;
  line-height:1!important;
  overflow:hidden!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .nav-button.active{
  background:linear-gradient(145deg,#efd992,var(--accent))!important;
  color:#152132!important;
  box-shadow:0 7px 18px rgba(var(--accent-rgb),.22)!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .nav-icon{
  display:grid!important;
  place-items:center!important;
  width:22px!important;
  height:22px!important;
  flex:0 0 22px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .nav-icon svg{
  display:block!important;
  width:21px!important;
  height:21px!important;
  stroke-width:1.9!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .nav-label{
  display:block!important;
  max-width:100%!important;
  overflow:hidden!important;
  color:inherit!important;
  font-size:0!important;
  font-weight:800!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .nav-label::after{
  content:attr(data-short)!important;
  font-size:9px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-head{
  margin:0 0 10px!important;
  padding:16px 15px!important;
  gap:10px!important;
  border-radius:19px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-kicker{
  margin-bottom:5px!important;font-size:8px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-head h2{
  font-size:25px!important;line-height:1.03!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-head p{
  margin-top:6px!important;font-size:12px!important;line-height:1.4!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .actions{
  gap:6px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .actions .button{
  min-height:40px!important;padding:8px 10px!important;border-radius:11px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi{
  min-height:94px!important;
  padding:13px 12px!important;
  border-radius:15px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi small{
  font-size:8px!important;line-height:1.25!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi strong{
  margin-top:8px!important;font-size:21px!important;line-height:1.04!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .panel{
  margin-top:9px!important;
  padding:10px!important;
  border-radius:16px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .panel h3{
  margin-bottom:10px!important;font-size:15px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .table-wrap{
  max-width:100%!important;
  overflow-x:auto!important;
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  border-radius:13px!important;
  scrollbar-width:thin!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .data-table{
  min-width:700px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .data-table th,
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .data-table td{
  padding:9px 10px!important;font-size:11px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .modal{
  align-items:end!important;
  padding:0!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .modal-card{
  width:100%!important;
  max-width:none!important;
  max-height:92dvh!important;
  margin:0!important;
  padding:21px 13px calc(18px + env(safe-area-inset-bottom,0px))!important;
  border-radius:22px 22px 0 0!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .form-footer{
  gap:6px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .form-footer .button{
  flex:1 1 130px!important;min-height:42px!important
}

@media(max-width:360px){
  html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .brand small{display:none!important}
  html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi-grid{grid-template-columns:1fr!important}
  html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .nav-label::after{font-size:8px!important}
}


/* ============================================================
   CF-V226V · S10 MOBILE FIT
   Kein seitliches Scrollen in den Hauptlisten. Desktoptabellen bleiben
   unverändert; auf kompakten Geräten werden touchfreundliche Karten genutzt.
   ============================================================ */
.s10-mobile-list{display:none}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"]{overflow-x:hidden!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] body{overflow-x:hidden!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-head{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;
  padding:10px 11px!important;margin-bottom:7px!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-kicker,
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-head p{display:none!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .page-head h2{font-size:20px!important;margin:0!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .actions{width:auto!important;justify-content:flex-end!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .actions .button{min-height:36px!important;padding:7px 9px!important;font-size:10px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi{min-height:68px!important;padding:8px 7px!important;border-radius:13px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi small{font-size:7px!important;letter-spacing:.045em!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi strong{margin-top:5px!important;font-size:15px!important;overflow-wrap:anywhere!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .panel{padding:8px!important;margin-top:7px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .panel h3{margin:2px 2px 7px!important;font-size:13px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-desktop-list{display:none!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-list{display:grid!important;gap:7px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-card{
  min-width:0!important;padding:10px!important;border:1px solid var(--line)!important;border-radius:14px!important;
  background:linear-gradient(155deg,rgba(255,255,255,.98),rgba(246,248,250,.98))!important;color:var(--ink)!important
}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-card-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-card-head>div{min-width:0!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-card-head small{display:block!important;color:var(--muted)!important;font-size:8px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.06em!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-card-head strong{display:block!important;margin-top:2px!important;font-size:14px!important;line-height:1.15!important;overflow-wrap:anywhere!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-primary{display:block!important;margin-top:7px!important;font-size:12px!important;overflow-wrap:anywhere!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-meta{display:flex!important;flex-wrap:wrap!important;gap:5px 9px!important;margin-top:7px!important;color:var(--muted)!important;font-size:10px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-actions{display:flex!important;gap:5px!important;margin-top:8px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .s10-mobile-actions .button{flex:1 1 auto!important;min-height:34px!important;padding:6px 8px!important;font-size:10px!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .table-wrap{overflow-x:hidden!important;max-width:100%!important}
html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .workspace{padding-top:7px!important}
@media(max-width:365px){
  html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-wf-display-module="S10"][data-wf-display-resolved="compact"] .brand-copy small{display:none!important}
}
