body{background:#f3f6f2}header{padding:24px 5%;font-size:1.1rem;box-shadow:0 1px 8px #19323815}header strong:before{content:'◈';color:#d8ed9f;margin-right:12px}main{max-width:1380px;padding:24px 36px}#workspace{background:transparent;border:none;padding:0}#workspace>.heading h1{font-size:1rem;color:#607779;font-weight:500;margin:0}#identity{font-size:.85rem;color:#607779}#workspace-nav{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #dce4dd;padding:12px 0;margin-bottom:32px}#workspace-nav button{background:transparent;border:none;color:#607779}#workspace-nav .selected{background:#193238;color:white}#management .title{margin-bottom:28px}.title h1{font-size:2rem;margin:8px 0}.title p{color:#607779;margin:0;font-size:.9rem}.eyebrow{font-size:.65rem;font-weight:750;letter-spacing:.15em;color:#216559}#invite-user,#save-user{background:#193238;color:white;border-color:#193238}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:24px}.metrics>div{background:white;border:1px solid #dce4dd;border-radius:12px;padding:24px;display:grid;gap:18px}.metrics small{color:#607779}.metrics strong{font-size:2rem;font-weight:600}.user-panel{background:white;padding:24px;border-radius:14px;margin:0}.user-row{display:grid;grid-template-columns:minmax(170px,1.4fr) minmax(140px,1fr) minmax(160px,1.2fr) auto;gap:18px;align-items:center;padding:22px 0;border-top:1px solid #dce4dd}.user-row:first-child{margin-top:20px}.user-row small{display:block;color:#607779;font-size:.8rem;margin-top:6px;overflow-wrap:anywhere}.person{display:flex;gap:12px;align-items:center;min-width:0}.person>div{min-width:0}.avatar{display:inline-flex;justify-content:center;align-items:center;width:38px;height:38px;flex-shrink:0;background:#edf2e8;border-radius:10px;color:#216559;font-weight:650}.user-row .badge{display:inline-block;background:#e9f0df;color:#486b31;padding:4px 8px;border-radius:6px;font-size:.75rem}.user-row .badge.invited{background:#fcf0d6;color:#8b650c}.user-row .badge.blocked{background:#fbe8e3;color:#a42525}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.actions button{font-size:.8rem;padding:8px 10px;background:white}.muted,#users-summary{color:#607779;font-size:.85rem;line-height:1.6}.user-row .actions{max-width:260px}dialog{border:1px solid #dce4dd;border-radius:16px;padding:28px;max-width:560px;width:calc(100% - 28px);max-height:90vh;color:#193238}dialog::backdrop{background:#19323880}fieldset{border:1px solid #dce4dd;border-radius:8px;padding:15px;margin-bottom:18px}fieldset label{flex-direction:row;align-items:center;gap:10px;margin:10px 0}fieldset input{width:auto}.quiet{border:none;background:transparent;font-size:1.5rem;padding:5px 10px}#dialog-message{color:#a42525}#invite-dialog p{line-height:1.6;font-size:.9rem}#preview{background:#f5f8f0;padding:18px;margin-top:25px}#preview p{font-size:.8rem;line-height:1.6}#preview-accounts{display:grid;gap:8px}#preview-accounts button{background:white;text-align:left}#accept{max-width:480px;margin:40px auto}.grid input,.grid select{width:100%}input,select{background:white;color:#193238}button:focus-visible,a:focus-visible{outline:3px solid #54733a;outline-offset:2px}@media(max-width:1100px){.user-row{grid-template-columns:1fr 1fr}}@media(max-width:640px){main{padding:16px}.metrics{grid-template-columns:1fr;gap:10px}.metrics>div{padding:16px;gap:8px}.metrics strong{font-size:1.7rem}.heading{flex-wrap:wrap;align-items:start}.user-row{grid-template-columns:1fr;gap:12px}.grid{grid-template-columns:1fr}.user-panel{padding:18px}dialog{padding:20px}.title h1{font-size:1.7rem}}
/* Desktop-Navigation links; Besitzerlogs am unteren Ende der Menüleiste. */
.nav-heading{font-size:.65rem;letter-spacing:.15em;color:#91b8b1;margin:0 0 20px}
.logs-access{font-size:.8rem;color:#607779;background:#fff;border-color:#dce4dd}
.dashboard-metrics button{display:grid;text-align:left;gap:16px;background:white;border:1px solid #dce4dd;border-radius:12px;padding:24px}
.dashboard-metrics button span{font-size:.8rem;color:#216559}
.customer-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px}
.customer-card{margin:0}.customer-card p{color:#607779;font-size:.85rem}.customer-card small{display:block;line-height:1.8;color:#607779}
.analytics-row{display:flex;flex-wrap:wrap;gap:18px;padding:20px 0;border-bottom:1px solid #dce4dd;font-size:.85rem}.analytics-row strong{flex-basis:100%}.analytics-row span{color:#607779}
@media(min-width:1024px){
  body.signed-in header{margin-left:260px}
  body.signed-in main{margin:0 0 0 260px;max-width:none;padding:28px 40px 40px}
  #workspace-nav{position:fixed;inset:0 auto 0 0;width:260px;margin:0;padding:40px 22px;display:flex;flex-direction:column;flex-wrap:nowrap;gap:10px;background:#193238;border:0;z-index:10;box-shadow:3px 0 16px #1932380c;overflow-y:auto}
  #workspace-nav .nav-heading{margin:0 0 20px;font-size:.65rem}
  #workspace-nav button{text-align:left;color:#dce9e5;padding:14px 16px;border-radius:9px;background:transparent;flex-shrink:0}
  #workspace-nav button:hover{background:#28474b}
  #workspace-nav button.selected{background:#d8ed9f;color:#193238;font-weight:650}
  #workspace-nav .logs-access{margin-top:auto;border-top:1px solid #496264;border-radius:0;padding-top:20px;font-size:.8rem}
  #workspace-nav .logs-access.selected{background:#d8ed9f;color:#193238;border-radius:9px}
}
@media(max-width:1023px){
  #workspace{display:flex;flex-direction:column}
  #workspace-nav{position:static;width:auto;background:transparent}
  #workspace-nav .nav-heading{display:none}
  #workspace-nav .logs-access{margin-left:auto}
}
/* Kopfzeile mit Portalmarke und persönlichem Kontomenü. */
header.portal-header{position:sticky;top:0;z-index:30;height:80px;padding:14px 28px;align-items:center;flex-wrap:nowrap;background:white;gap:18px}
body.signed-in header.portal-header{margin-left:0}
.portal-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:#193238;min-width:0;flex-shrink:0}
.portal-header .portal-brand strong:before{content:none}
.logo-placeholder{display:inline-flex;align-items:center;justify-content:center;width:40px;height:44px;background:#d8ed9f;color:#193238;border-radius:10px;font-size:1.6rem}
#guest-label{font-size:.8rem;color:#607779}
#account-menu{position:relative;margin:0;min-width:0;max-width:55%}
#account-menu summary{list-style:none;display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid #dce4dd;border-radius:9px;cursor:pointer;font-size:.85rem}
#account-menu summary::-webkit-details-marker{display:none}
#account-menu summary:focus-visible{outline:3px solid #54733a;outline-offset:3px}
#account-menu[open] summary{background:#f3f6f2}
#account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#193238}
#account-menu .account-avatar{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;border-radius:50%;background:#e9f0df;color:#355c49;font-weight:650;font-size:.75rem}
#account-menu .account-chevron{color:#607779}
.account-dropdown{position:absolute;right:0;top:calc(100% + 10px);width:220px;max-width:calc(100vw - 28px);padding:8px;background:white;border:1px solid #dce4dd;border-radius:10px;box-shadow:0 10px 30px #19323820;display:grid;gap:4px}
.account-dropdown button{background:transparent;border:none;text-align:left;padding:12px;font-size:.85rem}
.account-dropdown button:hover{background:#eef3e9}
.account-dropdown #logout{border-top:1px solid #dce4dd;border-radius:0;color:#a42525}
#account-details{display:grid;grid-template-columns:100px 1fr;gap:14px;font-size:.9rem}#account-details dt{color:#607779}#account-details dd{margin:0;overflow-wrap:anywhere}
@media(min-width:1024px){#workspace-nav{top:80px;padding-top:28px}}
@media(max-width:640px){header.portal-header{padding:12px 14px;gap:10px}.portal-brand{gap:8px}.portal-brand strong{font-size:.95rem}.logo-placeholder{width:32px;height:36px;font-size:1.3rem}#account-menu{max-width:52%}#account-menu summary{gap:6px;padding:5px 7px}#account-menu .account-avatar{display:none}#guest-label{font-size:.7rem}}
/* Kundenübersicht und Anlageformular. */
#owner-tools,#save-customer{background:#193238;color:white;border-color:#193238}
.customer-panel{padding:24px}.customer-panel>.grid .actions{margin-bottom:16px;justify-content:flex-end}
.table-scroll{overflow-x:auto;max-width:100%}
.customer-table{width:100%;border-collapse:collapse;text-align:left;font-size:.85rem}
.customer-table th{color:#607779;font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;background:#f5f8f3;font-weight:600;white-space:nowrap}
.customer-table th,.customer-table td{padding:18px 14px;border-bottom:1px solid #dce4dd;vertical-align:top}
.customer-table td{min-width:100px;max-width:260px;overflow-wrap:anywhere}.customer-table td:nth-child(2){font-weight:650;min-width:160px}.customer-table td:nth-child(3){min-width:190px}
.customer-table small{display:block;color:#607779;margin-top:6px;line-height:1.4}
.customer-table tbody tr:hover{background:#f8faf6}
#customer-dialog{max-width:760px}#customer-dialog .address-grid{grid-template-columns:3fr 1fr}#customer-dialog input,#customer-dialog select{width:100%}
#customer-dialog .actions{justify-content:flex-end}#customer-form-message{color:#a42525}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:640px){#customer-dialog .address-grid{grid-template-columns:1fr}.customer-panel{padding:16px}.customer-panel>.grid .actions{justify-content:flex-start}}
/* Getrennte Orts- und Ländervorwahlen in der Kundenmaske. */
.phone-fields{display:grid;grid-template-columns:minmax(90px,1fr) minmax(0,2fr);gap:12px;min-width:0}
#customer-area-hint,.mobile-fields{grid-column:1/-1}
#customer-area-hint{margin:0 0 12px;font-size:.8rem}
#customer-dialog .phone-fields label{min-width:0}
@media(max-width:640px){.phone-fields{grid-template-columns:minmax(85px,1fr) minmax(0,2fr)}}
/* Kundenmaske: Beschriftungen oberhalb der Felder; eigene Raster statt Checkbox-Layout. */
#customer-dialog{width:min(760px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;padding:28px}
#customer-form label{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;min-width:0;line-height:1.4;font-size:.85rem}
#customer-form input,#customer-form select{display:block;width:100%;min-width:0;height:44px;padding:10px 12px;font-size:.9rem;line-height:normal}
#customer-form .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
#customer-form .customer-primary-fields{margin:20px 0}
#customer-form fieldset{min-width:0;margin:0 0 20px;padding:16px}
#customer-form legend{padding:0 6px;font-size:.85rem;font-weight:600}
#customer-form .address-grid{grid-template-columns:minmax(0,3fr) minmax(100px,1fr);margin-bottom:16px}
#customer-form .customer-address-fields{grid-template-columns:minmax(0,1.3fr) minmax(100px,.8fr) minmax(0,1.4fr)}
#customer-form .customer-contact-fields{margin-bottom:16px}
#customer-form .phone-fields{grid-template-columns:140px minmax(0,1fr);align-items:start;gap:16px}
#customer-form .mobile-fields{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);margin-top:16px}
#customer-area-hint{margin:8px 0 0;line-height:1.5}
#customer-area-hint:empty,#customer-form-message:empty{display:none}
#customer-form .actions{gap:10px;justify-content:flex-end}
#customer-form .actions button{min-height:42px;padding:10px 16px}
@media(max-width:640px){
  #customer-dialog{padding:20px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
  #customer-form .grid,#customer-form .address-grid,#customer-form .customer-address-fields{grid-template-columns:minmax(0,1fr)}
  #customer-form .phone-fields{grid-template-columns:100px minmax(0,1fr);gap:12px}
  #customer-form .mobile-fields{grid-template-columns:minmax(0,1fr)}
  #customer-form fieldset{padding:14px}
}
/* Adresssuche: Vorschläge über dem Adressraster, standardmäßig deaktiviert. */
.customer-address-lookup{position:relative;margin-bottom:20px}
#customer-form .customer-address-lookup>label{margin-bottom:7px}
#customer-address-results{position:absolute;top:72px;left:0;right:0;z-index:5;background:white;border:1px solid #bdcbc3;border-radius:8px;box-shadow:0 8px 22px #19323820;max-height:220px;overflow-y:auto}
#customer-address-results [role=option]{padding:12px 14px;font-size:.85rem;line-height:1.5;cursor:pointer;border-bottom:1px solid #edf1eb;overflow-wrap:anywhere}
#customer-address-results [role=option]:last-child{border-bottom:0}
#customer-address-results [role=option]:hover,#customer-address-results [aria-selected=true]{background:#eef4df}
#customer-address-status{margin:8px 0 4px;line-height:1.5}#customer-address-status:empty{display:none}
.address-attribution{display:block;margin-top:7px;font-size:.7rem;color:#607779}.address-attribution a{color:inherit}
#customer-form input:disabled{background:#f3f6f2;color:#607779}
/* Individuelle Tabellen und Kundendetails. */
.table-toolbar{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:10px 0 20px}.table-toolbar label{margin:0;min-width:180px}.table-toolbar>small{margin-left:auto;color:#607779}
.column-tools{display:flex;align-items:center;gap:4px}.column-tools button{border:0;background:transparent;padding:4px;color:#607779;font-size:.75rem;white-space:nowrap}.column-tools button:first-child{font-weight:650}
.configurable-table td{font-size:.85rem}.configurable-table th{padding:12px 10px}.configurable-table .table-link{color:#216559;background:none;border:0;padding:0;font-weight:650;text-align:left;text-decoration:underline;text-underline-offset:3px}
.table-actions .actions{min-width:160px}.table-actions button{white-space:nowrap}
#table-view-dialog{max-width:650px}.table-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.table-checks label{display:flex;flex-direction:row;align-items:center;margin:0;padding:6px;gap:10px}.table-checks input{width:18px;height:18px;flex-shrink:0}
#table-filter-values{grid-template-columns:1fr;max-height:260px;overflow-y:auto}.table-checks span{overflow-wrap:anywhere}.table-checks input{accent-color:#216559}
#table-view-message,#customer-site-message{color:#a42525}#save-table-view{background:#193238;color:white}#table-filter-form fieldset{margin-top:16px}
#customer-detail>.title{margin-top:24px}.customer-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0}.customer-tabs button{background:white}.customer-tabs button.selected{background:#193238;color:white;border-color:#193238}
.back-button{background:transparent;border:0;color:#216559;padding:0}.customer-data-grid{display:grid;grid-template-columns:minmax(130px,1fr) minmax(0,2fr);gap:14px 24px;margin:24px 0 32px}.customer-data-grid dt{color:#607779}.customer-data-grid dd{margin:0;overflow-wrap:anywhere}
#customer-users-panel .heading,#customer-data-panel .heading{align-items:center;margin-bottom:20px}#customer-users-panel .heading button,#edit-customer,#customer-add-site{background:#193238;color:white}
#customer-site-form button[type=submit]{background:#193238;color:white}
@media(max-width:640px){.table-toolbar{align-items:stretch;gap:12px}.table-toolbar label{width:100%}.table-toolbar>small{margin-left:0;width:100%}.table-checks{grid-template-columns:1fr}.customer-data-grid{grid-template-columns:minmax(0,1fr);gap:6px}.customer-data-grid dd{margin-bottom:12px}}
/* Kundenmaske: Beschriftungen oberhalb der Felder; eigene Raster statt Checkbox-Layout. */
#customer-site-dialog{width:min(760px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;padding:28px}
#customer-site-form label{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;min-width:0;line-height:1.4;font-size:.85rem}
#customer-site-form input,#customer-site-form select{display:block;width:100%;min-width:0;height:44px;padding:10px 12px;font-size:.9rem;line-height:normal}
#customer-site-form .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
#customer-site-form .site-primary-fields{margin:20px 0}
#customer-site-form fieldset{min-width:0;margin:0 0 20px;padding:16px}
#customer-site-form legend{padding:0 6px;font-size:.85rem;font-weight:600}
#customer-site-form .address-grid{grid-template-columns:minmax(0,3fr) minmax(100px,1fr);margin-bottom:16px}
#customer-site-form .site-address-fields{grid-template-columns:minmax(0,1.3fr) minmax(100px,.8fr) minmax(0,1.4fr)}
#customer-site-form .site-contact-fields{margin-bottom:16px}
#customer-site-form .phone-fields{grid-template-columns:140px minmax(0,1fr);align-items:start;gap:16px}
#customer-site-form .mobile-fields{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);margin-top:16px}
#site-area-hint{margin:8px 0 0;line-height:1.5}
#site-area-hint:empty,#customer-site-form-message:empty{display:none}
#customer-site-form .actions{gap:10px;justify-content:flex-end}
#customer-site-form .actions button{min-height:42px;padding:10px 16px}
@media(max-width:640px){
  #customer-site-dialog{padding:20px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
  #customer-site-form .grid,#customer-site-form .address-grid,#customer-site-form .site-address-fields{grid-template-columns:minmax(0,1fr)}
  #customer-site-form .phone-fields{grid-template-columns:100px minmax(0,1fr);gap:12px}
  #customer-site-form .mobile-fields{grid-template-columns:minmax(0,1fr)}
  #customer-site-form fieldset{padding:14px}
}

.site-address-lookup{position:relative;margin-bottom:20px}
#customer-site-form .site-address-lookup>label{margin-bottom:7px}
#site-address-results{position:absolute;top:72px;left:0;right:0;z-index:5;background:white;border:1px solid #bdcbc3;border-radius:8px;box-shadow:0 8px 22px #19323820;max-height:220px;overflow-y:auto}
#site-address-results [role=option]{padding:12px 14px;font-size:.85rem;line-height:1.5;cursor:pointer;border-bottom:1px solid #edf1eb;overflow-wrap:anywhere}
#site-address-results [role=option]:hover,#site-address-results [aria-selected=true]{background:#eef4df}
#site-address-status{margin:8px 0 4px;line-height:1.5}#site-address-status:empty{display:none}
#site-form-message,#site-group-message{color:#a42525}
#customer-sites-panel .heading,#site-data-panel .heading,#site-groups-panel .heading{align-items:center;margin-bottom:20px}
#customer-add-site,#edit-site,#site-add-group,#save-site,#site-group-form button[type=submit]{background:#193238;color:white}
#site-detail>.title{margin-top:24px}#site-groups-list p{padding:16px;border:1px solid #dce4dd;border-radius:8px;background:white}
