:root{--bg:#f4f6f8;--panel:#fff;--text:#17202a;--muted:#6b7280;--line:#e5e7eb;--accent:#2563eb;--warning:#b45309}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--text)}
.layout{display:grid;grid-template-columns:220px 1fr;min-height:100vh}aside{background:#111827;color:#fff;padding:24px 14px}.brand{font-size:21px;font-weight:800;padding:8px 12px 28px}.brand span{font-weight:500;color:#93c5fd}nav{display:grid;gap:5px}nav a{color:#d1d5db;text-decoration:none;padding:11px 12px;border-radius:8px}nav a:hover,nav a.active{background:#1f2937;color:#fff}
main{padding:32px;max-width:1400px;width:100%}header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}h1{margin:0 0 6px;font-size:30px}h2{margin-top:0}header p{margin:0;color:var(--muted)}.button{display:inline-block;border:0;background:var(--accent);color:#fff;text-decoration:none;padding:10px 15px;border-radius:8px;font-weight:700;cursor:pointer}.button.secondary{background:#e5e7eb;color:#111827;padding:7px 11px}.month{display:inline-block;margin:0 12px}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}.stat{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px}.stat small{display:block;color:var(--muted)}.stat strong{display:block;font-size:28px;margin-top:5px}.stat.warning strong{color:var(--warning)}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:20px}.row{display:flex;justify-content:space-between;gap:15px;padding:14px 0;border-top:1px solid var(--line)}.row span,.muted{display:block;color:var(--muted);font-size:13px;margin-top:3px}.date{text-align:right}.date b{display:block}.date span{color:var(--muted);font-size:12px}
table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:12px;text-transform:uppercase;color:var(--muted)}
.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.formgrid input,.formgrid select{width:100%;padding:11px;border:1px solid #d1d5db;border-radius:7px;background:#fff}.formgrid label{font-size:13px;color:var(--muted)}.formgrid label input{display:block;margin-top:5px}.formgrid button{width:max-content}
.calendar{padding:0;overflow:hidden}.week,.days{display:grid;grid-template-columns:repeat(7,1fr)}.week{background:#f9fafb;border-bottom:1px solid var(--line)}.week b{padding:12px;font-size:12px;color:var(--muted)}.day{min-height:125px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px}.day>span{font-weight:700;font-size:13px}.day.empty{background:#fafafa}.event{font-size:11px;background:#eff6ff;border-left:3px solid var(--accent);padding:5px;margin-top:7px;border-radius:3px}
@media(max-width:850px){.layout{grid-template-columns:1fr}aside{padding:10px 12px}nav{grid-template-columns:repeat(4,1fr)}nav a{font-size:12px;text-align:center}main{padding:18px}.stats,.grid{grid-template-columns:1fr}.formgrid{grid-template-columns:1fr}.day{min-height:90px}.event{font-size:10px}}

.userbox{margin-top:35px;padding:12px;border-top:1px solid #374151;color:#e5e7eb;font-size:13px}.userbox small,.userbox a{display:block;color:#9ca3af;margin-top:5px}.userbox a{text-decoration:none}
.login-page{min-height:100vh;display:grid;place-items:center;background:#111827}.login-card{width:min(400px,calc(100% - 32px));background:#fff;padding:30px;border-radius:14px;box-shadow:0 20px 50px #0003}.login-card .brand{color:#111827;padding:0 0 25px}.login-card h1{font-size:25px}.login-card label{display:block;font-size:13px;color:#6b7280;margin-bottom:15px}.login-card input{display:block;width:100%;padding:12px;margin-top:5px;border:1px solid #d1d5db;border-radius:7px}.login-card .button{width:100%;margin-top:8px}.error{background:#fef2f2;color:#991b1b;padding:10px;border-radius:7px;margin-bottom:15px;font-size:13px}
.tree-node{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding-top:11px;padding-bottom:11px}.tree-icon{width:25px}.tree-count{margin-left:auto;color:var(--muted);font-size:12px}.full{grid-column:1/-1}.checks{display:flex;gap:12px;flex-wrap:wrap;margin-top:7px}.checks label{color:#374151;background:#f9fafb;border:1px solid var(--line);padding:8px;border-radius:7px}

/* Modern login */
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 10%,#334155 0,#111827 38%,#0b1120 100%)}
.login-shell{width:min(940px,100%);display:grid;grid-template-columns:1.05fr .95fr;min-height:570px;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 30px 80px #0006}
.login-brand-panel{position:relative;padding:56px 48px;color:#fff;background:linear-gradient(145deg,#1d4ed8,#1e3a8a 58%,#172554);display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.login-brand-panel:after{content:"";position:absolute;width:330px;height:330px;border:70px solid #ffffff12;border-radius:50%;right:-130px;bottom:-150px}
.login-brand-panel .brand{position:relative;z-index:1}.login-brand-panel .brand.large{font-size:32px;padding:20px 0 10px}.login-brand-panel p{position:relative;z-index:1;color:#dbeafe;line-height:1.6;max-width:380px;margin:0 0 30px}.login-features{position:relative;z-index:1;display:grid;gap:13px;color:#e0ecff;font-size:14px}
.login-logo{width:54px;height:54px;border-radius:16px;background:#fff;color:#1d4ed8;display:grid;place-items:center;font-weight:900;font-size:26px;box-shadow:0 10px 25px #0002}.login-brand-panel .login-logo{background:#ffffff18;color:#fff;border:1px solid #ffffff35}
.login-card{width:auto;align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:52px 48px;border-radius:0;box-shadow:none;background:#fff}.login-heading{margin-bottom:26px}.login-heading h1{font-size:30px;margin:6px 0}.login-heading p{color:var(--muted);margin:0;font-size:14px}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:var(--accent)}
.login-field{display:block;margin-bottom:18px;color:#374151;font-size:13px;font-weight:700}.input-wrap{display:flex;align-items:center;gap:9px;margin-top:7px;border:1px solid #d1d5db;border-radius:11px;padding:0 12px;background:#f9fafb;transition:.2s}.input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px #2563eb18;background:#fff}.input-wrap input{border:0!important;outline:0;width:100%;padding:13px 2px;background:transparent;font-size:14px}.input-wrap>span{opacity:.65}.login-button{width:100%;padding:13px 16px;border-radius:11px;display:flex;justify-content:center;align-items:center;gap:12px;font-size:14px;box-shadow:0 8px 18px #2563eb35}.login-button span{font-size:20px;line-height:12px}.login-footer{text-align:center;color:#9ca3af;font-size:11px;margin-top:24px}.mobile-brand{display:none}.login-card .error{border:1px solid #fecaca}
@media(max-width:760px){.login-shell{grid-template-columns:1fr;min-height:auto;border-radius:20px}.login-brand-panel{display:none}.login-card{padding:34px 26px}.mobile-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.mobile-brand .login-logo{width:45px;height:45px;border-radius:13px;font-size:21px}.mobile-brand .brand{padding:0;font-size:20px}.login-page{padding:14px}}
.category-extra{border:1px solid rgba(80,100,130,.18);border-radius:16px;padding:18px;margin-top:8px;background:rgba(245,248,252,.8)}
.extra-title{font-weight:800;font-size:1rem;margin-bottom:14px}.nested{margin-top:0}.nested input{min-width:0}
/* 4-Box inspired visual language: clean cards, box motif, generous whitespace */
:root{--accent:#1769e0;--accent-dark:#0e4da8;--bg:#f5f8fb;--text:#17212b;--line:#dfe7ef}
.box-logo{height:58px;display:flex;align-items:center;gap:6px;padding:0 12px;margin-bottom:8px;font-size:20px;letter-spacing:.04em}.box-logo i{width:25px;height:25px;border:2px solid #93c5fd;display:block;position:relative}.box-logo i:after{content:"";position:absolute;left:5px;top:5px;width:11px;height:11px;border:1px solid #60a5fa}.box-logo strong:last-child{font-weight:400;color:#bfdbfe}.eyebrow{color:var(--accent);font-weight:800;letter-spacing:.12em}.panel{box-shadow:0 8px 28px rgba(23,33,43,.045)}.button{background:var(--accent)}.button:hover{background:var(--accent-dark)}.metric-highlight{display:flex;align-items:baseline;gap:12px;margin-top:20px;padding:22px;border-radius:14px;background:#eef5ff}.metric-highlight strong{font-size:30px;color:var(--accent-dark)}.metric-highlight span{color:var(--muted)}.notice{margin-top:15px;padding:13px 15px;border-radius:10px;background:#f7fafc;border:1px dashed #cbd5e1;color:var(--muted)}.measurement-chart{height:190px;display:flex;align-items:flex-end;gap:12px;padding:20px 10px 8px;border-bottom:1px solid var(--line);overflow-x:auto}.chart-point{min-width:55px;height:160px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.chart-point .bar{width:26px;background:linear-gradient(180deg,#60a5fa,#1769e0);border-radius:7px 7px 2px 2px}.chart-point span{font-size:10px;color:var(--muted)}.chart-point b{font-size:10px}.stat{box-shadow:0 6px 20px rgba(23,33,43,.035)}
.tree-node a{display:flex;align-items:center;gap:10px;width:100%;color:inherit;text-decoration:none}.clickable:hover{background:#f4f8fc}.table-link{color:var(--accent);text-decoration:none}.searchbar{display:flex;gap:10px;margin-bottom:18px}.searchbar input{flex:1;padding:12px;border:1px solid #d1d9e2;border-radius:10px}.contract-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.contract-tabs a,.report-nav a{padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);text-decoration:none}.contract-tabs a:hover,.report-nav a:hover{border-color:var(--accent);color:var(--accent)}.detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.detail-grid div{padding:16px;background:#f7fafc;border:1px solid var(--line);border-radius:12px}.detail-grid small{display:block;color:var(--muted);margin-bottom:5px}.report-nav{display:flex;gap:8px;flex-wrap:wrap}.done{opacity:.55}.panel textarea{width:100%;min-height:90px;padding:11px;border:1px solid #d1d5db;border-radius:8px}.price-list{margin-bottom:10px}@media(max-width:900px){.detail-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.detail-grid{grid-template-columns:1fr}.searchbar{flex-direction:column}}
@media print{aside,.button,.report-nav,.searchbar,.contract-tabs,form{display:none!important}.layout{display:block}main{padding:0}.panel{box-shadow:none;border:0}}

.comparison-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:14px}.comparison-grid>div{padding:16px;border:1px solid #dfe7ef;border-radius:12px;background:#f8fafc}.comparison-grid small{display:block;color:#667085;margin-bottom:6px}.comparison-grid strong{display:block;font-size:1.15rem}@media(max-width:800px){.comparison-grid{grid-template-columns:1fr}}

.status-badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:.82rem;font-weight:700;border:1px solid #d9e2ec}
.status-active{background:#eef8f1}.status-terminated{background:#fff0f0}.status-future{background:#eef4ff}
.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.actions form{margin:0}.button.danger{background:#b42318;color:#fff;border-color:#b42318}

.table-wrap{overflow-x:auto}.button.small{padding:7px 10px;font-size:.88rem}.panel-head{display:flex;justify-content:space-between;gap:12px;align-items:center}

.category-picker{position:relative}
.category-picker>select{margin-top:8px}
.category-results{position:absolute;z-index:30;left:0;right:0;top:70px;max-height:320px;overflow:auto;background:#fff;border:1px solid #d9e2ec;border-radius:12px;box-shadow:0 12px 32px rgba(15,23,42,.14);padding:6px}
.category-result{display:block;width:100%;border:0;background:transparent;text-align:left;padding:10px 12px;border-radius:8px;cursor:pointer}
.category-result:hover,.category-result:focus{background:#f1f5f9}
.category-profile{margin-top:8px;padding:16px;border:1px solid #dfe7ef;border-radius:12px;background:#f8fafc}

.category-empty{padding:10px 12px;color:#64748b;font-size:.92rem}

.empty-state{padding:22px;border:1px dashed #cbd5e1;border-radius:12px;color:#64748b;background:#f8fafc}.field-hint{font-size:.86rem;color:#64748b;margin-top:5px}

.customer-access-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:16px 0}.access-card{display:flex;gap:10px;align-items:center;padding:12px;border:1px solid #dfe7ef;border-radius:10px;background:#f8fafc}

.compact-panel{padding:18px}.compact-form label{font-size:.88rem}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px}
.compact-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.compact-row>label{flex:1;min-width:260px}
.provider-preview{flex:2;min-width:260px;padding:9px 12px;border:1px solid #dfe7ef;border-radius:9px;background:#f8fafc;font-size:.86rem}
.provider-preview span{display:block}.provider-picker{margin:10px 0 14px}
#category_search,input,select,textarea{min-height:38px}.category-profile{padding:12px 14px;margin-top:10px}.category-profile h3{margin:0 0 8px;font-size:1rem}
@media(max-width:900px){.form-grid.three{grid-template-columns:1fr 1fr}}@media(max-width:600px){.form-grid.three{grid-template-columns:1fr}}

.access-card span{display:flex;flex-direction:column}.access-card small{color:#64748b;font-size:.78rem;margin-top:2px}

.provider-contract-box{margin:10px 0 16px;padding:12px 14px;border:1px solid #dfe7ef;border-radius:12px;background:#fff}
.inline-provider-fields{margin-top:12px;padding-top:12px;border-top:1px solid #e5e7eb}
.inline-provider-fields h3{margin:0 0 10px;font-size:1rem}
.inline-provider-fields[hidden]{display:none!important}

/* V11.6 – strukturierte Navigation */
nav .nav-group{margin:0 0 18px}
nav .nav-label{padding:0 14px 6px;font-size:.68rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;opacity:.55}
nav .nav-group a{display:block;margin:2px 6px;padding:10px 12px;border-radius:9px;text-decoration:none;transition:.15s ease}
nav .nav-group a.active{background:rgba(255,255,255,.12);font-weight:700}

/* V11.6 – Anbieterformular */
.provider-form-panel{padding:0;overflow:hidden}
.section-heading{padding:22px 24px 18px;border-bottom:1px solid #e7edf3}
.section-heading h2{margin:3px 0 5px}.section-heading p{margin:0;color:#64748b}
.provider-form{padding:0 24px 22px}
.provider-form-section{padding:18px 0;border-bottom:1px solid #edf1f5}
.provider-form-section:last-of-type{border-bottom:0}
.provider-form-section h3{margin:0 0 12px;font-size:.9rem;color:#334155}
.provider-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px}
.provider-grid .span-2{grid-column:span 2}
.provider-grid.address-grid{grid-template-columns:2fr .65fr .75fr 1.6fr}
.provider-form label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:650;color:#334155}
.provider-form input,.provider-form textarea{width:100%;box-sizing:border-box}
.provider-form textarea{min-height:86px}
.form-actions{display:flex;gap:10px;padding-top:18px}

/* V11.6 – Anbieter-Suche bei Vertragsanlage */
.provider-search-wrap{position:relative;margin-bottom:8px}
.provider-search-wrap input{width:100%}
.provider-suggestions{position:absolute;z-index:50;top:calc(100% + 4px);left:0;right:0;background:#fff;border:1px solid #dce4ec;border-radius:10px;box-shadow:0 12px 30px rgba(15,23,42,.12);overflow:hidden;max-height:320px;overflow-y:auto}
.provider-suggestion{display:flex;width:100%;border:0;border-bottom:1px solid #edf1f5;background:#fff;padding:10px 12px;text-align:left;flex-direction:column;gap:2px;cursor:pointer}
.provider-suggestion:hover{background:#f7f9fc}.provider-suggestion:last-child{border-bottom:0}
.provider-suggestion strong{font-size:.88rem}.provider-suggestion small{font-size:.76rem;color:#64748b}
.provider-suggestion.empty{cursor:default;color:#64748b}
@media(max-width:900px){.provider-grid,.provider-grid.address-grid{grid-template-columns:1fr 1fr}.provider-grid .span-2{grid-column:span 2}}
@media(max-width:600px){.provider-grid,.provider-grid.address-grid{grid-template-columns:1fr}.provider-grid .span-2{grid-column:auto}}

.provider-list-search{min-width:260px}.provider-list-search input{width:100%}
tr.provider-list-row[hidden]{display:none}
@media(max-width:700px){.provider-list-search{width:100%;min-width:0}.panel-head{align-items:stretch;gap:12px;flex-direction:column}}

/* V11.8 – identische Seitenleiste auf allen Seiten */
.layout{grid-template-columns:240px minmax(0,1fr)!important}
.app-sidebar{width:240px;box-sizing:border-box;min-height:100vh;display:flex;flex-direction:column;padding:22px 14px!important}
.app-sidebar nav{display:block!important;flex:1}
.app-sidebar .nav-group{display:block!important}
.app-sidebar .nav-group a{display:block!important;width:auto;box-sizing:border-box}
.sidebar-top{flex:0 0 auto}.app-sidebar .brand{padding-bottom:22px}
.userbox{display:flex;align-items:center;gap:10px;margin-top:auto!important;padding:14px 8px 4px!important;border-top:1px solid #374151}
.user-avatar{width:42px;height:42px;min-width:42px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.16)}
.user-avatar-fallback{display:flex;align-items:center;justify-content:center;background:#334155;color:#fff;font-weight:800;font-size:.85rem}
.userbox-meta{min-width:0;flex:1}.userbox-meta strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.86rem}
.userbox-meta small{margin-top:2px!important}.userbox-links{display:flex;gap:9px;margin-top:5px}.userbox-links a{display:inline!important;margin:0!important;font-size:.75rem}
main{min-width:0;box-sizing:border-box}

/* Benutzerverwaltung */
.user-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.user-form-grid label{display:flex;flex-direction:column;gap:6px;font-size:.84rem;font-weight:650}
.user-form-grid .span-2{grid-column:span 2}.user-form-grid .check-label{flex-direction:row;align-items:center}
.user-form-grid .check-label input{width:auto;min-height:auto}.optional{font-weight:400;color:#64748b}
.user-table-person{display:flex;align-items:center;gap:9px}.user-table-person img,.user-table-person>span{width:34px;height:34px;border-radius:50%;object-fit:cover}
.user-table-person>span{display:flex;align-items:center;justify-content:center;background:#e2e8f0;font-weight:800}
.role-badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2f7;font-size:.78rem}
.notice.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}
@media(max-width:850px){
 .layout{grid-template-columns:1fr!important}
 .app-sidebar{width:100%;min-height:auto}
 .app-sidebar nav{display:block!important}
 .app-sidebar .nav-group{margin-bottom:8px}
 .app-sidebar .nav-group a{display:inline-block!important}
 .userbox{margin-top:10px!important}
}
@media(max-width:650px){.user-form-grid{grid-template-columns:1fr}.user-form-grid .span-2{grid-column:auto}}

/* V11.9 – zentraler, seitenunabhängiger App-Rahmen */
html,body{margin:0;min-height:100%}
body>.layout{display:grid!important;grid-template-columns:250px minmax(0,1fr)!important;min-height:100vh!important}
body>.layout>.app-sidebar{position:sticky!important;top:0!important;width:250px!important;min-width:250px!important;max-width:250px!important;height:100vh!important;min-height:100vh!important;box-sizing:border-box!important;overflow-y:auto!important;align-self:start!important}
body>.layout>main{width:auto!important;max-width:none!important;min-width:0!important;margin:0!important;padding:28px 30px!important;box-sizing:border-box!important}
body>.layout>.app-sidebar nav{width:100%!important}
body>.layout>.app-sidebar .nav-group{width:100%!important}
body>.layout>.app-sidebar .nav-group a{width:100%!important;box-sizing:border-box!important}
@media(max-width:850px){
 body>.layout{display:block!important}
 body>.layout>.app-sidebar{position:relative!important;width:100%!important;min-width:100%!important;max-width:none!important;height:auto!important;min-height:auto!important}
 body>.layout>main{padding:20px 16px!important}
}

/* V11.12 – Profil & Versionsanzeige */
.app-version{display:inline-block;margin:4px 0 20px;padding:4px 8px;border:1px solid rgba(255,255,255,.13);border-radius:999px;color:#94a3b8;font-size:.67rem;letter-spacing:.05em}
.profile-page-header{margin-bottom:18px}
.profile-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:20px;align-items:start}
.profile-card{background:linear-gradient(145deg,#172033,#111827);color:#fff;border-radius:16px;padding:28px 22px;text-align:center;box-shadow:0 12px 30px rgba(15,23,42,.09)}
.profile-avatar-large{width:92px;height:92px;margin:0 auto 16px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#334155;border:4px solid rgba(255,255,255,.12);overflow:hidden;font-size:2rem;font-weight:800}
.profile-avatar-large img{width:100%;height:100%;object-fit:cover}
.profile-card h2{margin:0;font-size:1.25rem}.profile-username{margin-top:4px;color:#94a3b8;font-size:.86rem}
.profile-role{display:inline-block;margin:14px 0 8px;padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.09);font-size:.76rem;font-weight:700}
.profile-card .muted{color:#94a3b8;font-size:.78rem;line-height:1.5;margin-top:16px}
.profile-settings{padding:0!important;overflow:hidden}
.profile-settings form{margin:0}
.profile-section{padding:24px 26px}
.profile-section-title{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.profile-section-title h2{font-size:1rem;margin:0 0 2px}.profile-section-title p{margin:0;color:#64748b;font-size:.8rem}
.profile-icon{width:34px;height:34px;min-width:34px;border-radius:9px;background:#eef4ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:.78rem}
.profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}
.profile-fields label{display:flex;flex-direction:column;gap:7px;font-size:.82rem;font-weight:700}
.profile-fields .span-2{grid-column:span 2}
.profile-fields input{width:100%;box-sizing:border-box}
.profile-fields small{font-weight:400;color:#64748b}
.avatar-upload-field input[type=file]{padding:10px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:9px}
.profile-divider{height:1px;background:#e8edf3;margin:0 26px}
.profile-actions{display:flex;justify-content:flex-end;padding:18px 26px;background:#f8fafc;border-top:1px solid #e8edf3}
@media(max-width:900px){.profile-layout{grid-template-columns:1fr}.profile-card{display:grid;grid-template-columns:auto 1fr;column-gap:16px;text-align:left}.profile-avatar-large{grid-row:1/5;margin:0}.profile-card .muted{margin:6px 0 0}}
@media(max-width:650px){.profile-fields{grid-template-columns:1fr}.profile-fields .span-2{grid-column:auto}.profile-card{display:block;text-align:center}.profile-avatar-large{margin:0 auto 16px}.profile-actions{justify-content:stretch}.profile-actions .button{width:100%}}

/* V11.13 – Footer-Version & Datenschutz */
.app-version{display:none!important}
.sidebar-footer{margin-top:10px;padding:10px 8px 2px;border-top:1px solid rgba(255,255,255,.08);display:flex;justify-content:space-between;gap:10px;color:#64748b;font-size:.68rem;letter-spacing:.02em}
.privacy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.privacy-hero{grid-column:1/-1;display:flex;align-items:center;gap:18px;background:linear-gradient(135deg,#fff,#f7faff)}
.privacy-icon{width:54px;height:54px;min-width:54px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#eaf2ff;color:#2563eb;font-weight:900}
.privacy-hero h2,.privacy-card h2{margin-top:0}.privacy-hero p,.privacy-card p{color:#64748b;line-height:1.6}
.privacy-card{min-height:150px}.privacy-card-wide{grid-column:1/-1;min-height:auto}
.privacy-link{display:inline-block;margin-top:6px;font-weight:700;text-decoration:none}
.privacy-note{margin-top:16px;padding:13px 15px;border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0;color:#475569;font-size:.82rem}
@media(max-width:760px){.privacy-grid{grid-template-columns:1fr}.privacy-card-wide,.privacy-hero{grid-column:auto}}

/* V11.14 – klickbare Version & Versionsprotokoll */
.sidebar-footer .version-link{color:#94a3b8;text-decoration:none;font-weight:750;padding:2px 6px;margin:-2px -6px;border-radius:6px}
.sidebar-footer .version-link:hover{color:#fff;background:rgba(255,255,255,.08)}
.version-page-grid{display:grid;gap:18px}
.version-current{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#fff,#f6f9ff)}
.version-kicker{font-size:.68rem;font-weight:800;letter-spacing:.08em;color:#64748b}.version-current h2{margin:5px 0 0}
.version-current-badge{display:inline-flex;align-items:center;justify-content:center;padding:9px 14px;border-radius:999px;background:#eaf2ff;color:#2563eb;font-weight:850}
.changelog{display:grid}.changelog-entry{display:grid;grid-template-columns:90px minmax(0,1fr);gap:16px;padding:18px 0;border-bottom:1px solid #e8edf3}.changelog-entry:last-child{border-bottom:0}
.changelog-version{font-weight:850;color:#2563eb}.changelog-entry ul{margin:0;padding-left:18px}.changelog-entry li{margin:0 0 6px;line-height:1.5}
@media(max-width:600px){.changelog-entry{grid-template-columns:1fr;gap:7px}}

/* V11.16 – DSGVO-Datenschutzbereich */
.privacy-legal-warning{margin-bottom:18px;padding:15px 18px;border-radius:12px;background:#fff8e6;border:1px solid #f4d48a;color:#694c12;line-height:1.55}
.privacy-legal{display:grid;gap:14px}
.privacy-legal-section{display:grid;grid-template-columns:52px minmax(0,1fr);gap:16px;align-items:start;min-height:0}
.privacy-number{width:42px;height:42px;border-radius:11px;background:#eef4ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:900}
.privacy-legal-section h2{margin:2px 0 8px;font-size:1rem}.privacy-legal-section p{margin:0 0 9px;color:#526174;line-height:1.62}
@media(max-width:600px){.privacy-legal-section{grid-template-columns:1fr}.privacy-number{width:36px;height:36px}}

/* V11.18 – geliefertes Menülogo */
.sidebar .logo,.sidebar .brandmark.logo{width:48px;height:48px;min-width:48px;border-radius:12px;overflow:hidden;background:#fff;display:flex;align-items:center;justify-content:center;padding:4px}
.sidebar .logo img,.sidebar .brandmark.logo img{display:block;width:100%;height:100%;object-fit:contain}

/* V11.19 – tatsächliches 4-box.de Menülogo */
.sidebar .menu-logo{
  width:88px!important;height:88px!important;min-width:88px!important;
  padding:0!important;border-radius:0!important;overflow:visible!important;
  background:transparent!important;box-shadow:none!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
}
.sidebar .menu-logo img{
  width:88px!important;height:88px!important;max-width:none!important;
  object-fit:contain!important;display:block!important;
}

/* V11.20 – Passwort vergessen */
.forgot-link{text-align:center;margin:12px 0 0}.forgot-link a,.auth-back a{color:#2563eb;text-decoration:none;font-weight:700}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#f4f7fb}
.auth-card{width:min(460px,100%);background:#fff;border:1px solid #e5eaf1;border-radius:18px;padding:28px;box-shadow:0 18px 45px rgba(15,23,42,.08)}
.auth-card h1{margin-top:0}.auth-card form{display:grid;gap:14px}.auth-card label{display:grid;gap:6px;font-weight:700}
.auth-card input{width:100%;box-sizing:border-box}.notice{padding:12px 14px;border-radius:10px;margin:14px 0}.notice.success{background:#edf9f1}.notice.error{background:#fff0f0}

/* V11.21 – Login/Passwort-Reset/Logo */
.login-logo.image{background:transparent!important;box-shadow:none!important;border:0!important;width:86px!important;height:86px!important;padding:0!important}
.login-logo.image img{width:100%;height:100%;object-fit:contain;display:block}
.mobile-brand .login-logo.image{width:54px!important;height:54px!important}


/* V11.25 – Primärer Button im Login-/Reset-Bereich */
.login-card .login-submit{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:48px;
  margin-top:2px;
  border:0;
  border-radius:10px;
  background:#1769e8;
  color:#fff;
  font:inherit;
  font-weight:800;
  font-size:15px;
  line-height:1.2;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(23,105,232,.20);
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}
.login-card .login-submit:hover{
  background:#0f5ed7;
  box-shadow:0 10px 22px rgba(23,105,232,.27);
  transform:translateY(-1px);
}
.login-card .login-submit:active{
  transform:translateY(0);
  box-shadow:0 5px 12px rgba(23,105,232,.20);
}
.login-card .login-submit:focus-visible{
  outline:3px solid rgba(23,105,232,.28);
  outline-offset:3px;
}


/* V11.26 – echtes 4-box.de Logo in der zentralen Sidebar */
.app-sidebar .sidebar-top .menu-logo{
  width:92px!important;
  height:92px!important;
  min-width:92px!important;
  margin:0 0 10px 0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:visible!important;
}
.app-sidebar .sidebar-top .menu-logo img{
  display:block!important;
  width:92px!important;
  height:92px!important;
  max-width:92px!important;
  object-fit:contain!important;
}

/* V11.27 – Passwort-vergessen-Link direkt unter dem Loginbutton */
.login-card .login-forgot{margin:14px 0 0!important;text-align:center!important}
.login-card .login-forgot a{display:inline-block;color:#1769e8!important;font-weight:700;font-size:14px;text-decoration:none}
.login-card .login-forgot a:hover{text-decoration:underline}


/* V11.28 – moderne Vertragsakte */
.contract-workspace{display:grid;gap:14px;max-width:1600px}
.contract-record-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:4px 2px 8px}
.contract-titleline{display:flex;align-items:center;gap:14px}.contract-titleline h1{margin:2px 0 4px;font-size:27px;line-height:1.15}
.contract-type-icon{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#0ba9ba,#087b9c);color:#fff;font-weight:900;font-size:18px;box-shadow:0 7px 18px rgba(8,123,156,.2)}
.contract-kicker{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#718096}
.contract-head-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:#536176;font-size:13px}.contract-head-meta>span:not(:last-child):after{content:"";margin-left:8px;border-right:1px solid #d7dee8}
.contract-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.contract-status{padding:4px 8px!important;border-radius:999px;font-size:11px;font-weight:800;background:#e9f7ef;color:#18743a}.contract-status.status-terminated{background:#f3f4f6;color:#667085}.contract-status.status-future{background:#edf4ff;color:#175cd3}

.modern-tabs{display:flex;gap:7px;flex-wrap:wrap;padding:8px;background:#fff;border:1px solid #e7ebf1;border-radius:14px;box-shadow:0 4px 14px rgba(15,23,42,.035)}
.modern-tabs a{display:flex;align-items:center;gap:7px;padding:9px 12px;border-radius:9px;color:#405066;text-decoration:none;font-size:13px;font-weight:750;border:1px solid transparent}
.modern-tabs a:hover{background:#f5f8fc;color:#1769e8}.modern-tabs a.active{background:#1769e8;color:#fff;box-shadow:0 5px 13px rgba(23,105,232,.18)}
.tab-count{min-width:19px;height:19px;padding:0 5px;border-radius:999px;display:inline-grid;place-items:center;background:rgba(127,140,160,.14);font-size:10px}.modern-tabs .active .tab-count{background:rgba(255,255,255,.2)}

.contract-section{overflow:hidden;background:#fff;border:1px solid #e7ebf1;border-radius:14px;box-shadow:0 5px 18px rgba(15,23,42,.035)}
.contract-section-title{min-height:38px;padding:0 13px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.contract-section-title>div{display:flex;align-items:center;gap:9px}.contract-section-title>span{font-size:11px;font-weight:700;opacity:.8}.section-icon{font-size:16px}
.tone-blue .contract-section-title{background:#eaf3ff;color:#1769e8}.tone-teal .contract-section-title{background:#e5f9f7;color:#087f78}
.tone-green .contract-section-title{background:#eaf8ef;color:#18864b}.tone-violet .contract-section-title{background:#f1ebff;color:#6941c6}
.tone-orange .contract-section-title{background:#fff1df;color:#b54708}.tone-slate .contract-section-title{background:#f2f4f7;color:#475467}

.contract-field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:#edf0f4;padding:1px}
.contract-field{min-height:54px;padding:9px 12px;background:#fff;display:grid;grid-template-columns:minmax(110px,40%) 1fr;align-items:center;gap:12px}
.contract-field.wide{grid-column:span 2}.contract-field span{font-size:12px;color:#667085}.contract-field strong{font-size:13px;color:#182230;font-weight:650;overflow-wrap:anywhere}
.contract-note{padding:16px;line-height:1.65;color:#344054}
.contract-content-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.contract-list{padding:4px 12px}.contract-list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 2px;border-bottom:1px solid #edf0f4}
.contract-list-row:last-child{border-bottom:0}.contract-list-row>div{display:grid;gap:3px}.contract-list-row strong{font-size:13px}.contract-list-row span{font-size:11px;color:#7a8698}
.empty-state{padding:16px 2px;color:#98a2b3;font-size:13px}
.contract-add{border-top:1px solid #edf0f4}.contract-add summary{padding:11px 14px;cursor:pointer;color:#1769e8;font-size:12px;font-weight:800;list-style:none}.contract-add summary::-webkit-details-marker{display:none}.contract-add[open] summary{background:#f8fafc}
.contract-add form{padding:14px}.button.compact{padding:6px 9px;font-size:11px}.contract-danger-zone{display:flex;justify-content:flex-end;padding:6px 0 18px}

@media(max-width:1050px){.contract-field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.contract-content-grid{grid-template-columns:1fr}.contract-field.wide{grid-column:auto}}
@media(max-width:720px){.contract-record-head{align-items:flex-start;flex-direction:column}.contract-head-actions{justify-content:flex-start}.contract-field-grid{grid-template-columns:1fr}.contract-field{grid-template-columns:1fr;gap:3px}.modern-tabs{flex-wrap:nowrap;overflow-x:auto}.modern-tabs a{white-space:nowrap}}


/* V11.29 – Vertragsbaum / Untermenü */
.contracts-browser{display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:16px;align-items:start}
.contract-tree-panel,.contracts-list-panel{background:#fff;border:1px solid #e4e9f0;border-radius:15px;box-shadow:0 5px 18px rgba(15,23,42,.04);overflow:hidden}
.contract-tree-panel{position:sticky;top:18px;max-height:calc(100vh - 36px);display:flex;flex-direction:column}
.contract-tree-head,.contracts-list-title{padding:15px 16px 11px;border-bottom:1px solid #edf0f4}.contract-tree-head>div,.contracts-list-title>div{display:grid;gap:2px}
.contract-tree-head strong,.contracts-list-title strong{font-size:14px;color:#182230}.contract-tree-head span,.contracts-list-title span{font-size:11px;color:#8a96a8}
.contract-tree-search{padding:10px 12px;border-bottom:1px solid #edf0f4}.contract-tree-search input{width:100%;box-sizing:border-box;border-radius:9px}
.contract-tree{padding:9px 8px 14px;overflow:auto}.contract-tree details>summary{list-style:none;cursor:pointer}.contract-tree details>summary::-webkit-details-marker{display:none}
.tree-customer>summary{display:flex;align-items:center;gap:8px;padding:8px 7px;color:#1d2939;font-size:13px}.tree-person{width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:#eaf3ff;color:#1769e8}
.tree-branches{margin-left:20px;padding-left:13px;border-left:1px dotted #aeb8c5}
.tree-group{position:relative}.tree-group:before{content:"";position:absolute;left:-13px;top:18px;width:11px;border-top:1px dotted #aeb8c5}
.tree-group>summary{display:flex;align-items:center;gap:8px;padding:7px 3px;color:#344054;font-size:12px}.tree-group>summary small{margin-left:auto;min-width:20px;height:20px;display:grid;place-items:center;border-radius:999px;background:#f2f4f7;color:#667085;font-size:10px}
.tree-minus{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#1fb9b4;color:#fff;font-size:18px;line-height:1}.tree-group:not([open]) .tree-minus{background:#8b95a5}.tree-group:not([open]) .tree-minus{font-size:0}.tree-group:not([open]) .tree-minus:after{content:"+";font-size:17px}
.tree-contracts{margin-left:15px;padding-left:13px;border-left:1px dotted #b7c0cc}
.tree-contract{position:relative;display:flex;align-items:center;gap:8px;padding:6px 7px;border-radius:8px;text-decoration:none;color:#344054}.tree-contract:before{content:"";position:absolute;left:-13px;width:11px;border-top:1px dotted #b7c0cc}
.tree-contract:hover{background:#f1f6ff;color:#1769e8}.tree-contract-icon{flex:0 0 29px;width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#11a7b4;color:#fff;font-weight:850;font-size:13px}
.tree-contract>span:last-child{min-width:0;display:grid;gap:1px}.tree-contract strong{font-size:11px;font-weight:800;color:inherit}.tree-contract small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#667085}
.tree-empty{padding:20px;text-align:center;color:#98a2b3;font-size:12px}
.contracts-list-panel .table-scroll{overflow:auto}.contracts-list-panel table{margin:0;border:0}

.sidebar-footer{display:grid!important;gap:5px!important}.sidebar-footer .footer-product{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.sidebar-footer .ai-credit{font-size:9px;line-height:1.35;color:rgba(255,255,255,.48);font-weight:500}

@media(max-width:1100px){.contracts-browser{grid-template-columns:1fr}.contract-tree-panel{position:static;max-height:520px}}

/* V11.30 – Auswertungs-Auswahl */
.report-selector{max-width:720px}.report-selector form{margin:0}.report-selector label{display:grid;gap:7px;font-size:12px;font-weight:800;color:#475467}.report-selector select{width:100%;min-height:43px;border-radius:9px;background:#fff}
.report-result{overflow:auto}.report-result table{margin:0}.report-result tfoot th{background:#f8fafc;border-top:2px solid #dbe2ea}.report-group th{background:#edf6ff!important;color:#1769e8!important;text-align:left!important;font-size:12px;letter-spacing:.02em}

/* V11.31 – Kundenfilter und Vertragskalender */
.report-filter-form{display:grid!important;grid-template-columns:minmax(220px,1fr) minmax(280px,2fr);gap:12px;align-items:end}
.calendar .event.calendar-contract-event{display:grid;gap:2px;text-decoration:none}.calendar .event.calendar-contract-event strong{font-size:10px;color:inherit}.calendar .event.calendar-contract-event small{font-size:9px;opacity:.75}
.calendar-sync-panel{display:flex;align-items:center;justify-content:space-between;gap:18px}.calendar-sync-panel h2{margin:0 0 5px;font-size:17px}.calendar-sync-panel p{margin:0;color:#667085;font-size:12px}
@media(max-width:720px){.report-filter-form{grid-template-columns:1fr}.calendar-sync-panel{align-items:flex-start;flex-direction:column}}

/* V11.32 – sicherer persönlicher Kalender-Abo-Link */
.calendar-subscription-card{display:grid;gap:18px;max-width:980px}.calendar-subscription-card h2,.calendar-provider-help h2{margin:0 0 5px}.calendar-subscription-card p{margin:0;color:#667085;line-height:1.6}
.calendar-secret-box{padding:15px;border:1px solid #b9d6ff;background:#f0f6ff;border-radius:12px}.calendar-secret-box>strong{color:#175cd3}.calendar-secret-box>p{margin:4px 0 10px;font-size:12px}
.calendar-url-copy{display:grid;grid-template-columns:1fr auto;gap:8px}.calendar-url-copy input{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px}
.calendar-token-state{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.calendar-token-state small{color:#667085}.sync-status{padding:6px 10px;border-radius:999px;font-size:11px;font-weight:850}.sync-status.active{background:#eaf8ef;color:#18864b}.sync-status.inactive{background:#f2f4f7;color:#667085}
.calendar-sync-actions{display:flex;gap:8px;flex-wrap:wrap}.calendar-sync-actions form{margin:0}
.calendar-provider-help{max-width:980px}.sync-provider-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}.sync-provider-grid>div{padding:14px;border:1px solid #e7ebf1;border-radius:11px;background:#fbfcfe}.sync-provider-grid strong{font-size:13px}.sync-provider-grid p{font-size:12px;color:#667085;line-height:1.55}
@media(max-width:760px){.sync-provider-grid{grid-template-columns:1fr}.calendar-url-copy{grid-template-columns:1fr}.calendar-url-copy .button{width:100%}}


/* V11.33 – Kalender-Abo direkt über das Profil erreichbar */
.profile-calendar-card{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  margin-top:16px;
  padding:18px 20px;
  border:1px solid #dfe6ef;
  border-radius:15px;
  background:#fff;
  box-shadow:0 5px 18px rgba(15,23,42,.04);
}
.profile-calendar-icon{
  width:46px;height:46px;border-radius:13px;
  display:grid;place-items:center;
  background:#eaf3ff;color:#1769e8;
  font-size:23px;font-weight:800;
}
.profile-calendar-copy{min-width:0}
.profile-calendar-copy h2{margin:2px 0 5px;font-size:17px;color:#182230}
.profile-calendar-copy p{margin:0;color:#667085;font-size:12px;line-height:1.55}
.profile-card-kicker{font-size:10px;font-weight:900;letter-spacing:.12em;color:#1769e8}
@media(max-width:760px){
  .profile-calendar-card{grid-template-columns:auto 1fr}
  .profile-calendar-card>.button{grid-column:1/-1;width:100%;box-sizing:border-box;text-align:center}
}

/* V11.34 – Dark mode, accessibility, clean calendar icon */
:root{--ui-bg:#f5f7fa;--ui-surface:#fff;--ui-text:#182230;--ui-muted:#667085;--ui-border:#dfe6ef;--ui-focus:#ffbf47}
html[data-resolved-theme="dark"]{--ui-bg:#0b1220;--ui-surface:#111b2c;--ui-text:#f4f7fb;--ui-muted:#b4c0d0;--ui-border:#2b3a50;--ui-focus:#ffd166;color-scheme:dark}
html[data-resolved-theme="dark"] body{background:var(--ui-bg);color:var(--ui-text)}
html[data-resolved-theme="dark"] :is(main,.panel,.profile-calendar-card,.contract-section,.contracts-list-panel,.contract-tree-panel,.modern-tabs){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-resolved-theme="dark"] :is(h1,h2,h3,strong,label){color:var(--ui-text)}
html[data-resolved-theme="dark"] :is(p,.muted,.profile-calendar-copy p,.contract-field span){color:var(--ui-muted)}
html[data-resolved-theme="dark"] :is(input,select,textarea){background:#0e1726;color:var(--ui-text);border-color:#40516a}
html[data-resolved-theme="dark"] :is(table td,table th){border-color:var(--ui-border)}
html[data-resolved-theme="dark"] .contract-field{background:var(--ui-surface)}
html[data-resolved-theme="dark"] .contract-field-grid{background:var(--ui-border)}
html[data-resolved-theme="dark"] .tree-contract:hover{background:#172944}
.profile-calendar-icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:#eaf3ff;color:#1769e8}
html[data-resolved-theme="dark"] .profile-calendar-icon{background:#17345f;color:#82b4ff}.profile-calendar-icon svg{display:block}
.skip-link{position:fixed;left:12px;top:10px;z-index:99999;padding:10px 14px;border-radius:8px;background:#fff;color:#111;transform:translateY(-160%);font-weight:800}.skip-link:focus{transform:translateY(0)}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--ui-focus)!important;outline-offset:3px!important}
button,.button{min-height:40px}input,select,textarea{font-size:16px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media(prefers-contrast:more){.button{border:2px solid currentColor}:root{--ui-border:#5d6673}}


/* ==========================================================================
   V11.35 – vollständige Theme-Korrektur
   Die folgenden Regeln stehen bewusst am Dateiende und vereinheitlichen
   alte, über mehrere Versionen entstandene feste Hell-/Dunkelfarben.
   ========================================================================== */

:root{
  --theme-bg:#f5f7fa;
  --theme-surface:#ffffff;
  --theme-surface-soft:#f8fafc;
  --theme-surface-hover:#f1f5f9;
  --theme-input:#ffffff;
  --theme-text:#17212b;
  --theme-text-soft:#475467;
  --theme-muted:#667085;
  --theme-border:#d7dee8;
  --theme-border-strong:#c7d0dc;
  --theme-primary:#1769e8;
  --theme-primary-soft:#eaf3ff;
  --theme-sidebar:#111827;
  --theme-sidebar-soft:#1f2937;
  --theme-sidebar-text:#f8fafc;
  --theme-sidebar-muted:#aab6c7;
  --theme-danger-bg:#fff1f1;
  --theme-danger:#9b1c1c;
  --theme-success-bg:#edf9f1;
  --theme-success:#176b3a;
  --theme-warning-bg:#fff8e6;
  --theme-warning:#694c12;
  color-scheme:light;
}
html[data-resolved-theme="light"]{color-scheme:light}
html[data-resolved-theme="dark"]{
  --theme-bg:#09111f;
  --theme-surface:#111c2d;
  --theme-surface-soft:#162235;
  --theme-surface-hover:#1c2b40;
  --theme-input:#0d1726;
  --theme-text:#f3f6fb;
  --theme-text-soft:#d3dbe7;
  --theme-muted:#aeb9c9;
  --theme-border:#2d3c52;
  --theme-border-strong:#40516a;
  --theme-primary:#66a3ff;
  --theme-primary-soft:#17345f;
  --theme-sidebar:#07101e;
  --theme-sidebar-soft:#142238;
  --theme-sidebar-text:#f8fafc;
  --theme-sidebar-muted:#aeb9c9;
  --theme-danger-bg:#381b22;
  --theme-danger:#ffb4b4;
  --theme-success-bg:#123324;
  --theme-success:#9de2b8;
  --theme-warning-bg:#3a2d14;
  --theme-warning:#ffd98a;
  color-scheme:dark;
}

/* Grundfläche und Typografie */
html[data-resolved-theme] body{background:var(--theme-bg);color:var(--theme-text)}
html[data-resolved-theme] body>.layout>main{background:var(--theme-bg);color:var(--theme-text)}
html[data-resolved-theme] :is(h1,h2,h3,h4,h5,h6,strong,b){color:inherit}
html[data-resolved-theme] :is(p,.muted,.field-hint,.optional,.date span){color:var(--theme-muted)}
html[data-resolved-theme] a:not(.button):not(.tree-contract):not(nav a){color:var(--theme-primary)}

/* Panels / Karten – gilt auch für ältere Seiten */
html[data-resolved-theme] :is(
 .panel,.stat,.contract-section,.contracts-list-panel,.contract-tree-panel,
 .profile-settings,.profile-calendar-card,.auth-card,.detail-grid>div,
 .comparison-grid>div,.category-profile,.provider-contract-box,.access-card,
 .sync-provider-grid>div,.modern-tabs
){
 background:var(--theme-surface);
 color:var(--theme-text);
 border-color:var(--theme-border);
}
html[data-resolved-theme] :is(.panel,.stat,.profile-calendar-card,.contract-section,.contracts-list-panel,.contract-tree-panel){
 box-shadow:0 5px 18px rgba(15,23,42,.06);
}
html[data-resolved-theme="dark"] :is(.panel,.stat,.profile-calendar-card,.contract-section,.contracts-list-panel,.contract-tree-panel){
 box-shadow:0 5px 18px rgba(0,0,0,.20);
}

/* Formulare – behebt schwarze Felder im Hellmodus und helle Felder im Dunkelmodus */
html[data-resolved-theme] :is(input,select,textarea){
 appearance:auto;
 background-color:var(--theme-input)!important;
 color:var(--theme-text)!important;
 border-color:var(--theme-border-strong)!important;
 caret-color:var(--theme-text);
}
html[data-resolved-theme] :is(input,textarea)::placeholder{color:var(--theme-muted)!important;opacity:.82}
html[data-resolved-theme] select option{background:var(--theme-input);color:var(--theme-text)}
html[data-resolved-theme] input[type="file"]{background:var(--theme-surface-soft)!important;color:var(--theme-text)!important}
html[data-resolved-theme] input[type="file"]::file-selector-button{
 background:var(--theme-surface);color:var(--theme-text);border:1px solid var(--theme-border-strong);
 border-radius:6px;padding:7px 10px;margin-right:10px;cursor:pointer
}
html[data-resolved-theme] :is(input,select,textarea):disabled{
 background:var(--theme-surface-soft)!important;color:var(--theme-muted)!important;opacity:1
}
html[data-resolved-theme] :is(.formgrid label,.provider-form label,.user-form-grid label,.profile-fields label,.report-selector label,.login-field){
 color:var(--theme-text-soft)
}
html[data-resolved-theme] .avatar-upload-field input[type=file]{
 background:var(--theme-surface-soft)!important;border-color:var(--theme-border-strong)!important
}

/* Profil */
html[data-resolved-theme] .profile-card{
 background:linear-gradient(145deg,#172033,#111827);
 color:#fff;
}
html[data-resolved-theme] .profile-card :is(h2,strong){color:#fff}
html[data-resolved-theme] .profile-card :is(.profile-username,.muted){color:#b7c2d2}
html[data-resolved-theme] .profile-section-title p,
html[data-resolved-theme] .profile-fields small{color:var(--theme-muted)}
html[data-resolved-theme] .profile-divider{background:var(--theme-border)}
html[data-resolved-theme] .profile-actions{
 background:var(--theme-surface-soft);
 border-color:var(--theme-border)
}
html[data-resolved-theme] .profile-icon{
 background:var(--theme-primary-soft);
 color:var(--theme-primary)
}
html[data-resolved-theme] .profile-calendar-copy h2{color:var(--theme-text)}
html[data-resolved-theme] .profile-calendar-copy p{color:var(--theme-muted)}
html[data-resolved-theme] .profile-calendar-icon{
 background:var(--theme-primary-soft);color:var(--theme-primary)
}

/* Tabellen */
html[data-resolved-theme] table{color:var(--theme-text)}
html[data-resolved-theme] :is(th,td){border-color:var(--theme-border)}
html[data-resolved-theme] th{color:var(--theme-muted)}
html[data-resolved-theme] tbody tr:hover{background:var(--theme-surface-hover)}
html[data-resolved-theme] .report-result tfoot th{background:var(--theme-surface-soft);border-color:var(--theme-border-strong)}
html[data-resolved-theme] .report-group th{background:var(--theme-primary-soft)!important;color:var(--theme-primary)!important}

/* Vertrag / Baum / Kategorien */
html[data-resolved-theme] .contract-field-grid{background:var(--theme-border)}
html[data-resolved-theme] .contract-field{background:var(--theme-surface)}
html[data-resolved-theme] .contract-field span{color:var(--theme-muted)}
html[data-resolved-theme] .contract-field strong{color:var(--theme-text)}
html[data-resolved-theme] .contract-add{border-color:var(--theme-border)}
html[data-resolved-theme] .contract-add[open] summary{background:var(--theme-surface-soft)}
html[data-resolved-theme] .modern-tabs a{color:var(--theme-text-soft)}
html[data-resolved-theme] .modern-tabs a:hover{background:var(--theme-surface-hover);color:var(--theme-primary)}
html[data-resolved-theme] .tree-customer>summary,
html[data-resolved-theme] .tree-group>summary,
html[data-resolved-theme] .tree-contract{color:var(--theme-text)}
html[data-resolved-theme] .tree-contract small,
html[data-resolved-theme] .contract-tree-head span,
html[data-resolved-theme] .contracts-list-title span{color:var(--theme-muted)}
html[data-resolved-theme] .contract-tree-head strong,
html[data-resolved-theme] .contracts-list-title strong{color:var(--theme-text)}
html[data-resolved-theme] .tree-group>summary small{background:var(--theme-surface-soft);color:var(--theme-muted)}
html[data-resolved-theme] :is(.tree-branches,.tree-contracts){border-color:var(--theme-border-strong)}
html[data-resolved-theme] .tree-group:before,
html[data-resolved-theme] .tree-contract:before{border-color:var(--theme-border-strong)}
html[data-resolved-theme] .tree-contract:hover{background:var(--theme-surface-hover);color:var(--theme-primary)}
html[data-resolved-theme] .category-results,
html[data-resolved-theme] .provider-suggestions{
 background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text)
}
html[data-resolved-theme] .category-result:hover,
html[data-resolved-theme] .category-result:focus,
html[data-resolved-theme] .provider-suggestion:hover{background:var(--theme-surface-hover)}
html[data-resolved-theme] .provider-suggestion{
 background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text)
}
html[data-resolved-theme] .provider-suggestion small{color:var(--theme-muted)}
html[data-resolved-theme] .provider-preview{background:var(--theme-surface-soft);border-color:var(--theme-border);color:var(--theme-text)}

/* Kalender */
html[data-resolved-theme] .week{background:var(--theme-surface-soft);border-color:var(--theme-border)}
html[data-resolved-theme] .week b{color:var(--theme-muted)}
html[data-resolved-theme] .day{background:var(--theme-surface);border-color:var(--theme-border)}
html[data-resolved-theme] .day.empty{background:var(--theme-surface-soft)}
html[data-resolved-theme] .event{background:var(--theme-primary-soft);color:var(--theme-text);border-color:var(--theme-primary)}
html[data-resolved-theme] .calendar-sync-panel p,
html[data-resolved-theme] .calendar-subscription-card p,
html[data-resolved-theme] .sync-provider-grid p,
html[data-resolved-theme] .calendar-token-state small{color:var(--theme-muted)}
html[data-resolved-theme] .calendar-secret-box{
 background:var(--theme-primary-soft);border-color:var(--theme-primary)
}
html[data-resolved-theme] .calendar-secret-box>strong{color:var(--theme-primary)}

/* Hinweise, Status und Sonderflächen */
html[data-resolved-theme] :is(.notice,.empty-state){
 background:var(--theme-surface-soft);border-color:var(--theme-border);color:var(--theme-text-soft)
}
html[data-resolved-theme] :is(.notice.error,.error){background:var(--theme-danger-bg);color:var(--theme-danger);border-color:var(--theme-danger)}
html[data-resolved-theme] .notice.success{background:var(--theme-success-bg);color:var(--theme-success);border-color:var(--theme-success)}
html[data-resolved-theme] .privacy-legal-warning{background:var(--theme-warning-bg);color:var(--theme-warning);border-color:var(--theme-warning)}
html[data-resolved-theme] .privacy-note{background:var(--theme-surface-soft);color:var(--theme-text-soft);border-color:var(--theme-border)}
html[data-resolved-theme] .privacy-hero{background:var(--theme-surface)}
html[data-resolved-theme] .privacy-hero p,
html[data-resolved-theme] .privacy-card p,
html[data-resolved-theme] .privacy-legal-section p{color:var(--theme-text-soft)}
html[data-resolved-theme] .version-current{background:var(--theme-surface)}
html[data-resolved-theme] .changelog-entry{border-color:var(--theme-border)}

/* Buttons */
html[data-resolved-theme] .button{background:#1769e8;color:#fff}
html[data-resolved-theme] .button:hover{background:#0e58c7;color:#fff}
html[data-resolved-theme] .button.secondary{
 background:var(--theme-surface-soft);color:var(--theme-text);border:1px solid var(--theme-border)
}
html[data-resolved-theme] .button.secondary:hover{background:var(--theme-surface-hover);color:var(--theme-text)}

/* Sidebar bleibt bewusst dunkel in beiden Modi, aber mit lesbaren Kontrasten */
html[data-resolved-theme] .app-sidebar{
 background:var(--theme-sidebar);color:var(--theme-sidebar-text)
}
html[data-resolved-theme] .app-sidebar nav a{color:var(--theme-sidebar-muted)}
html[data-resolved-theme] .app-sidebar nav a:hover,
html[data-resolved-theme] .app-sidebar nav a.active{background:var(--theme-sidebar-soft);color:#fff}
html[data-resolved-theme] .app-sidebar .nav-group-label,
html[data-resolved-theme] .sidebar-footer,
html[data-resolved-theme] .sidebar-footer .version-link{color:var(--theme-sidebar-muted)}
html[data-resolved-theme] .userbox{border-color:rgba(255,255,255,.13)}
html[data-resolved-theme] .userbox-meta strong{color:#fff}
html[data-resolved-theme] .userbox-meta small,
html[data-resolved-theme] .userbox-links a{color:var(--theme-sidebar-muted)}

/* Login / Passwort-Reset sind eigenständige Oberflächen und bleiben kontrolliert hell */
.login-page,.auth-page{color-scheme:light}
.login-shell,.login-card,.auth-card{color:#17212b}
.login-card :is(input,select,textarea),.auth-card :is(input,select,textarea){
 background:#fff!important;color:#17212b!important;border-color:#cbd5e1!important
}
.login-card :is(input,textarea)::placeholder,.auth-card :is(input,textarea)::placeholder{color:#718096!important}
.login-card label,.auth-card label{color:#374151}
.login-card h1,.auth-card h1{color:#17212b}

/* Tastatur / Barrierefreiheit */
:where(a,button,input,select,textarea,summary):focus-visible{
 outline:3px solid var(--ui-focus)!important;
 outline-offset:3px!important
}
html[data-resolved-theme] ::selection{background:#1769e8;color:#fff}


/* ==========================================================================
   V11.36 – moderne Formulare
   ========================================================================== */
html[data-resolved-theme] :is(.formgrid,.profile-fields,.provider-form,.user-form-grid) label{
 display:grid;gap:7px;font-size:12px;font-weight:750;color:var(--theme-text-soft)
}
html[data-resolved-theme] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
 min-height:44px;
 border:1px solid var(--theme-border)!important;
 border-radius:10px!important;
 padding:10px 12px!important;
 box-sizing:border-box;
 background:var(--theme-input)!important;
 color:var(--theme-text)!important;
 box-shadow:0 1px 2px rgba(15,23,42,.025);
 transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
html[data-resolved-theme] textarea{min-height:100px;line-height:1.5;resize:vertical}
html[data-resolved-theme] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):hover{
 border-color:#9caabd!important
}
html[data-resolved-theme] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{
 border-color:#4f8ff7!important;
 box-shadow:0 0 0 3px rgba(23,105,232,.13)!important;
 outline:none!important
}
html[data-resolved-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{
 box-shadow:0 0 0 3px rgba(102,163,255,.18)!important
}
html[data-resolved-theme] input[type=file]{
 min-height:52px!important;padding:6px!important;border-style:dashed!important;
 background:var(--theme-surface-soft)!important
}
html[data-resolved-theme] input[type=file]::file-selector-button{
 min-height:36px;border:0!important;border-radius:7px!important;padding:8px 13px!important;
 background:var(--theme-primary-soft)!important;color:var(--theme-primary)!important;font-weight:750
}
html[data-resolved-theme] select{
 padding-right:36px!important;
 background-color:var(--theme-input)!important
}
html[data-resolved-theme] .profile-fields{gap:16px 18px}
html[data-resolved-theme] .profile-section{padding-block:2px}
html[data-resolved-theme] .profile-section-title{margin-bottom:15px}
html[data-resolved-theme] .profile-divider{height:1px;border:0;margin:24px 0}
html[data-resolved-theme] .formgrid.nested{
 padding:16px;border:1px solid var(--theme-border);border-radius:12px;
 background:var(--theme-surface-soft);gap:13px
}
html[data-resolved-theme] .category-extra,
html[data-resolved-theme] .category-profile{
 border:1px solid var(--theme-border);border-radius:14px;padding:16px;
 background:var(--theme-surface)
}
html[data-resolved-theme] .extra-title{font-size:13px;font-weight:850;margin-bottom:10px;color:var(--theme-text)}
html[data-resolved-theme] .measurement-chart{border-color:var(--theme-border);background:var(--theme-surface-soft)}
html[data-resolved-theme] .metric-highlight{background:var(--theme-primary-soft);color:var(--theme-text);border-color:var(--theme-primary)}
html[data-resolved-theme] .stats{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
html[data-resolved-theme] .stat{background:var(--theme-surface);border-color:var(--theme-border)}
html[data-resolved-theme] .stat small{color:var(--theme-muted)}
html[data-resolved-theme] .stat strong{color:var(--theme-text)}
@media(max-width:720px){
 html[data-resolved-theme] :is(.profile-fields,.formgrid,.formgrid.nested){grid-template-columns:1fr!important}
}


/* V11.37 – Löschen & Datenschutzexport */
.row-actions,.danger-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.inline-delete-form,.danger-actions form{display:inline-flex;margin:0}
.button.danger{background:#b42318!important;color:#fff!important;border-color:#b42318!important}
.button.danger:hover{background:#912018!important;color:#fff!important}
.self-delete-note{font-size:11px;color:var(--theme-muted);padding:5px 8px}
.danger-zone{border-color:color-mix(in srgb,#b42318 35%,var(--theme-border))!important}
.export-select-form{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:12px;align-items:end}
.export-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}
.export-info-grid>div{display:grid;gap:4px;padding:14px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface-soft)}
.export-info-grid span{font-size:12px;color:var(--theme-muted)}
@media(max-width:720px){.export-select-form,.export-info-grid{grid-template-columns:1fr}}

/* V11.38 – Benutzerliste: klarer Kontrast */
html[data-resolved-theme] .table-wrap table{background:var(--theme-surface);color:var(--theme-text)}
html[data-resolved-theme] .table-wrap th{color:var(--theme-muted)!important;background:var(--theme-surface-soft)!important;font-weight:800}
html[data-resolved-theme] .table-wrap td{color:var(--theme-text)!important;background:var(--theme-surface)!important;border-color:var(--theme-border)!important}
html[data-resolved-theme] .table-wrap tbody tr:hover td{background:var(--theme-surface-hover)!important}
html[data-resolved-theme] .user-table-person strong{color:var(--theme-text)!important}
html[data-resolved-theme] :is(.role-badge,.status-badge,.unlimited-badge){display:inline-flex;align-items:center;min-height:25px;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:800;border:1px solid transparent;white-space:nowrap}
html[data-resolved-theme] .role-user{background:#eaf2ff!important;color:#174ea6!important;border-color:#c8daf8!important}
html[data-resolved-theme] .role-admin{background:#eee9ff!important;color:#5134a3!important;border-color:#d8cff8!important}
html[data-resolved-theme] .status-active{background:#e9f8ef!important;color:#17663a!important;border-color:#c7ead5!important}
html[data-resolved-theme] .status-inactive{background:#f2f4f7!important;color:#475467!important;border-color:#dfe3e8!important}
html[data-resolved-theme] .unlimited-badge{background:var(--theme-surface-soft)!important;color:var(--theme-text-soft)!important;border-color:var(--theme-border)!important}
html[data-resolved-theme="dark"] .role-user{background:#17345f!important;color:#b9d6ff!important;border-color:#28518a!important}
html[data-resolved-theme="dark"] .role-admin{background:#312653!important;color:#d8ccff!important;border-color:#4c3d78!important}
html[data-resolved-theme="dark"] .status-active{background:#143526!important;color:#a8e6bf!important;border-color:#23583d!important}
html[data-resolved-theme="dark"] .status-inactive{background:#263244!important;color:#c1cad7!important;border-color:#3b4a60!important}
html[data-resolved-theme] .self-delete-note{color:var(--theme-muted)!important;white-space:nowrap}
html[data-resolved-theme] .row-actions .button.secondary{color:var(--theme-text)!important;background:var(--theme-surface-soft)!important;border-color:var(--theme-border)!important}


/* ==========================================================================
   V11.39 – Theme-Feinschliff für Vertragsakte und farbige Komponenten
   Pastellflächen werden im Dunkelmodus nicht mehr aus den Hellmodus-Farben
   übernommen. Gleichzeitig bleiben Abschnittsfarben als Akzent erkennbar.
   ========================================================================== */

/* Basis-Tabs */
html[data-resolved-theme] .modern-tabs{
 background:var(--theme-surface)!important;
 border-color:var(--theme-border)!important;
}
html[data-resolved-theme] .modern-tabs a{
 background:var(--theme-surface-soft)!important;
 color:var(--theme-text-soft)!important;
 border:1px solid var(--theme-border)!important;
}
html[data-resolved-theme] .modern-tabs a:hover{
 background:var(--theme-surface-hover)!important;
 color:var(--theme-primary)!important;
}
html[data-resolved-theme] .modern-tabs a.active{
 background:#1769e8!important;
 color:#fff!important;
 border-color:#1769e8!important;
}
html[data-resolved-theme="dark"] .modern-tabs a{
 background:#162235!important;
 color:#c7d2e2!important;
 border-color:#2d3c52!important;
}
html[data-resolved-theme="dark"] .modern-tabs a:hover{
 background:#1d3049!important;
 color:#cfe2ff!important;
}
html[data-resolved-theme="dark"] .modern-tabs a.active{
 background:#1769e8!important;
 color:#fff!important;
 border-color:#4389ef!important;
}

/* Vertragsakte – Grundflächen */
html[data-resolved-theme] .contract-section{
 background:var(--theme-surface)!important;
 border-color:var(--theme-border)!important;
}
html[data-resolved-theme] .contract-section-body,
html[data-resolved-theme] .contract-field,
html[data-resolved-theme] .contract-field-grid{
 color:var(--theme-text)!important;
 border-color:var(--theme-border)!important;
}
html[data-resolved-theme] .contract-field-grid{background:var(--theme-border)!important}
html[data-resolved-theme] .contract-field{background:var(--theme-surface)!important}
html[data-resolved-theme] .contract-field span{color:var(--theme-muted)!important}
html[data-resolved-theme] .contract-field strong{color:var(--theme-text)!important}

/* Abschnittsköpfe: dezente Akzentflächen statt greller Pastellbalken */
html[data-resolved-theme] .contract-section-head{
 border-bottom:1px solid var(--theme-border)!important;
}
html[data-resolved-theme] .contract-section.blue .contract-section-head{
 background:#eaf3ff!important;color:#145bc1!important
}
html[data-resolved-theme] .contract-section.teal .contract-section-head{
 background:#e7f7f5!important;color:#08766d!important
}
html[data-resolved-theme] .contract-section.purple .contract-section-head{
 background:#f1ecff!important;color:#6941c6!important
}
html[data-resolved-theme] .contract-section.green .contract-section-head{
 background:#eaf8ef!important;color:#187443!important
}
html[data-resolved-theme] .contract-section.orange .contract-section-head{
 background:#fff3e3!important;color:#a4510c!important
}
html[data-resolved-theme] .contract-section.red .contract-section-head{
 background:#fff0f0!important;color:#a52a2a!important
}
html[data-resolved-theme] .contract-section.gray .contract-section-head{
 background:#f2f4f7!important;color:#475467!important
}

html[data-resolved-theme="dark"] .contract-section.blue .contract-section-head{
 background:#142d4f!important;color:#9fc7ff!important
}
html[data-resolved-theme="dark"] .contract-section.teal .contract-section-head{
 background:#123a3a!important;color:#8edbd3!important
}
html[data-resolved-theme="dark"] .contract-section.purple .contract-section-head{
 background:#30264d!important;color:#c9b8ff!important
}
html[data-resolved-theme="dark"] .contract-section.green .contract-section-head{
 background:#173727!important;color:#99dfb3!important
}
html[data-resolved-theme="dark"] .contract-section.orange .contract-section-head{
 background:#402c17!important;color:#f3c083!important
}
html[data-resolved-theme="dark"] .contract-section.red .contract-section-head{
 background:#421f25!important;color:#ffb0b0!important
}
html[data-resolved-theme="dark"] .contract-section.gray .contract-section-head{
 background:#243145!important;color:#c3cede!important
}

/* Einige ältere Vertragsabschnitte nutzen feste Klassen ohne Farbnamen */
html[data-resolved-theme="dark"] :is(
 .section-blue,.section-teal,.section-purple,.section-green,.section-orange,
 .section-yellow,.section-red,.section-gray
){
 color:var(--theme-text)!important;
 border-color:var(--theme-border)!important;
}

/* Kompakte Listen und leere Zustände */
html[data-resolved-theme] .compact-list,
html[data-resolved-theme] .compact-list li,
html[data-resolved-theme] .empty-state{
 background:var(--theme-surface)!important;
 color:var(--theme-text)!important;
 border-color:var(--theme-border)!important;
}
html[data-resolved-theme] .compact-list li:hover{background:var(--theme-surface-hover)!important}
html[data-resolved-theme] .empty-state{color:var(--theme-muted)!important}

/* Details / Aufklappbereiche */
html[data-resolved-theme] .contract-add{
 background:var(--theme-surface)!important;
 color:var(--theme-text)!important;
 border-color:var(--theme-border)!important;
}
html[data-resolved-theme] .contract-add summary{
 color:var(--theme-primary)!important;
 background:var(--theme-surface)!important;
}
html[data-resolved-theme] .contract-add[open] summary{
 background:var(--theme-surface-soft)!important;
}

/* Allgemeine Karten mit alten hart codierten hellen Hintergründen */
html[data-resolved-theme="dark"] :is(
 .calendar-sync-panel,.calendar-subscription-card,.report-selector,
 .provider-preview,.category-profile,.provider-contract-box,.privacy-card,
 .privacy-legal-section,.version-current,.changelog-entry
){
 background:var(--theme-surface)!important;
 color:var(--theme-text)!important;
 border-color:var(--theme-border)!important;
}

/* Badges / Zähler in Tabs und Karten */
html[data-resolved-theme] :is(.count-badge,.tab-count){
 background:var(--theme-surface-hover)!important;
 color:var(--theme-text-soft)!important;
 border-color:var(--theme-border)!important;
}
html[data-resolved-theme] .modern-tabs a.active :is(.count-badge,.tab-count){
 background:rgba(255,255,255,.18)!important;color:#fff!important;border-color:rgba(255,255,255,.28)!important
}

/* Tabellenzellen dürfen im Dunkelmodus keine alten hellen Flächen behalten */
html[data-resolved-theme="dark"] :is(table,thead,tbody,tfoot,tr,th,td){
 border-color:var(--theme-border);
}
html[data-resolved-theme="dark"] th{background:var(--theme-surface-soft);color:var(--theme-muted)}
html[data-resolved-theme="dark"] td{background:var(--theme-surface);color:var(--theme-text)}
html[data-resolved-theme="dark"] tbody tr:hover td{background:var(--theme-surface-hover)}

/* Karten-/Panelüberschriften allgemein */
html[data-resolved-theme="dark"] :is(.panel-head,.contracts-list-title,.contract-tree-head){
 color:var(--theme-text);
 border-color:var(--theme-border);
}

/* V11.41 – Telekommunikation & Dashboard-Datum */
.telecom-profile{display:grid;gap:14px}
.telecom-profile[hidden]{display:none!important}
.telecom-section{border:1px solid var(--theme-border);border-radius:13px;background:var(--theme-surface-soft);overflow:hidden}
.telecom-section h3{margin:0;padding:10px 14px;background:color-mix(in srgb,var(--theme-primary) 10%,var(--theme-surface));color:var(--theme-text);font-size:13px}
.telecom-section .formgrid.nested{border:0;border-radius:0;margin:0;background:transparent}
.check-card{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center!important;gap:9px!important;min-height:44px;padding:10px 12px;border:1px solid var(--theme-border);border-radius:10px;background:var(--theme-input);color:var(--theme-text)!important}
.check-card input{width:18px;height:18px;margin:0}
.dashboard-head-actions{display:flex;align-items:center;gap:12px}
.dashboard-date{display:grid;gap:1px;min-width:112px;padding:8px 12px;border:1px solid var(--theme-border);border-radius:11px;background:var(--theme-surface);text-align:right}
.dashboard-date span{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--theme-muted);font-weight:800}
.dashboard-date strong{font-size:14px;color:var(--theme-text)}
@media(max-width:650px){.dashboard-head-actions{width:100%;justify-content:space-between}.dashboard-date{text-align:left}}


/* V11.42 – Telekommunikation: Mobilfunk/SIM und editierbare Vorschlagsfelder */
.telecom-section input[list]{
 background-color:var(--theme-input)!important;
 color:var(--theme-text)!important;
 border-color:var(--theme-input-border)!important;
}
.telecom-section label small{
 display:block;
 margin-top:5px;
 color:var(--theme-muted);
 font-size:11px;
 line-height:1.35;
}
.telecom-section input[type="password"]{
 font-family:inherit;
 letter-spacing:.08em;
}

/* V11.43 – eigenständiges Hostingprofil */
.hosting-profile{display:grid;gap:14px}
.hosting-profile[hidden]{display:none!important}
.hosting-profile .telecom-section h3{background:color-mix(in srgb,#0f9f8f 12%,var(--theme-surface))}

/* V11.44 – Versicherungsprofil */
.insurance-profile{display:grid;gap:14px}.insurance-profile[hidden]{display:none!important}
.insurance-section{border:1px solid var(--theme-border);border-radius:13px;background:var(--theme-surface-soft);overflow:hidden}
.insurance-section h3{margin:0;padding:10px 14px;background:color-mix(in srgb,#0aa99d 12%,var(--theme-surface));color:var(--theme-text);font-size:13px}
.insurance-section .formgrid.nested{border:0;border-radius:0;margin:0;background:transparent}

/* V11.45 – Zahlung, Kommunikationscenter, 2FA */
.communication-preview{max-width:1100px}.communication-preview input,.communication-preview textarea{width:100%}.communication-text{min-height:360px;line-height:1.6;font-family:inherit}.communication-recipient{margin:14px 0;padding:12px 14px;border:1px solid var(--theme-border);border-radius:10px;background:var(--theme-surface-soft)}.communication-downloads{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.twofa-code{font-size:28px!important;letter-spacing:.35em;text-align:center;font-weight:800;min-height:58px}@media(max-width:700px){.communication-downloads .button{width:100%}}

/* V11.47 – Kommunikationscenter & Ansprechpartner */
.communication-preview{max-width:none;padding:24px}
.communication-head{align-items:flex-start;gap:18px}
.draft-status{padding:8px 12px;border:1px solid var(--theme-border);border-radius:999px;background:var(--theme-surface-soft);font-size:12px;white-space:nowrap}
.communication-preview form{display:grid;gap:16px}
.communication-subject,.communication-body{display:grid;gap:7px;font-weight:700}
.communication-subject input{font-size:16px;min-height:48px}
.communication-text{min-height:440px!important;resize:vertical;padding:18px!important;font-size:15px;line-height:1.65;background:var(--theme-input-bg)!important;color:var(--theme-text)!important}
.communication-recipient{display:flex;align-items:flex-start;gap:12px!important;padding:16px 18px!important}
.communication-recipient .recipient-icon{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:var(--theme-accent-soft);color:var(--theme-accent);font-size:18px}
.communication-recipient strong{display:block;margin:2px 0 4px;font-size:15px}
.export-area{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border:1px solid var(--theme-border);border-radius:13px;background:var(--theme-surface-soft)}
.export-area p{margin:4px 0 0}
.communication-downloads{margin:0!important}
.provider-contact-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,.8fr);gap:22px;align-items:start}
.contact-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
.contact-card{border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface);padding:15px;display:grid;gap:12px}
.contact-card-head{display:flex;gap:11px;align-items:center}.contact-avatar{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--theme-accent-soft);color:var(--theme-accent);font-weight:800}
.contact-lines{display:grid;gap:5px;font-size:13px}.contact-card-actions{display:flex;gap:8px;align-items:center}.contact-card-actions form{margin:0}
.contact-editor{border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface-soft);padding:18px;position:sticky;top:18px}.contact-editor h3{margin-top:0}
.provider-contact-select{display:grid;gap:6px;margin-top:10px}
.contract-field small{display:block;margin-top:4px;color:var(--theme-muted)}
@media(max-width:950px){.provider-contact-layout{grid-template-columns:1fr}.contact-editor{position:static}.export-area{align-items:stretch;flex-direction:column}.draft-status{white-space:normal}}

/* V11.48 */
.contact-scope{display:inline-flex;width:max-content;max-width:100%;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:750}.contact-scope.global{background:var(--theme-surface-soft);border:1px solid var(--theme-border);color:var(--theme-muted)}.contact-scope.specific{background:var(--theme-accent-soft);color:var(--theme-accent)}

/* V11.49 – Adminbereich, Konfiguration, Installation */
.admin-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}.admin-status-card{border:1px solid var(--theme-border);background:var(--theme-surface);border-radius:14px;padding:16px;display:grid;gap:4px}.admin-status-card span,.admin-status-card small{color:var(--theme-muted)}.admin-status-card strong{font-size:20px}
.admin-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.admin-menu-card{display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:14px;text-decoration:none;color:var(--theme-text);background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:15px;padding:18px;transition:.15s}.admin-menu-card:hover{border-color:var(--theme-accent);transform:translateY(-1px)}.admin-menu-card strong,.admin-menu-card small{display:block}.admin-menu-card small{margin-top:4px;color:var(--theme-muted)}.admin-menu-card>b{font-size:20px;color:var(--theme-accent)}.admin-menu-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:12px;background:var(--theme-accent-soft);font-size:20px}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.settings-span-2{grid-column:1/-1}.license-pill{padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}.license-pill.ok{background:#dff7e7;color:#176b37}.license-pill.basic{background:var(--theme-surface-soft);color:var(--theme-muted)}.license-ok{display:grid;gap:4px;padding:14px;border-radius:12px;background:var(--theme-accent-soft)}.plain-fieldset{border:0;padding:0;margin:0;min-width:0}.plain-fieldset:disabled{opacity:.55}.protected-toggle small{display:block;margin-left:8px;color:var(--theme-muted)}
.installer-page{min-height:100vh;background:var(--theme-bg,#f4f7fb);padding:32px 16px;color:var(--theme-text,#102033)}.installer-shell{width:min(900px,100%);margin:auto}.installer-brand{display:flex;align-items:center;gap:18px;margin-bottom:20px}.installer-brand img{width:72px;height:72px;object-fit:contain}.installer-brand span{font-size:12px;font-weight:800;letter-spacing:.14em;color:#1769e8}.installer-brand h1{margin:3px 0}.installer-brand p{margin:0;color:#5d6d82}.install-card{background:#fff;color:#102033;border:1px solid #d8e0ea;border-radius:18px;padding:26px;box-shadow:0 12px 35px rgba(26,44,72,.08)}.install-card input,.install-card select{background:#fff!important;color:#102033!important;border:1px solid #bdc9d8!important}.install-step{display:flex;gap:13px;align-items:flex-start;margin:8px 0 15px}.install-step>span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e8f1ff;color:#1769e8;font-weight:900}.install-step h2{margin:0}.install-step p{margin:4px 0 0;color:#66758a}.install-note{margin:20px 0;padding:14px 16px;border-radius:12px;background:#f4f7fb;border:1px solid #d8e0ea}.install-button{width:100%;min-height:48px}.install-success{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:#dff7e7;color:#176b37;font-size:26px;font-weight:900;margin-bottom:14px}
@media(max-width:800px){.admin-status-grid,.admin-menu-grid,.settings-grid{grid-template-columns:1fr}.settings-span-2{grid-column:auto}}

/* V11.50 */
.remember-device{display:flex!important;gap:11px;align-items:flex-start;padding:13px 14px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface-soft);margin:4px 0 14px}.remember-device input{width:18px!important;height:18px!important;margin-top:2px}.remember-device span,.remember-device small{display:block}.remember-device small{margin-top:4px;color:var(--theme-muted);line-height:1.4}

/* V11.51 – vollständige Admin-Konfiguration */
.config-jumpbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.config-jumpbar a{text-decoration:none;color:var(--theme-text);background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:999px;padding:8px 12px;font-size:13px;font-weight:700}.config-jumpbar a:hover{border-color:var(--theme-accent);color:var(--theme-accent)}
.config-stack{display:grid;gap:16px;max-width:1120px}.config-card{width:100%;box-sizing:border-box}.config-card .formgrid{align-items:start}.config-toggle-box{display:flex;min-height:72px;padding:12px 14px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface-soft)}.config-toggle-box .check-label{margin:0;align-items:flex-start}.config-toggle-box .check-label span,.config-toggle-box .check-label small{display:block}.config-toggle-box .check-label small{margin-top:4px;color:var(--theme-muted);line-height:1.45}.config-info{margin-top:14px;padding:12px 14px;border-radius:11px;background:var(--theme-surface-soft);border:1px solid var(--theme-border);color:var(--theme-muted);font-size:13px;line-height:1.5}.license-entry{max-width:620px}

/* V11.53 – aufgeräumte Konfiguration */
.config-form{display:grid;gap:12px;max-width:860px}.config-field{display:grid;gap:7px;max-width:520px}.config-field>span{font-weight:750}.config-option-row{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:76px;padding:14px 16px;border:1px solid var(--theme-border);border-radius:13px;background:var(--theme-surface-soft)}.config-option-copy{display:grid;gap:4px;min-width:0}.config-option-copy strong{font-size:14px}.config-option-copy small{color:var(--theme-muted);line-height:1.45}.config-actions{margin-top:18px}.switch-control{position:relative;display:inline-flex!important;flex:0 0 auto;width:48px;height:28px;margin:0!important}.switch-control input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important}.switch-slider{position:absolute;inset:0;border-radius:999px;background:#b9c4d2;transition:.18s;cursor:pointer}.switch-slider:before{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transition:.18s}.switch-control input:checked+.switch-slider{background:var(--theme-accent)}.switch-control input:checked+.switch-slider:before{transform:translateX(20px)}.switch-control input:focus-visible+.switch-slider{outline:3px solid var(--theme-accent-soft);outline-offset:2px}
@media(max-width:650px){.config-option-row{align-items:flex-start}.switch-control{margin-top:2px!important}.config-jumpbar{gap:6px}.config-jumpbar a{padding:7px 10px}}

/* V11.56 – Lizenzinformationen */
.license-meta-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px;margin:14px 0}.license-meta-grid>div{display:grid;gap:4px;padding:12px 13px;border:1px solid var(--theme-border);border-radius:11px;background:var(--theme-surface-soft)}.license-meta-grid span{font-size:12px;color:var(--theme-muted)}.license-meta-grid strong{font-size:14px;overflow-wrap:anywhere}@media(max-width:900px){.license-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.license-meta-grid{grid-template-columns:1fr}}

/* V11.57 – mobile Navigation und Inhaltsbreite */
.mobile-appbar,.mobile-nav-backdrop{display:none}
@media(max-width:850px){
 html,body{max-width:100%;overflow-x:hidden}
 body>.layout{display:block!important;min-height:100vh!important}
 .mobile-appbar{position:sticky;top:0;z-index:1200;display:flex;align-items:center;gap:12px;height:58px;padding:7px 12px;background:var(--theme-sidebar,#111827);color:#fff;border-bottom:1px solid rgba(255,255,255,.09);box-shadow:0 3px 14px rgba(15,23,42,.12)}
 .mobile-menu-button{display:flex;align-items:center;justify-content:center;gap:4px;flex-direction:column;width:44px;height:42px;padding:7px;border:0;border-radius:9px;background:rgba(255,255,255,.09);color:#fff;cursor:pointer}
 .mobile-menu-button span{display:block;width:20px;height:2px;border-radius:2px;background:currentColor}.mobile-menu-button b{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
 .mobile-app-title{display:grid;min-width:0;line-height:1.15}.mobile-app-title strong{font-size:15px}.mobile-app-title small{margin-top:3px;color:#aebbd0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body>.layout>.app-sidebar{position:fixed!important;z-index:1300!important;inset:0 auto 0 0!important;display:flex!important;width:min(82vw,310px)!important;min-width:0!important;max-width:310px!important;height:100dvh!important;min-height:100dvh!important;padding:16px 12px!important;transform:translateX(-105%);transition:transform .2s ease;box-shadow:12px 0 35px rgba(0,0,0,.25);overflow-y:auto!important}
 body.mobile-nav-open>.layout>.app-sidebar{transform:translateX(0)}
 .mobile-nav-backdrop{position:fixed;z-index:1250;inset:0;display:block;background:rgba(8,15,28,.55);backdrop-filter:blur(2px)}
 .mobile-nav-backdrop[hidden]{display:none!important}
 body.mobile-nav-open{overflow:hidden}
 .app-sidebar .sidebar-top{display:flex!important;align-items:center!important;gap:10px!important;margin-bottom:8px!important}
 .app-sidebar .sidebar-top .menu-logo{width:48px!important;height:48px!important;min-width:48px!important;margin:0!important}
 .app-sidebar .sidebar-top .menu-logo img{width:48px!important;height:48px!important;max-width:48px!important}
 .app-sidebar .brand{font-size:17px!important;padding:0!important}
 .app-sidebar nav{display:block!important}
 .app-sidebar .nav-group{margin:0 0 10px!important}
 .app-sidebar .nav-group a{display:block!important;width:100%!important;padding:10px 11px!important;text-align:left!important;font-size:13px!important}
 .app-sidebar .nav-label{font-size:10px!important;margin:10px 10px 4px!important}
 .app-sidebar .userbox{margin-top:auto!important}
 .app-sidebar .sidebar-footer{flex-direction:column!important;gap:4px!important}
 body>.layout>main{width:100%!important;max-width:100%!important;padding:14px 12px 28px!important;overflow:hidden!important}
 main>header{align-items:flex-start!important;gap:12px!important;margin-bottom:15px!important;flex-wrap:wrap!important}
 main>header h1{font-size:23px!important}
 .panel{padding:14px!important;margin-bottom:14px!important;border-radius:11px!important}
 .stats{gap:10px!important}.stat{padding:14px!important}
 .formgrid,.form-grid,.compact-row,.provider-picker{grid-template-columns:1fr!important;display:grid!important;width:100%!important;min-width:0!important}
 .formgrid>* ,.form-grid>* ,.compact-row>*{min-width:0!important;max-width:100%!important}
 input,select,textarea{max-width:100%!important}
 .button{max-width:100%}
 .table-wrap,.contracts-table-wrap,.panel:has(>table){overflow-x:auto!important;-webkit-overflow-scrolling:touch}
 table{min-width:680px}
 .contract-tree-layout,.contracts-layout,.provider-contact-layout{grid-template-columns:1fr!important}
 .contract-tree,.contracts-tree{max-height:300px;overflow:auto}
 .modern-tabs{overflow-x:auto!important;flex-wrap:nowrap!important;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
 .modern-tabs a{white-space:nowrap!important;flex:0 0 auto!important}
 .communication-text{min-height:300px!important}
}
@media(max-width:430px){
 body>.layout>main{padding-left:9px!important;padding-right:9px!important}
 .panel{padding:12px!important}
 header .button{width:100%;text-align:center}
}

/* V11.59 – Anbieter direkt in der Vertragserfassung bearbeiten */
.inline-provider-editor{margin-top:12px;border:1px solid var(--theme-border);border-radius:13px;padding:15px;background:var(--theme-surface-soft)}
.inline-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.inline-editor-head h3{margin:0 0 4px}.inline-editor-head .field-hint{margin:0}.inline-provider-editor .full{grid-column:1/-1}.success-text{color:#18794e;font-weight:700}
@media(max-width:650px){.inline-editor-head{flex-direction:column}.inline-editor-head .button{width:100%}}

/* V11.60 – Mobilfunk Familienkarten */
.mobile-family-cards{margin-top:10px;padding:14px;border:1px solid var(--theme-border);border-radius:13px;background:var(--theme-surface-soft)}.family-cards-head,.family-card-title,.family-card-view-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.family-cards-head{margin-bottom:10px}.family-card-row{padding:14px;margin-top:10px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface)}.family-card-title{margin-bottom:10px}.family-card-view-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.family-card-view{padding:14px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface-soft)}.family-card-view-head{padding-bottom:9px;margin-bottom:9px;border-bottom:1px solid var(--theme-border)}.family-card-view-head span,.count-badge{font-size:12px;padding:3px 8px;border-radius:999px;background:var(--theme-surface);color:var(--theme-muted)}.family-card-view dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px;margin:0}.family-card-view dt{font-size:11px;color:var(--theme-muted);margin-bottom:2px}.family-card-view dd{margin:0;overflow-wrap:anywhere}.family-card-view .full{grid-column:1/-1}@media(max-width:760px){.family-card-view-grid{grid-template-columns:1fr}.family-cards-head{align-items:flex-start;flex-direction:column}.family-cards-head .button{width:100%}.family-card-view dl{grid-template-columns:1fr}}

/* V11.63 – Ansprechpartner direkt am Vertrag */
.provider-contact-tools{display:flex;gap:8px;flex-wrap:wrap;margin:7px 0 10px}.contract-contact-editor{margin:8px 0 14px;padding:14px;border:1px solid var(--theme-border);border-radius:13px;background:var(--theme-surface-soft)}.contact-customer-toggle{display:flex;align-items:center;gap:8px;margin:10px 0}.contact-customer-toggle input{width:auto}@media(max-width:650px){.provider-contact-tools .button{width:100%}}

/* V11.64 – klare Anbieter-/Ansprechpartner-Aktionen */
.provider-action-group{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 12px;padding:9px 11px;border:1px solid var(--theme-border);border-radius:10px;background:var(--theme-surface-soft)}
.provider-action-label{font-size:12px;font-weight:700;color:var(--theme-muted)}
.provider-action-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.provider-action-buttons .button{margin:0}
.contact-actions{margin-top:7px}
@media(max-width:700px){
 .provider-action-group{align-items:stretch;flex-direction:column}
 .provider-action-buttons{display:grid;grid-template-columns:1fr}
 .provider-action-buttons .button{width:100%}
}

/* V11.65 – Anbieteraktionen direkt bei der Anbieterauswahl */
.provider-actions{margin-top:10px;margin-bottom:18px}
.contact-actions{margin-top:9px;margin-bottom:12px}

/* V11.68 – Energieformular */
#profile-energy .formgrid.nested > label{align-self:start}
#profile-energy input[name="meter_number"]{min-height:44px;height:44px}

/* V26.70 – Kommunikationsdateien */
.communication-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.communication-row-actions form{margin:0}.danger-action{border-color:#e8b8b8!important;color:#a52a2a!important}.communication-row small{display:block;margin-top:4px;color:var(--theme-muted)}
@media(max-width:650px){.communication-row{align-items:flex-start!important}.communication-row-actions{width:100%;margin-top:8px}.communication-row-actions .button{flex:1;text-align:center}}

/* V26.71 – kompakte Kommunikationsrubrik */
#kommunikation .communication-list{max-height:320px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:7px}
#kommunikation .communication-row{min-height:58px;padding:10px 4px;align-items:center}
#kommunikation .communication-row-content{min-width:0;flex:1}
#kommunikation .communication-row-content strong,#kommunikation .communication-row-content span,#kommunikation .communication-row-content small{overflow-wrap:anywhere}
#kommunikation .communication-row-actions{display:flex;align-items:center;gap:5px;flex:0 0 auto}
#kommunikation .communication-row-actions form{margin:0}
#kommunikation .comm-action{min-height:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 9px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-surface-soft);color:var(--theme-text);font:inherit;font-size:11px;font-weight:700;line-height:1;text-decoration:none;cursor:pointer;box-shadow:none}
#kommunikation .comm-action:hover{background:var(--theme-surface-hover);color:var(--theme-primary);border-color:var(--theme-primary)}
#kommunikation .comm-action-delete{color:#a13b35;background:transparent;border-color:transparent}
#kommunikation .comm-action-delete:hover{background:#fff2f1;color:#8f241e;border-color:#f0c3bf}
#kommunikation .contract-add{position:relative;z-index:1;background:var(--theme-surface)}
@media(max-width:650px){
 #kommunikation .communication-list{max-height:280px;padding-right:4px}
 #kommunikation .communication-row{align-items:flex-start!important}
 #kommunikation .communication-row-actions{width:auto;margin-top:0}
 #kommunikation .comm-action{width:32px;padding:0}
 #kommunikation .comm-action span:last-child{display:none}
}

/* V26.73 – Auswertungen, Lizenzstatus und Vertragskopf */
.report-created-meta{margin-top:7px;font-size:12px;color:var(--theme-muted)}
.report-result{position:relative;overflow:hidden}.report-license-watermark{position:fixed;left:50%;top:52%;transform:translate(-50%,-50%) rotate(-28deg);font-size:54px;font-weight:850;letter-spacing:2px;color:rgba(90,105,125,.10);z-index:4;pointer-events:none;white-space:nowrap}
.cost-report-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}.cost-table-wrap{min-width:0;overflow:auto}.cost-chart-card{border:1px solid var(--theme-border);border-radius:14px;padding:16px;background:var(--theme-surface-soft)}.cost-chart-card h3{margin:0 0 14px}.cost-pie{width:190px;aspect-ratio:1;border-radius:50%;margin:0 auto 18px;display:grid;place-items:center;position:relative}.cost-pie:after{content:"";position:absolute;width:58%;height:58%;border-radius:50%;background:var(--theme-surface)}.cost-pie span{position:relative;z-index:1;font-size:12px;font-weight:800}.cost-legend{display:grid;gap:8px}.cost-legend>div{display:grid;grid-template-columns:10px 1fr auto;gap:7px;align-items:center;font-size:11px}.cost-legend i{width:10px;height:10px;border-radius:3px}.report-overview-table{font-size:11px}.contract-head-actions-wrap{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.contract-last-change{font-size:11px;color:var(--theme-muted);text-align:right}.disabled-button{opacity:.48;cursor:not-allowed;user-select:none}
@media(max-width:900px){.cost-report-layout{grid-template-columns:1fr}.cost-chart-card{max-width:420px}.contract-head-actions-wrap{align-items:stretch}.contract-last-change{text-align:left}}
@media print{
 .report-created-meta{display:block!important}.report-license-watermark{position:fixed!important;font-size:46pt!important;color:rgba(80,90,105,.12)!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .cost-report-layout{grid-template-columns:1fr 230px!important}.cost-chart-card{break-inside:avoid}.cost-pie{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .report-overview-table{font-size:8.5pt}.report-overview-table th,.report-overview-table td{padding:5px!important}
}

/* V26.74 – lesbare Kostenfaktoren + eigenständiges Druck/PDF-Layout */
.cost-chart-card{background:#fff!important;color:#172033!important;border-color:#d5dde8!important}
.cost-chart-card h3,.cost-chart-card span,.cost-chart-card strong{color:#172033!important}
.cost-chart-card .cost-legend>div{color:#334155!important}
.cost-pie:after{background:#fff!important}
.cost-pie span{color:#172033!important}
.report-print-header,.report-print-footer,.print-contract-dossier,.print-cost-report{display:none}

@media print{
 @page{size:A4 portrait;margin:18mm 12mm 18mm 12mm}
 html,body{background:#fff!important;color:#111!important;font-family:Arial,Helvetica,sans-serif!important}
 body{font-size:9pt!important}
 .report-selector,.screen-report-overview,.cost-report-layout,body>.layout>aside,main>header{display:none!important}
 .report-result{display:block!important;overflow:visible!important;border:0!important;padding:0!important;background:#fff!important}
 .report-print-header{display:flex!important;justify-content:space-between;align-items:center;margin:0 0 8mm;padding:3mm 1mm;border-bottom:7mm solid #d0d0d0;color:#009ee3}
 .report-print-title{font-size:16pt;font-weight:800}.report-print-meta{font-size:8pt;color:#555}
 .report-print-footer{display:flex!important;position:fixed;bottom:-12mm;left:0;right:0;justify-content:space-between;border-top:.3mm solid #bbb;padding-top:2mm;font-size:7.5pt;color:#555;background:#fff;z-index:20}
 .report-license-watermark{display:block!important;position:fixed!important;left:50%!important;top:48%!important;transform:translate(-50%,-50%) rotate(-30deg)!important;font-size:44pt!important;font-weight:800!important;color:rgba(70,85,105,.11)!important;z-index:15!important;pointer-events:none!important;white-space:nowrap!important}
 .print-contract-dossier,.print-cost-report{display:block!important}
 .print-customer-head{display:flex;align-items:center;gap:4mm;margin:5mm 0 4mm;break-after:avoid}.print-customer-head h2{margin:0;font-size:15pt;color:#111}.print-person-icon{width:9mm;height:9mm;border-radius:50%;display:grid;place-items:center;background:#08a7df;color:#fff;font-size:0}
 .print-person-icon:after{content:"●";font-size:15pt;color:#fff}
 .print-contract-card{display:grid;grid-template-columns:42mm 1fr;gap:6mm;padding:3.5mm 0;border-bottom:.25mm solid #ddd;break-inside:avoid}
 .print-contract-name{display:flex;align-items:flex-start;gap:3mm;font-size:10pt}.print-contract-name>span{width:7mm;height:7mm;border-radius:50%;display:grid;place-items:center;background:#16b8b1;color:#fff;font-weight:800}.print-contract-name strong{padding-top:1mm}
 .print-contract-data{display:grid;grid-template-columns:1fr 1fr;gap:1.5mm 5mm;font-size:8.3pt}.print-contract-data>div{display:grid;grid-template-columns:34mm 1fr;gap:2mm}.print-contract-data b{color:#555}.print-contract-data span{color:#111}.print-contract-data .print-wide{grid-column:1/-1}
 .print-cost-customer{break-before:auto;margin-bottom:8mm}.print-cost-customer table{width:100%;border-collapse:collapse;font-size:8.2pt}.print-cost-customer th{background:#f1f1f1!important;color:#111!important;text-align:left;border:.2mm solid #fff;padding:1.4mm}.print-cost-customer td{background:#f7f7f7!important;color:#111!important;border:.2mm solid #fff;padding:1.35mm;vertical-align:top}.print-cost-customer th:nth-last-child(-n+2),.print-cost-customer td:nth-last-child(-n+2){text-align:right}.print-cost-customer .print-total td{font-weight:800;background:#eee!important}
 .print-cost-report .print-customer-head{margin-top:4mm}
}

/* V26.77 – animiertes Kosten-Kreisdiagramm mit Segmentabständen */
.cost-pie-animated{background:#fff!important;overflow:hidden;isolation:isolate}
.cost-pie-animated:before{content:"";position:absolute;inset:0;border-radius:50%;background:var(--pie-gradient);transform:rotate(-90deg) scale(.15);opacity:0;animation:costPieReveal 1.8s cubic-bezier(.22,.8,.28,1) forwards;z-index:-2}
.cost-pie-animated:after{z-index:-1}
.cost-pie-animated span{z-index:2}
@keyframes costPieReveal{
 0%{transform:rotate(-90deg) scale(.15);opacity:0}
 55%{opacity:1}
 100%{transform:rotate(0deg) scale(1);opacity:1}
}
@media(prefers-reduced-motion:reduce){
 .cost-pie-animated:before{animation:none;transform:none;opacity:1}
}
@media print{
 .cost-pie-animated:before{animation:none!important;transform:none!important;opacity:1!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* V26.79 – gesperrte Lizenz */
.license-pill.blocked{background:#fff0f0!important;color:#b42318!important;border-color:#f3b4b0!important}
.license-blocked-notice{margin:14px 0}

/* v26.99 Girokonto */
.giro-profile{margin-top:14px}.giro-profile .panel{margin-top:12px}.giro-profile .giro-compact{display:grid;grid-template-columns:repeat(4,minmax(135px,1fr));gap:10px 14px}.giro-profile .giro-compact .wide{grid-column:span 2}.giro-profile .giro-compact .full-width{grid-column:1/-1}.giro-profile textarea{min-height:78px}.bottom-save{display:flex;justify-content:flex-end;margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}@media(max-width:1100px){.giro-profile .giro-compact{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.giro-profile .giro-compact{grid-template-columns:1fr}.giro-profile .giro-compact .wide{grid-column:auto}.bottom-save .button{width:100%}}

/* v26.102 – Girokonto Reparatur */
.giro-profile .giro-section{margin-top:12px}
.giro-profile .giro-section h2{margin:0 0 14px}
.giro-profile .giro-grid{
 display:grid;
 grid-template-columns:repeat(4,minmax(150px,1fr));
 gap:12px 14px;
 align-items:start
}
.giro-profile .giro-grid label{
 display:grid;
 gap:7px;
 font-size:12px;
 font-weight:750;
 color:var(--theme-text-soft)
}
.giro-profile .giro-iban{grid-column:span 2}
.giro-profile .giro-url{grid-column:span 2}
.formgrid > .giro-title-input{width:100%!important;max-width:420px!important;justify-self:start}
.is-girokonto > input[name="title"]{width:100%!important;max-width:420px!important;justify-self:start}
@media(max-width:1050px){
 .giro-profile .giro-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
 .giro-profile .giro-grid{grid-template-columns:1fr}
 .giro-profile .giro-iban,.giro-profile .giro-url{grid-column:auto}
 .formgrid > .giro-title-input,.is-girokonto > input[name="title"]{max-width:none!important}
}

/* v26.103 Girokonto-Erweiterungen */
.giro-options{display:flex;flex-wrap:wrap;gap:10px 12px}
.giro-options .check-card,.giro-toggle{width:auto;min-width:180px}
.giro-grid-top{margin-top:12px}
#partner-card-fields,#authorization-fields{margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}
#partner-card-fields h3{margin:0 0 12px}

/* v26.104 – Zusatzgebühren */
.fee-option-grid{display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:12px}
.fee-option{border:1px solid var(--border);border-radius:12px;padding:12px;background:rgba(255,255,255,.015);transition:border-color .18s,background .18s,transform .18s}
.fee-option:hover{border-color:rgba(80,145,235,.65)}
.fee-option.is-active{border-color:#2878e8;background:rgba(40,120,232,.08)}
.modern-check{display:flex!important;align-items:center;gap:10px;cursor:pointer;min-height:28px;font-weight:700!important}
.modern-check input{position:absolute;opacity:0;pointer-events:none}
.check-ui{width:21px;height:21px;flex:0 0 21px;border:1px solid #60718a;border-radius:6px;background:#0c1828;position:relative;transition:.18s}
.modern-check input:checked+.check-ui{background:#1672ea;border-color:#2d87fa}
.modern-check input:checked+.check-ui:after{content:"";position:absolute;left:6px;top:2px;width:6px;height:11px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}
.modern-check input:focus-visible+.check-ui{outline:2px solid #70aaff;outline-offset:2px}
.check-label{color:var(--theme-text)}
.fee-amount{margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}
.fee-amount label{display:grid;gap:6px}
.fee-amount input{max-width:170px}
@media(max-width:1050px){.fee-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.fee-option-grid{grid-template-columns:1fr}.fee-amount input{max-width:none}}

/* v26.105 – mehrere Kontovollmachten */
.authorization-master{margin-bottom:14px}
.authorization-list{display:grid;gap:12px}
.authorization-card{border:1px solid var(--border);border-radius:12px;padding:14px;background:rgba(255,255,255,.015)}
.authorization-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.authorization-card-head strong{font-size:14px}
.authorization-remove{padding:7px 10px!important;font-size:12px}
.authorization-add{margin-top:12px;display:inline-flex;align-items:center;gap:6px}
.authorization-view-row+.authorization-view-row{margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
.authorization-view-row h3{margin:0 0 10px;font-size:14px}
@media(max-width:650px){
 .authorization-card-head{align-items:flex-start}
 .authorization-remove{width:auto!important}
 .authorization-add{width:100%;justify-content:center}
}

/* v26.106 – Finanzen & Vorsorge */
.finance-profile{margin-top:14px}
.finance-profile .muted{margin:0 0 14px}
.finance-grid{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:12px 14px}
.finance-grid label{display:grid;gap:7px;font-size:12px;font-weight:750;color:var(--theme-text-soft)}
.finance-grid .finance-wide{grid-column:span 2}
@media(max-width:1100px){.finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.finance-grid{grid-template-columns:1fr}.finance-grid .finance-wide{grid-column:auto}}

/* v26.107 */
.finance-subsection{margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}

/* v26.109 – Energie & Versorgung */
.utility-subprofile h3{margin:4px 0 14px;font-size:16px}.utility-grid{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr));gap:12px 14px}.utility-grid label{display:grid;gap:7px;font-size:12px;font-weight:750;color:var(--theme-text-soft)}@media(max-width:1000px){.utility-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.utility-grid{grid-template-columns:1fr}}

/* v26.111 – Abfall / Straßenreinigung */
.waste-section-head,.waste-service-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px}
.waste-service-card,.waste-cleaning-box{border:1px solid var(--theme-border);border-radius:14px;padding:14px;margin-top:12px;background:rgba(255,255,255,.015)}
.check-card{display:flex!important;grid-template-columns:none!important;align-items:center;gap:12px;cursor:pointer}
.check-card input{width:20px;height:20px;accent-color:#1677ff}
.check-card span{display:grid;gap:2px}.check-card small{font-weight:400;opacity:.75}

/* v26.116 – Kombitarife Internet/Festnetz/TV */
.bundle-component{margin-top:14px;padding:14px;border:1px solid var(--theme-border);border-radius:14px;background:rgba(255,255,255,.018)}
.bundle-component h4{margin:0 0 12px}

/* v26.117 – Festnetz & Internet */
.bundle-choice-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
@media(max-width:760px){.bundle-choice-row{grid-template-columns:1fr}}

/* v26.120 – Abos, Medien & Software */
.subscription-profile{display:grid;gap:14px}
.subscription-profile[hidden]{display:none!important}
.subscription-section{margin:0}
.subscription-section[hidden]{display:none!important}
.subscription-section h3{margin:0 0 12px}
.subscription-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.subscription-grid label{min-width:0}
@media(max-width:1000px){.subscription-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.subscription-grid{grid-template-columns:1fr}}

.mobility-subprofile[hidden]{display:none!important}
.mobility-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:900px){.mobility-grid{grid-template-columns:1fr}}

.contract-form [hidden],
.form-grid [hidden],
label[hidden]{display:none!important}

.authority-subprofile[hidden]{display:none!important}
.authority-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.authority-grid .full{grid-column:1/-1}
@media(max-width:900px){.authority-grid{grid-template-columns:1fr}}

.special-subprofile[hidden]{display:none!important}
.special-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:900px){.special-grid{grid-template-columns:1fr}}

.logout-form{display:inline;margin:0;padding:0}.logout-button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0;text-decoration:underline}

/* v26.157: Profil und Abmelden in der Sidebar auf einer Zeile halten.
   Globale Mindesthoehe fuer Buttons darf die kompakte Logout-Aktion nicht vergroessern. */
.app-sidebar .userbox-links{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:12px;min-width:0;margin-top:6px}
.app-sidebar .userbox-links>a,.app-sidebar .userbox-links .logout-form{flex:0 0 auto;white-space:nowrap}
.app-sidebar .userbox-links .logout-form{display:inline-flex;align-items:center;width:auto;margin:0;padding:0}
.app-sidebar .userbox-links .logout-button{display:inline-block;width:auto;min-height:0!important;height:auto;line-height:1.35;margin:0;padding:0;border:0;background:transparent;color:var(--theme-sidebar-muted,#9ca3af);font:inherit;font-size:.75rem;text-decoration:none;vertical-align:baseline;cursor:pointer}
.app-sidebar .userbox-links .logout-button:hover,.app-sidebar .userbox-links>a:hover{color:#fff;text-decoration:underline}
