/* Palette Abendhimmel (CI-Nukleus §3): Sonnengelb, Nachtblau, Himmelblau abgedunkelt auf #2A74B8 für weiße Kleinschrift (4,9:1). */
:root{--mark:#FFD23A;--accent:#2A74B8;--accent-hover:#225F98;--accent-soft:#D6E8F7;--done:#00c875;--surface:#F4F8FC;--ink:#14202E;--white:#fff;--muted:#4A5868;--line:#E3EBF3;--field:#c3c6d4;--r-klein:4px;--radius:8px;--rail:204px}
*{box-sizing:border-box;scroll-margin-top:120px}body{margin:0;background:var(--white);color:var(--ink);font:14px/1.5 "Segoe UI",Arial,sans-serif}
[hidden]{display:none!important}::selection{background:var(--mark);color:var(--ink)}*{scrollbar-width:thin;scrollbar-color:#b9b9b9 white}
button,input,textarea,select{font:inherit;color:inherit}button{min-height:40px;padding:8px 13px;border:1px solid var(--field);border-radius:var(--radius);background:white;font-weight:600;cursor:pointer}
button:hover{background:var(--surface);border-color:#9da1b3}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:#fff}button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}input,textarea,select{width:100%;background:white;border:1px solid var(--field);border-radius:var(--radius);padding:9px 11px;caret-color:var(--ink);min-height:40px}
input::placeholder,textarea::placeholder{color:var(--muted)}textarea{min-height:90px;resize:vertical}label{display:block;font-size:12px;font-weight:600}label input,label textarea,label select{margin-top:6px}select{margin-top:6px}
p{margin:0 0 14px;max-width:70ch}h1,h2,h3{font-weight:600;line-height:1.3}h1{font-size:24px;letter-spacing:-.025em;margin:0 0 6px}h2{font-size:19px;margin:0 0 14px;letter-spacing:-.015em}h3{font-size:14px;margin:24px 0 10px}.small,small{font-size:12px;font-weight:400;color:var(--muted)}
body>header{height:64px;display:flex;align-items:center;gap:18px;padding:0 24px;border-bottom:1px solid var(--line);background:white;position:sticky;top:0;z-index:7}
.brand{width:156px;flex-shrink:0;padding-right:20px;border-right:1px solid var(--line)}.brand svg{width:126px;height:auto;display:block}.appname{font-size:17px;font-weight:600}.mode{margin-left:auto;font-size:12px;color:var(--muted)}.mode:before{content:"";display:inline-block;width:7px;height:7px;margin-right:8px;background:var(--done);border:0;border-radius:50%}
/* Gelb nur als erste Ebene: Abmelden, Markierungen, aktiver Menüpunkt. Arbeitsfarben bleiben Blau/Grün. */
#logout{font-size:12px;min-height:34px;background:var(--mark);border-color:var(--mark);color:var(--ink)}#logout:hover{border-color:var(--ink)}
#modules{position:fixed;top:64px;bottom:0;left:0;width:var(--rail);border-right:1px solid var(--line);padding:26px 12px;display:flex;flex-direction:column;gap:6px;background:white}
#modules .nav-title{font-size:12px;color:var(--muted);padding:0 12px 12px}
#modules button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border-color:transparent;font-weight:400;font-size:13px}
#modules button svg{width:17px;height:17px;flex-shrink:0}
#modules button[aria-pressed=true]{font-weight:600;border-color:transparent}#modules button[aria-pressed=true]{background:var(--surface);color:var(--ink)}#modules button[aria-pressed=true] svg{border-radius:var(--r-klein)}
#modules .nav-foot{margin-top:auto;padding:16px 12px 0;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
main{margin-left:var(--rail);padding:24px 28px 40px;min-height:calc(100vh - 108px)}body:has(#login:not([hidden])) main{margin-left:0}
.pagehead{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:22px}.pagehead p{font-size:12px;color:var(--muted);margin:0}
.workbench{display:grid;grid-template-columns:260px minmax(0,1fr);border-top:1px solid var(--line);min-height:calc(100vh - 200px)}
.workbench>aside{border-right:1px solid var(--line);min-width:0;padding:0 14px 0 0}
.listtools{padding:20px 0 14px}.listtools label{color:var(--muted);font-weight:400}.listtools>input{margin-top:6px}.listtools p{margin:8px 0 0}
.listbar{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:8px;font-size:12px;color:var(--muted)}.listbar button{border:0;font-size:12px;padding:6px;min-height:32px}
#offers,#customer-list{max-height:calc(100vh - 338px);overflow:auto;padding:2px}
.offer{display:block;width:100%;text-align:left;border:1px solid transparent;border-radius:var(--radius);padding:13px 11px;margin-bottom:6px;font-weight:400;background:white}
.offer:hover{background:var(--surface);border-color:transparent}.offer[aria-pressed=true]{background:#eef5fe;border-color:var(--accent-soft)}
.offer strong{display:block;margin:5px 0 8px;font-size:14px;font-weight:600;overflow-wrap:anywhere}.offer .meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 8px;font-size:12px;color:var(--muted)}.offer .money,.offer>span{font-size:12px;font-variant-numeric:tabular-nums}
#detail,.business-detail{min-width:0;padding:24px 0 30px 28px}.empty{padding:48px 18px;max-width:450px;color:var(--muted)}.empty h2{color:var(--ink)}
.detailhead{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.detailhead h2{font-size:24px;margin:8px 0 16px;overflow-wrap:anywhere}.detailhead button{flex-shrink:0}
.status{display:inline-block;font-size:12px;border:1px solid var(--line);border-radius:var(--r-klein);padding:3px 8px}
dl{display:grid;grid-template-columns:85px minmax(0,1fr);gap:5px 14px;margin:0 0 20px;font-size:12px}dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere}
.steps{display:flex;list-style:none;padding:0;margin:24px 0;gap:10px;counter-reset:step}.steps li{flex:1;border-top:2px solid var(--line);padding-top:10px;font-size:12px;color:var(--muted)}.steps li:before{counter-increment:step;content:counter(step);display:inline-grid;place-items:center;width:20px;height:20px;border:1px solid var(--line);border-radius:50%;margin-right:5px}.steps .done,.steps .current{border-color:var(--ink);color:var(--ink)}.steps .current{font-weight:600}.steps .current:before{background:var(--accent);border-color:var(--accent);color:#fff}
.document{padding-bottom:16px}.document h3:first-child{margin-top:0}.document p,.preserve{white-space:pre-wrap;overflow-wrap:anywhere}
.positions{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}.positions th{text-align:left;font-size:12px;color:var(--muted);font-weight:500}.positions th,.positions td{padding:12px 4px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}.positions th:first-child{width:46%}.positions td:nth-child(n+2),.positions th:nth-child(n+2){text-align:right;font-variant-numeric:tabular-nums}
.sum{text-align:right;margin:16px 0 6px;font-size:13px;max-width:none}.sumbar{display:flex;justify-content:space-between;align-items:center;gap:12px 20px;flex-wrap:wrap;margin-top:16px}.sumbar .sum{margin:0 0 0 auto}.sum-toggle{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:500;cursor:pointer}.sum-toggle input{width:18px;height:18px;min-height:18px;margin:0;accent-color:var(--accent)}.sumbar:has(input:not(:checked)) .sum{color:var(--muted)}.sumbar:has(input:not(:checked)) .sum strong{text-decoration:line-through}.sum-hidden{color:var(--muted)}.sum strong{font-size:21px;margin-left:20px;font-variant-numeric:tabular-nums}
.checks{padding:0;list-style:none}.checks li{padding:9px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;font-size:12px}
.next{margin:22px 0;border:1px solid var(--ink);border-radius:var(--radius);padding:20px 22px;background:white}.next h3{font-size:17px;margin:0 0 8px}.next p{color:var(--muted);font-size:13px}.next label{margin:16px 0;font-size:13px}.next input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0 8px 0 0;vertical-align:middle;accent-color:var(--ink)}.next button{margin-top:6px}
.history{padding:0;list-style:none;font-size:13px}.history li{padding:12px 0;border-bottom:1px solid var(--line)}.history small{display:block;margin-top:3px}details{border-top:1px solid var(--line);padding:10px 0;margin-top:10px}summary{cursor:pointer;min-height:40px;align-content:center;font-size:13px;font-weight:500}details>p{margin-top:10px}
code,pre{font-size:12px;overflow-wrap:anywhere;white-space:pre-wrap}#notice:not(:empty){border:1px solid var(--line);border-radius:var(--radius);padding:10px 14px;margin-bottom:18px;font-size:12px}#notice button{margin-left:8px}
.login{display:grid;grid-template-columns:1fr 1fr;gap:24px 70px;max-width:850px;margin:90px auto}.login h1{font-size:40px}.login>p{grid-column:1}.login form{grid-column:2;grid-row:1/3;align-self:center;padding-top:20px}.login button{width:100%;margin:16px 0}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.wide{grid-column:1/-1}#draft-form,#customer-form{max-width:900px;padding-top:8px}#draft-form h2{margin-top:28px}#draft-form>label{margin:22px 0}.item{display:grid;grid-template-columns:minmax(0,1fr) 80px 120px auto;gap:12px;align-items:end;margin-bottom:16px}.formfoot{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-top:20px;border-top:1px solid var(--line);font-size:12px}
#business form button,#link-customer button,#accept-order button{margin-top:14px}.business-detail>p{font-size:13px}.business-detail .detailhead h2{font-size:23px}.business-detail h3{margin-top:24px}
#link-customer{margin:0 0 20px}#link-customer h3{margin-top:0}
.order-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:20px;align-items:start}.order-row{min-width:0;border:1px solid var(--line);border-radius:var(--radius);padding:24px;background:white}.order-row .detailhead>div{min-width:0}.order-row .detailhead>strong{white-space:nowrap;font-variant-numeric:tabular-nums}.order-row .status{margin-bottom:16px}.order-row>ul{list-style:none;margin:8px 0 20px;padding:0}.order-row>ul li{padding:8px 0;border-bottom:1px solid var(--line)}.order-row>.preserve{font-size:12px;color:var(--muted)}.order-row>.preserve strong{color:var(--ink)}.order-row details{margin-top:20px}.order-row .order-actions{margin-top:20px}.order-row .order-actions button:first-child{background:var(--accent);border-color:var(--accent);color:#fff}.order-row .order-actions button:first-child:hover{background:var(--accent-hover);border-color:var(--accent-hover)}.order-list>.empty{grid-column:1/-1}.order-row .detailhead h2{font-size:20px;margin-top:0}.order-row .detailhead p{font-size:12px;color:var(--muted)}.order-actions{display:flex;gap:10px;flex-wrap:wrap}.order-row li{overflow-wrap:anywhere}
body>footer{margin-left:var(--rail);border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;padding:12px 28px;font-size:12px;color:var(--muted)}body:has(#login:not([hidden]))>footer{margin-left:0}
.skip{position:fixed;top:-100px;background:var(--accent);color:#fff;padding:12px}.skip:focus-visible{top:0;z-index:10}
@media(min-width:1600px){main{padding-left:36px;padding-right:36px}.workbench{grid-template-columns:290px minmax(0,1fr)}#detail,.business-detail{padding-left:40px;padding-right:20px}}
@media(max-width:1100px){:root{--rail:178px}.workbench{grid-template-columns:220px minmax(0,1fr)}main{padding:20px}.brand{width:130px;padding-right:12px}.brand svg{width:110px}#modules{padding:20px 8px}#modules button{font-size:12px;padding:8px}#detail,.business-detail{padding-left:20px}.steps{gap:6px}.steps li:before{display:none}}
@media(max-width:760px){body>header{position:sticky;height:auto;min-height:62px;padding:14px 16px;gap:12px;flex-wrap:wrap}.brand{width:110px;border:0;padding:0}.brand svg{width:110px}.appname{font-size:16px}.mode{order:4;flex-basis:100%;font-size:12px;margin:0}#logout{margin-left:auto}#modules{position:static;width:auto;display:flex;flex-direction:row;gap:4px;padding:8px 12px;border-right:0;border-bottom:1px solid var(--line)}#modules .nav-title,#modules .nav-foot{display:none}#modules button{flex:1;justify-content:center;font-size:12px;padding:8px 5px;min-height:44px;gap:5px}#modules button svg{display:none}
main{margin:0;padding:20px 16px 32px}.pagehead{align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:18px}h1{font-size:22px}.pagehead button{font-size:12px}
.workbench{grid-template-columns:1fr;min-height:0}.workbench>aside{padding:0;border-right:0;border-bottom:1px solid var(--line)}.listtools{padding:14px 0 8px}.listbar{margin-top:4px}#offers,#customer-list{max-height:180px;margin-bottom:12px}.offer{padding:10px}.offer strong{margin:3px 0 5px}#detail,.business-detail{padding:22px 0}.detailhead h2,.business-detail .detailhead h2{font-size:21px}.detailhead{gap:12px}.detailhead button{font-size:12px;padding:8px}.steps li{font-size:12px}.steps{gap:6px}
.next{padding:18px}.positions{font-size:12px}.positions th{font-size:12px}.positions th:first-child{width:40%}.sum strong{font-size:20px}
.formgrid{grid-template-columns:1fr}.item{grid-template-columns:1fr 1fr}.item label:first-child{grid-column:1/-1}.item button{grid-column:2}.formfoot{flex-direction:column;align-items:stretch}.login{display:block;margin:28px auto}.login h1{font-size:34px}.login form{margin-top:25px}
.order-row{padding:20px}.order-row .detailhead{flex-wrap:wrap}.order-actions button{min-height:44px}body>footer{margin-left:0;padding:12px 16px;flex-wrap:wrap}.empty{padding:28px 8px}summary{min-height:44px}button,input,select{min-height:44px}
}
@media(prefers-reduced-motion:no-preference){button{transition:border-color .15s ease-out}.next{animation:arrive .18s ease-out}@keyframes arrive{from{clip-path:inset(0 0 8% 0)}to{clip-path:inset(0)}}}

/* Kundenakte: Identität, Beziehung und Arbeitsstand vor technischen Details. */
.customer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.customer-identity{display:flex;align-items:center;gap:16px;min-width:0}
.customer-identity>div{min-width:0}
.customer-head h2{font-size:26px;margin:0 0 8px;overflow-wrap:anywhere}
.customer-head>button{flex-shrink:0}
.customer-avatar{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;border-radius:var(--radius);background:var(--accent-soft);color:var(--accent-hover);font-size:20px;font-weight:600}
.customer-summary{display:flex;flex-wrap:wrap;gap:8px 24px;padding:12px 0 16px;margin-bottom:12px;border-bottom:1px solid #b9b9b9;color:var(--muted);font-size:12px}
.customer-summary strong{color:var(--ink);font-weight:600}
.customer-summary>span:last-child{margin-left:auto}
.customer-columns{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin-bottom:16px}
.customer-columns>.customer-section+.customer-section{border-top:1px solid #b9b9b9;padding-top:12px;margin-top:4px}
.customer-section{min-width:0}
.business-detail .section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:4px;min-height:40px}
.business-detail .section-heading h3{font-size:15px;margin:0}
.text-action{border-color:transparent;padding:8px;font-size:12px}
.contact-list{list-style:none;padding:0;margin:0}
.contact-list li{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.contact-list li:first-child{padding-top:4px}
.contact-list li>div{min-width:0}
.contact-list strong{font-size:14px;overflow-wrap:anywhere}
.contact-avatar{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border:1px solid var(--line);border-radius:50%;font-size:12px;font-weight:600}
.contact-email{display:block;color:var(--muted);font-size:12px;margin-top:4px;overflow-wrap:anywhere}
.contact-add{border-top:0;margin-top:4px;padding-top:0}
.contact-add summary{font-size:12px;color:var(--muted)}
.contact-add .formgrid{grid-template-columns:1fr;gap:12px}
.customer-notes{font-size:13px;line-height:1.7;margin:0}
.customer-empty{padding:16px 0;color:var(--muted);font-size:13px}
.customer-empty strong{display:block;color:var(--ink);font-weight:500;margin-bottom:6px}
.customer-empty p{margin:0;max-width:48ch}
.customer-offers{border-top:1px solid #b9b9b9;padding-top:12px}
.section-count{font-size:12px;color:var(--muted);font-weight:400;margin-left:6px}
.customer-guidance{font-size:13px;color:var(--muted);margin:0 0 16px;max-width:65ch}
.customer-offer-list{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.customer-offer-row{display:flex;align-items:center;gap:16px;width:100%;border:0;border-radius:0;border-bottom:1px solid var(--line);padding:16px;text-align:left;font-weight:400}
.customer-offer-row:last-child{border-bottom:0}
.customer-offer-row:hover{background:var(--surface)}.customer-offer-row:hover .customer-offer-name strong{color:var(--accent)}
.customer-offer-row:focus-visible{outline-offset:-3px}
.offer-document{flex-shrink:0;width:24px;height:24px}
.offer-document svg{width:100%;height:100%}
.customer-offer-name{min-width:0;flex:1}
.customer-offer-name strong{display:block;font-size:14px}
.customer-offer-name>span{display:block;font-size:12px;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}
.customer-offer-amount{font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.offer-open{font-size:12px;color:var(--muted)}
.offer-empty{border:1px dashed var(--line);border-radius:var(--radius);padding:24px}
@media(max-width:1100px){.customer-columns{grid-template-columns:1fr}.customer-head h2{font-size:22px}.offer-open{display:none}}
@media(max-width:760px){
 .customer-head{flex-wrap:wrap}.customer-identity{gap:12px}.customer-avatar{width:44px;height:44px;font-size:16px}
 .customer-head h2{font-size:21px}.customer-summary{margin-bottom:16px;gap:8px 16px}
 .customer-columns{gap:0;margin-bottom:16px}.customer-offer-row{gap:12px;padding:14px 12px}
 .customer-offer-amount{font-size:13px}.customer-offers .section-heading{flex-wrap:wrap}
}
.list-toggle{display:none}@media(max-width:760px){.list-toggle{display:block;width:100%;text-align:left;margin:10px 0}.workbench>aside:not(.list-open) .listtools,.workbench>aside:not(.list-open) #offers,.workbench>aside:not(.list-open) #customer-list{display:none}}

/* Geschäftsverlauf: ein belegter Prozess je Angebot; offene Funktionen bleiben erkennbar. */
.customer-journey{padding:0;margin:0;border-top:1px solid var(--line)}
.customer-journey>summary{display:list-item;list-style-position:inside;padding:16px 8px;min-height:48px;overflow-wrap:anywhere}
.journey-summary>strong{font-size:15px}
.journey-summary>.small{display:block;margin:4px 0 0 18px;font-variant-numeric:tabular-nums}
.customer-journey>summary:hover{background:var(--paper,#f6f6f6)}
.customer-journey>summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.journey-body{padding:8px 8px 20px}
.customer-offers{padding-bottom:24px;border-bottom:1px solid var(--ink)}
.customer-contacts{padding-top:24px}
.customer-contacts .section-heading h3{font-size:18px}
.journey-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.journey-head h4{font-size:15px;margin:0 0 4px;font-weight:600;overflow-wrap:anywhere}
.journey-head>strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.journey-next{font-size:13px;margin:12px 0 16px}
.journey-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:16px 12px;list-style:none;padding:0;margin:0 0 16px}
.journey-steps li{display:flex;align-items:flex-start;gap:8px;min-width:0}
.journey-marker{display:grid;place-items:center;width:24px;height:24px;flex-shrink:0;border:1px solid #b9b9b9;border-radius:50%;font-size:12px}
.journey-steps strong{display:block;font-size:12px;font-weight:500}
.journey-steps small{display:block;margin-top:3px;font-size:12px}
.journey-steps .done .journey-marker{background:var(--ink);border-color:var(--ink);color:var(--white)}
.journey-steps .current .journey-marker{background:var(--accent);border-color:var(--accent)}
.journey-steps .current strong{font-weight:700}
.journey-steps .unavailable{color:var(--muted)}
.journey-steps .unavailable .journey-marker,.journey-steps .stopped .journey-marker{border-style:dashed}
.journey-actions{display:flex;gap:8px;flex-wrap:wrap}
.customer-journey details{margin-top:8px;padding-bottom:0}
@media(max-width:760px){.journey-steps{grid-template-columns:1fr 1fr;gap:16px 8px}.journey-steps li:last-child{grid-column:1/-1}.journey-head{gap:8px}}

/* Leistungsauswahl im bestehenden Angebotseditor. */
.service-list{border-top:1px solid var(--line)}.service-row{padding:14px 0;border-bottom:1px solid var(--line)}.service-choice{display:flex;align-items:center;gap:12px;font-size:14px;cursor:pointer}.service-choice input{width:20px;height:20px;min-height:20px;margin:0;flex-shrink:0;accent-color:var(--ink)}.service-choice>span{flex:1;min-width:0;overflow-wrap:anywhere}.service-choice strong{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.service-choice small{display:block}.service-row details{margin:4px 0 0 32px;padding:0;border:0}.service-row details p{font-size:13px}.service-terms{margin-top:16px}.catalog-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:16px 0 24px}.catalog-total{font-variant-numeric:tabular-nums}#service-picker{margin-bottom:24px}#service-catalog{max-width:900px}.item textarea{min-height:96px}@media(max-width:760px){#modules{flex-wrap:wrap}#modules button{flex:1 1 44%}.service-choice{font-size:13px}.catalog-actions button{width:100%}}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0 24px}.analytics{min-width:760px}.analytics th:first-child{width:24%}.analytics th:nth-child(2),.analytics td:nth-child(2){text-align:left}.analytics th:last-child,.analytics td:last-child{text-align:left;width:20%}.analytics small{color:var(--muted)}.outcome{margin-top:12px;font-weight:600}#close-offer{margin-top:16px}#close-offer label{display:grid;gap:4px;margin:8px 0}

/* Bereichsbaum und unabhängiges Ein-/Ausblenden des gesamten Menüs. */
#menu-toggle{width:44px;min-height:44px;padding:10px;flex-shrink:0}
#menu-toggle svg{display:block;width:22px;height:22px}
.nav-collapsed #menu-toggle svg path{transform:rotate(180deg);transform-origin:12px 12px}
body.nav-collapsed main,body.nav-collapsed>footer{margin-left:0}
#modules{overflow-y:auto}
/* Menügruppen; ihre Unterseiten liegen als Reiter über der Arbeitsfläche (#reiter). */
#modules .nav-title~.nav-title{margin-top:16px}
#reiter{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid var(--line);margin:0 0 22px}
#reiter[hidden]{display:none}
#reiter button{display:flex;align-items:center;gap:8px;border:0;border-bottom:3px solid transparent;border-radius:0;background:none;font-weight:500;font-size:13px;min-height:44px;padding:8px 14px}
#reiter button[hidden]{display:none}
#reiter button svg{width:16px;height:16px;flex-shrink:0}
#reiter button[aria-pressed=true]{border-bottom-color:var(--mark);font-weight:600;color:var(--ink)}
@media(max-width:760px){
 body>header{gap:8px}
 #modules{flex-direction:column;flex-wrap:nowrap;padding:8px 16px}
 #modules button{flex:none;justify-content:flex-start;text-align:left;font-size:13px;padding:8px 12px}
 #modules button svg{display:block}
 #modules .nav-title{display:block;padding:10px 12px 4px}
 #modules .nav-title~.nav-title{margin-top:6px}
 #reiter button{flex:1 1 0;justify-content:center;padding:8px 6px}
}

/* Kundenauswahl im Angebotseditor: Suche mit Liste, Plus für neue Kundenakte. */
.customer-pick{position:relative;min-width:0}.customer-pick>label{margin-bottom:6px}
.pick-row{display:flex;gap:8px}.pick-row input{flex:1;min-width:0}
#add-customer{flex-shrink:0;width:40px;padding:0;display:grid;place-items:center}#add-customer svg{width:18px;height:18px}
#customer-options{position:absolute;z-index:5;left:0;right:48px;margin:4px 0 0;padding:4px;list-style:none;background:white;border:1px solid var(--ink);border-radius:var(--radius);max-height:320px;overflow:auto;box-shadow:0 8px 24px rgb(0 0 0/.08)}
#customer-options li{padding:8px 10px;border-radius:var(--radius);cursor:pointer;display:flex;flex-direction:column;gap:2px;min-height:40px}
#customer-options li span{font-size:12px;color:var(--muted)}
#customer-options li[aria-selected=true],#customer-options li:hover{background:#f4f4f4}
#customer-options li[aria-disabled]{cursor:default;color:var(--muted)}#customer-options li[aria-disabled]:hover{background:none}
#customer-options .option-new{border-top:1px solid var(--line);margin-top:4px;border-radius:0 0 var(--radius) var(--radius)}#customer-options .option-new strong{font-weight:600}
#customer-options .option-empty{font-size:12px}
#customer-hint{display:block;margin-top:6px}#customer-hint[data-state=ok]:before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;background:var(--done);border:0;border-radius:50%}
#draft-customer[readonly]{background:#f7f7f7}
.pageactions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}

/* Seitenpanel (Flyover) für Kundenanlage und Import. */
dialog.flyover{position:fixed;inset:0 0 0 auto;margin:0;width:min(480px,100vw);max-width:100vw;height:100dvh;max-height:100dvh;padding:0;border:0;border-left:1px solid var(--ink);background:white;color:var(--ink);display:flex;flex-direction:column}
dialog.flyover:not([open]){display:none}
dialog.flyover::backdrop{background:rgb(15 15 15/.28)}
.flyover-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line)}.flyover-head h2{margin:0}
.flyover-close{width:40px;padding:0;font-size:22px;line-height:1;border-color:transparent}
.flyover-tabs{display:flex;gap:4px;padding:10px 22px 0;border-bottom:1px solid var(--line)}
.flyover-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;font-weight:500}.flyover-tabs button[aria-selected=true]{border-bottom-color:var(--accent);font-weight:600}
.flyover-body{flex:1;overflow:auto;padding:20px 22px}
.flyover-body label,.flyover-body fieldset{margin-bottom:16px}
.flyover-body fieldset{border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px 2px}.flyover-body legend{font-size:12px;font-weight:600;padding:0 4px}
.flyover-body input[type=file]{padding:8px}
.flyover-foot{display:flex;justify-content:flex-end;gap:10px;padding-top:12px;border-top:1px solid var(--line)}
.flyover-status:not(:empty){margin:0;padding:12px 22px;border-top:1px solid var(--line);font-size:12px}.flyover-status button{margin-left:8px}
.import-list,.import-warnings{list-style:none;padding:0;margin:16px 0;font-size:13px}
.import-list li{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.import-warnings li{padding:6px 10px;margin-bottom:4px;background:#fafafa;font-size:12px}
@media(max-width:760px){dialog.flyover{width:100vw;border-left:0}.flyover-head,.flyover-body{padding-left:16px;padding-right:16px}.flyover-tabs{padding:8px 16px 0}#customer-options{right:0}.pageactions{justify-content:stretch}.pageactions button{flex:1}}
@media(prefers-reduced-motion:no-preference){dialog.flyover[open]{animation:slide-in .18s ease-out}@keyframes slide-in{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}}

/* Record state and deliberate destructive actions use the existing workbench. */
.detailhead{flex-wrap:wrap}.detailhead>div:first-child{flex:1;min-width:180px}
.record-lifecycle{padding:0 0 18px;border-bottom:1px solid var(--line)}
.record-actions,.contact-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.contact-list li{flex-wrap:wrap}.contact-actions{width:100%;padding-left:44px}
.contact-actions button{font-size:12px}
.danger-action{color:#a32020}.danger-action:hover{border-color:#a32020;background:#fff5f5}
.record-steps{width:100%;list-style:none!important}
.order-row>.record-steps li{border-bottom:0}
@media(max-width:760px){.contact-actions{padding-left:0}.record-actions button{min-height:44px}.detailhead>div:first-child{flex-basis:100%}}

/* Kundenakte in Reitern; auf schmalen Bildschirmen seitlich wischbar statt umbrechend. */
.customer-tabs{display:flex;gap:4px;margin:0 0 16px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none;position:sticky;top:0;background:#fff;z-index:2}
.customer-tabs::-webkit-scrollbar{display:none}
.customer-tabs button{flex-shrink:0;border:0;border-radius:0;border-bottom:3px solid transparent;background:transparent;padding:10px 14px;min-height:44px;font-weight:500;white-space:nowrap}
.customer-tabs button[aria-selected=true]{border-bottom-color:var(--ink);font-weight:600}
.customer-tabs .section-count{margin-left:4px}
.customer-summary{margin-bottom:0;border-bottom:0}
.customer-tabpanel>.record-lifecycle{margin-bottom:12px}

/* Menüknopf sitzt im Menü; eingeklappt bleibt eine Symbolleiste (rail) mit Tooltips. */
#modules>#menu-toggle{align-self:flex-start;width:40px;min-height:40px;padding:8px;margin:0 0 6px 4px;border-color:transparent;justify-content:center}
#modules>#menu-toggle svg{width:20px;height:20px}
body.nav-collapsed{--rail:64px}
body.nav-collapsed main,body.nav-collapsed>footer{margin-left:var(--rail)}
body.nav-collapsed #modules{padding:18px 8px;overflow-x:hidden}
body.nav-collapsed #modules .nav-title,body.nav-collapsed #modules .nav-foot{display:none!important}
body.nav-collapsed #modules button{font-size:0;justify-content:center;padding:10px;gap:0}
body.nav-collapsed #modules>#menu-toggle{align-self:center;margin:0 0 6px}
@media(max-width:760px){
 #modules>#menu-toggle{margin:0 0 4px}
 body.nav-collapsed main,body.nav-collapsed>footer{margin-left:0}
 body.nav-collapsed #modules{padding:6px 16px}
 body.nav-collapsed #modules>:not(#menu-toggle){display:none!important}
 body.nav-collapsed #modules>#menu-toggle{align-self:flex-start}
}

/* Kunden: ohne Seitenkopf; Liste klappt nach der Auswahl ein, Aktionen hinter einem Knopf. */
.customer-bench{border-top:0;min-height:calc(100vh - 130px)}
.customer-bench.list-collapsed{grid-template-columns:minmax(0,1fr)}
.customer-bench.list-collapsed .business-detail{padding-left:0}
.customer-bench .listtools{padding-top:0}
.customer-bench #customer-list{max-height:calc(100vh - 210px)}
.list-back{display:inline-flex;align-items:center;gap:6px;border-color:transparent;padding:6px 10px 6px 4px;min-height:36px;font-size:12px;font-weight:500;color:var(--muted);margin:-8px 0 10px}
.list-back svg{width:18px;height:18px}.list-back:hover{color:var(--ink)}
.list-actions{position:relative;border:0;margin:0;padding:0}
.list-actions>summary{min-height:32px;padding:4px 8px;border:1px solid var(--field);border-radius:var(--radius);font-size:12px;font-weight:600;color:var(--ink);list-style:none}
.list-actions>summary::-webkit-details-marker{display:none}.list-actions>summary:after{content:" ▾"}
.list-actions-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:5;display:flex;flex-direction:column;min-width:200px;padding:4px;background:white;border:1px solid var(--ink);border-radius:var(--radius);box-shadow:0 8px 24px rgb(0 0 0/.08)}
.list-actions-menu button{border-color:transparent;text-align:left;font-weight:500;font-size:13px;color:var(--ink)}
.customer-bench .business-detail{padding-top:16px}
@media(max-width:760px){.customer-bench .business-detail{padding-top:16px}.customer-bench #customer-list{max-height:none}.list-back{min-height:44px}}
@media(max-width:760px){#customer-aside .listtools,#customer-aside #customer-list{display:block}}
/* Menügruppen auf- und zuklappen (ui.js); die offene Ansicht bleibt sichtbar. */
#modules button.nav-title{display:flex;justify-content:space-between;gap:8px;font-size:12px;font-weight:400;color:var(--muted);background:none;border-color:transparent;min-height:32px}
#modules button.nav-title:hover{color:var(--ink)}
#modules .nav-pfeil{width:14px!important;height:14px!important;transition:transform .15s}
#modules .nav-title[aria-expanded=false] .nav-pfeil{transform:rotate(-90deg)}
body:not(.nav-collapsed) #modules button.zu:not([aria-pressed=true]){display:none}
/* Gruppen lesbar machen: Überschrift als Kapitel, Trennlinie davor, Einträge eng darunter und eingerückt. */
#modules{gap:2px}
#modules button.nav-title{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);min-height:30px;padding:6px 12px}
#modules button.nav-title~button.nav-title{margin-top:12px;padding-top:16px;border-top:1px solid var(--line);border-radius:0;min-height:44px}
#modules button[data-view]{min-height:36px;padding:7px 12px 7px 20px}
body.nav-collapsed #modules button[data-view]{padding:10px}
@media(max-width:760px){#modules button[data-view]{min-height:44px;padding-left:20px}#modules button.nav-title~button.nav-title{margin-top:8px;padding-top:12px}}
/* Feinmaß nach der Codex-Desktop-App (Vorlage André, 23.11.2026): graue Seitenleiste, 32-px-Zeilen, 8-px-Rundung,
   neutrale Auswahl statt Kanten, Gruppennamen grau in Satzschreibung, Haarlinien statt Rahmen. Mobil bleiben 44 px. */
:root{--ink:#0d0d0d;--muted:#8f8f8f;--muted-2:#5d5d5d;--line:#ececec;--field:rgb(0 0 0/.12);--surface:#f9f9f9;--hover:#ececec;--radius:8px}
body{font:14px/1.45 "Segoe UI",system-ui,sans-serif}
button{min-height:32px;padding:5px 12px;border-color:var(--field);font-weight:500}button:hover{background:var(--hover);border-color:var(--field)}
button.primary{background:var(--ink);border-color:var(--ink);border-radius:var(--r-klein);padding:5px 16px}button.primary:hover{background:#333;border-color:#333}
input,textarea,select{min-height:34px;padding:6px 10px;border-color:var(--field)}input:focus,textarea:focus,select:focus{border-color:#b4b4b4}
/* Seitenleiste */
#modules{background:var(--surface);border-right:0;padding:16px 8px;gap:0}
#modules button{font-size:14px;font-weight:400;color:var(--ink);border-color:transparent;background:transparent}
#modules button svg{width:16px;height:16px;color:var(--muted-2)}
#modules button[data-view]{min-height:32px;padding:6px 8px;gap:8px;border-radius:var(--radius)}
#modules button[data-view]:hover{background:var(--hover)}
#modules button[aria-pressed=true],#modules button[aria-pressed=true]{background:var(--hover);box-shadow:none;font-weight:400}
#modules button.nav-title{justify-content:flex-start;gap:4px;font-size:14px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--muted);min-height:32px;padding:6px 8px;border-radius:var(--radius)}
#modules button.nav-title:hover{background:none;color:var(--muted-2)}
#modules button.nav-title~button.nav-title{margin-top:14px;padding-top:6px;border-top:0;border-radius:var(--radius);min-height:32px}
#modules .nav-foot{border-top:0;padding:16px 8px 0}
#modules>#menu-toggle{min-height:32px}
/* Reiter */
#reiter{gap:2px;border-bottom-color:var(--line)}
#reiter button{font-weight:400;min-height:36px;padding:6px 10px;border-bottom-width:2px;color:var(--muted-2)}
#reiter button:hover{background:none;color:var(--ink)}
#reiter button[aria-pressed=true]{border-bottom-color:var(--ink);font-weight:500}
/* Listen: Zeilen statt Karten, neutrale Auswahl */
.workbench,.workbench>aside{border-color:var(--line)}
.offer{padding:7px 8px;margin-bottom:2px;border:0;border-radius:var(--radius)}
.offer:hover{background:var(--surface)}.offer[aria-pressed=true]{background:var(--hover);border:0}
.offer strong{margin:2px 0 3px;font-weight:500}.offer .meta,.offer .money,.offer>span{color:var(--muted)}
#customer-options li[aria-selected=true],#customer-options li:hover{background:var(--hover)}
.contact-list li,.history li,.checks li,.import-list li,.order-row>ul li,.service-row{border-bottom-color:var(--line)}
.contact-list li{padding:10px 0}.history li{padding:10px 0}
/* Tabellen: leiser Kopf, Haarlinie, Zeile hebt sich beim Darüberfahren */
.positions th,.analytics th{font-size:12px;font-weight:400;color:var(--muted)}
.positions th,.positions td{padding:9px 8px;border-bottom-color:var(--line)}
.positions tbody tr:hover td{background:var(--surface)}
.order-row{border-color:var(--line);border-radius:var(--radius);padding:20px}
.status{border-color:var(--line);border-radius:var(--radius);color:var(--muted-2)}
details{border-top-color:var(--line)}
@media(max-width:760px){#modules{padding:8px 12px}#modules button[data-view],#modules button.nav-title{min-height:44px}button{min-height:40px}}

/* Rahmen nach der Codex-Desktop-App (Vorlage André, 23.11.2026): grauer Rahmen mit schmaler Kopfzeile und Symbolleiste,
   darin ein weißes, umrandetes Fenster mit Bereichsmenü und Inhalt. Das Fenster ist eine feste Maske über der Seite
   (body::after, Schatten in Rahmengrau), damit die Seite normal scrollt und Bildschirmfotos ganz bleiben. */
:root{--rahmen:#f3f3f3;--kopfh:40px;--leiste:52px;--rand:8px}
body{padding-top:var(--oben)}
body>header{position:fixed;top:var(--banner);left:0;right:0;height:var(--kopfh);padding:0 12px 0 10px;gap:10px;background:var(--rahmen);border-bottom:0;z-index:10}
body>header .appname{font-size:13px;font-weight:500;color:var(--muted-2)}
body>header .mode{font-size:12px}
body>header #meldungen{order:1;margin-left:auto;gap:2px}body>header #chat-open{order:2}body>header #neu-laden{order:3}
/* Kopf-Knöpfe ohne Kreis: nur das Zeichen, Fläche erst beim Darüberfahren */
body>header #menu-toggle,body>header #chat-open,body>header #ml-blase,body>header #neu-laden{width:30px;height:30px;min-height:30px;padding:0;border:0;border-radius:var(--radius);background:transparent;display:grid;place-items:center}
body>header #menu-toggle svg,body>header #chat-open svg,body>header #ml-blase svg,body>header #neu-laden svg{width:18px;height:18px}
body>header #menu-toggle:hover,body>header #neu-laden:hover,body>header #chat-open:hover,body>header #ml-blase:hover,body>header #chat-open[aria-expanded=true],body>header #ml-blase[aria-expanded=true]{background:var(--hover);border:0}
body>header .ml-stufen{border:0;background:none;padding:0}body>header .ml-stufe{min-height:30px;padding:4px 7px;border-radius:var(--radius)}body>header .ml-stufe:hover{background:var(--hover)}body>header .ml-zahl{top:-3px;right:-5px;box-shadow:0 0 0 2px var(--rahmen)}
/* Symbolleiste links: Bereiche oben, Einstellungen und Profil unten */
#leiste{position:fixed;top:var(--oben);left:0;bottom:0;width:var(--leiste);display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px 0 12px;background:var(--rahmen);z-index:10}
#leiste>button{width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:var(--radius);background:transparent;display:grid;place-items:center;color:var(--muted-2)}
#leiste>button svg{width:20px;height:20px}
#leiste>button:hover{background:var(--hover)}
#leiste>button[aria-pressed=true]{background:#e3e3e3;color:var(--ink)}
.leiste-luft{flex:1}
.profil{position:relative;margin-top:6px}
#profil{width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:50%;background:transparent;display:grid;place-items:center}
#profil:hover{background:var(--hover)}
.profil-kreis{width:26px;height:26px;border-radius:50%;background:var(--mark);color:var(--ink);font-size:12px;font-weight:600;display:grid;place-items:center}
#profil-menue{position:absolute;left:calc(100% + 6px);bottom:0;width:240px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 28px rgb(0 0 0/.12);z-index:11}
#profil-menue p{margin:0 0 10px;display:flex;flex-direction:column;gap:2px}
#profil-menue button{width:100%;justify-content:flex-start;text-align:left;background:transparent;border:0;border-radius:var(--radius);font-size:14px;font-weight:400;min-height:32px}
#profil-menue button:hover{background:var(--hover)}
/* Weißes Fenster */
body::after{content:"";position:fixed;top:var(--oben);left:var(--leiste);right:var(--rand);bottom:var(--rand);border:1px solid #e5e5e5;border-radius:var(--radius);box-shadow:0 0 0 100vmax var(--rahmen);pointer-events:none;z-index:9}
body:has(#login:not([hidden]))::after{display:none}
#modules{top:var(--oben);left:var(--leiste);bottom:var(--rand);width:var(--rail);padding:12px 8px;background:#fff;border-right:1px solid var(--line);z-index:3}
/* body> erhöht den Rang: chat.css lädt später und setzte den Griff sonst 52 px ins Menü statt an seine Kante. */
body>#rail-zug{top:var(--oben);bottom:var(--rand);left:calc(var(--leiste) + var(--rail) - 6px);z-index:8}
main{margin-left:calc(var(--leiste) + var(--rail));margin-right:var(--rand);min-height:calc(100vh - var(--kopfh) - 52px)}
body>footer{margin-left:calc(var(--leiste) + var(--rail));margin-right:var(--rand);margin-bottom:var(--rand)}
body:has(#login:not([hidden])) main,body:has(#login:not([hidden]))>footer{margin-left:0;margin-right:0}
body.nav-collapsed{--rail:0px}
body.nav-collapsed #modules{display:none!important}
body.nav-collapsed main,body.nav-collapsed>footer{margin-left:var(--leiste)}
/* Bereichsmenü: Logo als Startknopf, darunter nur der gewählte Bereich */
#modules button.home{min-height:40px;padding:6px 8px;margin:0 0 10px;justify-content:flex-start;border-radius:var(--radius)}
#modules button.home svg{width:96px;height:auto;color:var(--ink)}
#modules button.home:hover{background:var(--hover)}
.nav-gruppe{display:none;flex-direction:column;gap:0}
body[data-bereich=heute] .nav-gruppe[data-bereich=heute],body[data-bereich=verkauf] .nav-gruppe[data-bereich=verkauf],
body[data-bereich=geld] .nav-gruppe[data-bereich=geld],body[data-bereich=einstellungen] .nav-gruppe[data-bereich=einstellungen]{display:flex}
#modules .nav-gruppe .nav-title{margin:0;padding:6px 8px;font-size:13px;color:var(--muted)}
/* Seitenfenster rechts sitzen im weißen Fenster */
body #chat{top:calc(var(--oben) + 1px);right:calc(var(--rand) + 1px);bottom:calc(var(--rand) + 1px)}
body .fp-panel{top:calc(var(--oben) + 1px);right:calc(var(--rand) + 1px);bottom:calc(var(--rand) + 1px)}
/* Seitenblatt: Termin, Aufgabe, Akte ansehen, ohne die Seite zu verlassen. Kein Abdunkeln; der Chat bleibt frei und bedienbar. */
.seitenblatt{position:fixed;top:calc(var(--oben) + 1px);right:calc(var(--rand) + 1px);bottom:calc(var(--rand) + 1px);width:min(440px,calc(100vw - var(--leiste) - var(--rand) - 2px));background:#fff;color:var(--ink);box-shadow:-12px 0 32px rgba(50,51,56,.14);display:flex;flex-direction:column;z-index:5}
.seitenblatt:focus{outline:none}
.seitenblatt>.flyover-body{min-height:0}
@media(prefers-reduced-motion:no-preference){.seitenblatt{animation:slide-in .18s ease-out}}
@media(min-width:1280px){body.chat-open main,body.chat-open>footer{margin-right:calc(var(--chat-w,420px) + var(--rand))}body.chat-open .fp-panel,body.chat-open .seitenblatt{right:calc(var(--chat-w,420px) + var(--rand))}}
/* Handy: kein Rahmen; Kopf, Bereichszeile, Unterpunkte als Zeilen übereinander */
@media(max-width:760px){
 body{padding-top:var(--banner)}
 body::after{display:none}
 body>header{position:sticky;top:var(--banner);height:auto;min-height:48px;flex-wrap:nowrap;padding:6px 8px}
 body>header #meldungen{flex-basis:auto;margin-left:auto;justify-content:flex-end;min-width:0}
 body>header .ml-stufe{min-height:44px;padding:4px 5px}
 body>header #menu-toggle,body>header #chat-open,body>header #ml-blase,body>header #neu-laden{width:44px;height:44px}
 body>header .appname{display:none}
 #leiste{position:static;width:auto;height:auto;flex-direction:row;padding:0 8px 6px;gap:2px}
 #leiste>button,#profil{width:44px;height:44px}
 .profil{margin:0}
 #profil-menue{left:auto;right:0;bottom:auto;top:calc(100% + 6px)}
 #modules{position:static;width:auto;border-right:0;border-bottom:1px solid var(--line);padding:6px 8px}
 #modules button.home{display:none}
 .nav-gruppe{flex-direction:row;flex-wrap:wrap;gap:2px}
 #modules .nav-gruppe .nav-title{display:none}
 #modules .nav-gruppe button[data-view]{width:auto;min-height:44px}
 main,body>footer,body.nav-collapsed main,body.nav-collapsed>footer{margin:0}
 body #chat{top:0;right:0;bottom:0}
 .seitenblatt{top:0;right:0;bottom:0;width:100vw;z-index:19}
}

/* Statusbanner (Vorlage André, 23.11.2026): fährt oben ein und schiebt Kopf, Leiste und Fenster mit herunter;
   ui.js setzt --banner auf die Höhe des Inhalts. Gelb für Hinweise, Rot für Fehler; Schließen per ×. */
@property --banner{syntax:"<length>";inherits:true;initial-value:0px}
:root{--banner:0px;--oben:calc(var(--kopfh) + var(--banner));transition:--banner .28s ease}
#banner{position:fixed;top:0;left:0;right:0;height:var(--banner);overflow:hidden;z-index:12;display:flex;align-items:flex-start;background:var(--mark);color:var(--ink)}
#banner[data-art=fehler]{background:#fde3e1;color:#7a1a14}
#banner #notice,#banner #notice:not(:empty){flex:1;margin:0;border:0;border-radius:0;padding:9px 8px 9px 44px;font-size:13px;line-height:1.45;text-align:center}
#banner #notice button{min-height:26px;padding:2px 10px;margin-left:6px;font-size:12px}
#banner-zu{flex:none;width:30px;height:30px;min-height:30px;margin:4px 8px 4px 0;padding:0;border:0;border-radius:var(--radius);background:transparent;color:inherit;display:grid;place-items:center}
#banner-zu:hover{background:rgb(0 0 0/.08)}#banner-zu svg{width:16px;height:16px}
#banner:not(.offen){visibility:hidden;transition:visibility 0s .28s}
/* Zählergruppe im Kopf als eigene Abteilung: Strich links und rechts */
body>header .ml-stufen{border:0;border-left:1px solid #d9d9d9;border-right:1px solid #d9d9d9;border-radius:0;padding:0 8px;margin:0 6px}
#neu-laden.dreht svg{animation:kontor-dreh .8s linear infinite}
@keyframes kontor-dreh{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){:root{transition:none}#neu-laden.dreht svg{animation:none;opacity:.5}}
@media(max-width:760px){#banner #notice,#banner #notice:not(:empty){padding:12px 4px 12px 16px;text-align:left}#banner-zu{width:44px;height:44px;margin:0 4px 0 0}body>header #neu-laden{width:44px;height:44px}}

/* Favoriten, Rechtsklick-Menü, ziehbare Breiten (Vorlage André, 23.11.2026).
   Grundmenü klappt nicht mehr ein; #rail-zug und .liste-zug ändern die Breite, die Kante färbt sich beim Ziehen. */
body[data-bereich=favoriten] .nav-gruppe[data-bereich=favoriten]{display:flex}
#favoriten-liste{display:flex;flex-direction:column}
#favoriten-liste button{display:flex;align-items:center;gap:10px;width:100%;min-height:32px;padding:6px 8px;border:0;border-radius:var(--radius);background:transparent;font-size:14px;font-weight:400;text-align:left;color:var(--ink)}
#favoriten-liste button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#favoriten-liste button svg{width:16px;height:16px;flex:none;color:var(--muted-2)}
#favoriten-liste button:hover{background:var(--hover)}#favoriten-liste button[aria-pressed=true]{background:#ececec}
.fav-leer{margin:4px 8px;font-size:13px;line-height:1.5;color:var(--muted)}
#kontext-menue{position:fixed;z-index:20;min-width:220px;max-width:300px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 10px 30px rgb(0 0 0/.14);display:grid;gap:1px}
#kontext-menue[hidden]{display:none}
#kontext-menue .km-titel{margin:0;padding:6px 10px 4px;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#kontext-menue button{display:flex;align-items:center;gap:10px;min-height:32px;padding:6px 10px;border:0;border-radius:var(--radius);background:transparent;font-size:14px;font-weight:400;text-align:left;color:var(--ink)}
#kontext-menue button:hover,#kontext-menue button:focus-visible{background:var(--hover);outline:0}
#kontext-menue svg{width:16px;height:16px;flex:none;color:var(--muted-2)}
#kontext-menue [data-k=weg] svg,#kontext-menue [data-k=dazu]:hover svg{color:#c9a800}
#kontext-menue hr{border:0;border-top:1px solid var(--line);margin:4px 6px}
/* Listen: Breite aus --liste, Griff an der rechten Kante der Liste */
@media(min-width:761px){
 .workbench,.customer-bench{grid-template-columns:var(--liste,260px) minmax(0,1fr)}
 .workbench>aside{position:relative}
 .liste-zug{position:absolute;top:0;bottom:0;right:-6px;width:12px;cursor:col-resize;touch-action:none;z-index:2}
 /* Ruhend ein grauer Griff wie am Chat (sichtbar, Vorlage André); beim Zeigen und Ziehen die blaue Kante über die volle Höhe. */
 .liste-zug:before,#rail-zug:before{content:"";position:absolute;left:4px;top:50%;width:4px;height:44px;margin-top:-22px;border-radius:2px;background:#c3c6d4;transition:opacity .15s ease-out}
 .liste-zug:after,#rail-zug:after{content:"";position:absolute;left:5px;top:0;bottom:0;width:2px;height:auto;margin:0;border-radius:1px;background:var(--accent);opacity:0;transition:opacity .15s ease-out}
 .liste-zug:hover:after,.liste-zug:focus-visible:after,#rail-zug:hover:after,#rail-zug:focus-visible:after,body.resizing .liste-zug:after,body.resizing>#rail-zug:after{opacity:1}
 .liste-zug:hover:before,.liste-zug:focus-visible:before,#rail-zug:hover:before,#rail-zug:focus-visible:before,body.resizing .liste-zug:before,body.resizing>#rail-zug:before{opacity:0}
}
@media(max-width:760px){.liste-zug{display:none}}
@media(max-width:760px){#favoriten-liste{flex-direction:row;flex-wrap:wrap;gap:2px}#favoriten-liste button{width:auto;min-height:44px}.fav-leer{margin:8px}}

/* Ein Hauptmenü (Vorlage André, 23.11.2026): Symbolleiste und Bereichsmenü sind eins. Das Menü sitzt grau im Rahmen wie bei Codex,
   das weiße Fenster beginnt an seiner Kante (--leiste folgt --rail). #menu-toggle klappt es ganz ein; jede Gruppe klappt einzeln (.zu). */
#leiste{display:none!important}
body{--leiste:var(--rail)}
body.nav-collapsed{--rail:0px;--leiste:var(--rand)}
#modules{top:var(--oben);left:0;bottom:0;width:var(--rail);padding:4px 8px 10px;background:var(--rahmen);border-right:0;z-index:10;overflow-y:auto;overflow-x:hidden}
main,body>footer,body.nav-collapsed main,body.nav-collapsed>footer{margin-left:var(--leiste)}
body>#rail-zug{top:var(--oben);bottom:var(--rand);left:calc(var(--rail) - 6px);z-index:11}
body.nav-collapsed>#rail-zug{display:none}
body>header #menu-toggle{order:-1;flex:none}
#modules button.home{margin:0 0 4px}
.nav-gruppe,body[data-bereich] .nav-gruppe{display:flex;flex-direction:column;margin-top:8px}
#modules .nav-gruppe>button.nav-title{display:flex;align-items:center;gap:8px;width:100%;margin:0;min-height:32px;padding:6px 8px;border:0;border-radius:var(--radius);background:transparent;font-size:14px;font-weight:500;color:var(--ink)}
#modules .nav-gruppe>button.nav-title:hover{background:var(--hover);color:var(--ink)}
#modules .nav-gruppe>button.nav-title>span{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#modules .nav-gruppe>button.nav-title>svg{width:16px;height:16px;flex:none;color:var(--muted-2)}
#modules .nav-gruppe>button.nav-title>.nav-pfeil{width:14px!important;height:14px!important;opacity:0;transition:transform .15s,opacity .15s}
#modules .nav-gruppe>button.nav-title:hover>.nav-pfeil,#modules .nav-gruppe>button.nav-title:focus-visible>.nav-pfeil,#modules .nav-gruppe.zu>button.nav-title>.nav-pfeil{opacity:1}
#modules .nav-gruppe.zu>button.nav-title>.nav-pfeil{transform:rotate(-90deg)}
#modules .nav-gruppe>button[data-view],#favoriten-liste button{padding-left:32px}
#modules .nav-gruppe.zu>button[data-view]:not([aria-pressed=true]),#modules .nav-gruppe.zu>#favoriten-liste{display:none}
.nav-gruppe[data-bereich=einstellungen]{margin-top:auto;padding-top:12px}
.fav-leer{margin:2px 8px 2px 32px;font-size:12px}
/* Profil-Badge ganz unten im Menü, Menü öffnet nach oben */
#modules>.profil{margin-top:6px;position:relative}
#modules #profil{width:100%;height:auto;min-height:36px;padding:4px 6px;border-radius:var(--radius);display:flex;align-items:center;justify-content:flex-start;gap:8px;font-size:14px;font-weight:400}
#modules #profil:hover{background:var(--hover)}
#modules #profil-menue{left:0;right:auto;bottom:calc(100% + 6px);top:auto}
@media(max-width:760px){
 #modules{position:static;width:auto;padding:6px 8px;background:var(--rahmen);border-bottom:1px solid var(--line)}
 #modules button.home{display:none}
 .nav-gruppe,body[data-bereich] .nav-gruppe{flex-direction:column;flex-wrap:nowrap;margin-top:4px}
 #modules .nav-gruppe>button.nav-title{min-height:44px}
 #modules .nav-gruppe>button.nav-title>.nav-pfeil{opacity:1}
 #modules .nav-gruppe button[data-view],#favoriten-liste button{width:100%;min-height:44px}
 #favoriten-liste{flex-direction:column}
 .nav-gruppe[data-bereich=einstellungen]{margin-top:4px;padding-top:0}
 #modules #profil{min-height:44px}
 main,body>footer,body.nav-collapsed main,body.nav-collapsed>footer{margin:0}
}
/* Die eine Blase (tooltip) der ganzen Seite, gesteuert in ui.js; ersetzt die Browser-Tooltips. */
#tipp{position:fixed;z-index:1000;max-width:280px;padding:6px 10px;border-radius:var(--radius);background:var(--ink);color:#fff;font-size:12px;line-height:1.4;pointer-events:none;box-shadow:0 2px 8px rgb(0 0 0/.12)}
#tipp[hidden]{display:none}
.info-tipp{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--hover);color:var(--muted-2);font:600 10px/1 inherit;font-style:normal;cursor:help;user-select:none}
.info-tipp:hover{background:var(--ink);color:#fff}
.text-action{border-radius:var(--radius)}
.login-fehler{margin:0 0 12px;padding:10px 12px;border-radius:8px;background:#fde3e1;color:#7a1a14;font-size:14px;overflow-wrap:anywhere}
