:root{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#172033;background:#f3f6fa;--nav:#16243b;--panel:#fff;--line:#dce3ec;--muted:#65738a;--accent:#1b6fd1;--danger:#b42318;--success:#177245}*{box-sizing:border-box}body{margin:0;background:#f3f6fa;color:#172033}a{color:var(--accent);text-decoration:none}input,select,textarea,button{font:inherit}input,select,textarea{width:100%;padding:.7rem .75rem;border:1px solid #c9d2df;border-radius:8px;background:#fff}textarea{min-height:110px;resize:vertical}button,.btn{display:inline-block;border:0;border-radius:8px;padding:.68rem 1rem;cursor:pointer;font-weight:650}.btn.primary{background:var(--accent);color:#fff}.btn.light{background:#edf2f8;color:#26364f}.btn.danger{background:#fee4e2;color:#b42318}.btn.small{padding:.4rem .65rem;font-size:.88rem}.app{display:grid;grid-template-columns:var(--sidebar-width,432px) minmax(0,1fr);min-height:100vh}.sidebar{background:var(--nav);color:#fff;padding:1.2rem}.brand{font-size:1.35rem;font-weight:800;margin-bottom:1.5rem}.nav a{display:block;color:#dce8f8;padding:.7rem .8rem;border-radius:8px;margin:.18rem 0}.nav a:hover,.nav a.active{background:#243b5c;color:#fff}.main{padding:1.5rem 2rem}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.2rem}.topbar h1{font-size:1.55rem;margin:0}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:1rem 1.1rem;margin-bottom:1rem;box-shadow:0 1px 2px rgba(0,0,0,.03)}.grid{display:grid;gap:1rem}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.span2{grid-column:span 2}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.stat{background:#fff;border:1px solid var(--line);border-radius:12px;padding:1rem}.stat b{font-size:1.65rem;display:block}.muted{color:var(--muted)}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:.72rem .6rem;border-bottom:1px solid #e7ebf0;vertical-align:top}th{font-size:.82rem;text-transform:uppercase;letter-spacing:.02em;color:#64748b}.actions{display:flex;gap:.5rem;flex-wrap:wrap}.alert{padding:.8rem 1rem;border-radius:8px;margin:.7rem 0}.alert.success{background:#e8f7ee;color:#17663b}.alert.danger{background:#feeceb;color:#9f1d17}.alert.info{background:#e9f3ff;color:#174e89}.badge{display:inline-block;padding:.2rem .5rem;border-radius:999px;font-size:.8rem;background:#e7edf5}.badge.final{background:#e7f6ec;color:#17663b}.badge.draft{background:#fff3d9;color:#835c00}.install{display:grid;place-items:center;min-height:100vh;padding:2rem}.install-card{width:min(760px,100%);background:#fff;border:1px solid var(--line);border-radius:14px;padding:1.5rem}fieldset{border:1px solid var(--line);border-radius:10px;margin:1rem 0;padding:1rem}legend{font-weight:750;padding:0 .4rem}label{display:block;font-weight:600}label input,label select,label textarea{margin-top:.35rem;font-weight:400}.right{text-align:right}.nowrap{white-space:nowrap}.doc-total{font-size:1.15rem;font-weight:750}.danger-text{color:var(--danger)}.print-only{display:none}@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{position:relative}.nav{display:flex;flex-wrap:wrap}.main{padding:1rem}.stats,.grid.two,.grid.three{grid-template-columns:1fr}.span2{grid-column:auto}}@media print{.sidebar,.topbar,.no-print,.actions{display:none!important}.app{display:block}.main{padding:0}.panel{border:0;box-shadow:none}.print-only{display:block}}

.badge.danger{background:#feeceb;color:#9f1d17}

.nav-logout{margin:0}.nav-logout button{display:block;width:100%;text-align:left;border:0;background:transparent;color:inherit;padding:.75rem 1rem;font:inherit;cursor:pointer}.nav-logout button:hover{background:rgba(255,255,255,.08)}
.field-help{display:block;margin-top:.4rem;color:var(--muted);font-size:.86rem;font-weight:400;line-height:1.35}.installer-actions{margin-top:1rem}

/* Faktura-Belegfilter 0.1.4 */
.document-filter-stats{margin-bottom:1rem}.stat-link{display:block;color:inherit;position:relative;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;background:#fff}.stat-link:hover{color:inherit;border-color:#9fb9d8;box-shadow:0 5px 16px rgba(23,32,51,.08);transform:translateY(-1px)}.stat-link:focus-visible{outline:3px solid rgba(27,111,209,.24);outline-offset:2px}.stat-link.is-active{border-color:var(--accent);box-shadow:0 0 0 2px rgba(27,111,209,.12)}.stat-link.is-active:after{content:"";position:absolute;left:14px;right:14px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--accent)}.stat-label{display:block;margin-bottom:.4rem;font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b}.stat-amount{display:block;margin-top:.28rem;font-size:.88rem;color:#42536d}.stat-link.danger-stat b,.stat-link.danger-stat .stat-amount{color:var(--danger)}.stat-link.danger-stat.is-active{border-color:#d66b63;box-shadow:0 0 0 2px rgba(180,35,24,.10)}.stat-link.danger-stat.is-active:after{background:var(--danger)}.document-list-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.55rem;padding:.1rem .1rem .45rem}
@media(max-width:900px){.document-filter-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.document-list-head{align-items:flex-start;flex-direction:column;gap:.15rem}}
@media(max-width:520px){.document-filter-stats{grid-template-columns:1fr}}

/* 0.1.5: kompakte Mouse-over-/Tastatur-Hilfen in der Positionserfassung */
.field-help{display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;margin-left:.28rem;padding:0;border:1px solid #b8c7d9;border-radius:50%;background:#eef4fb;color:#315b82;font-size:.72rem;font-weight:800;line-height:1;cursor:help;vertical-align:middle;position:relative;user-select:none}
.field-help:focus{outline:2px solid rgba(27,111,209,.28);outline-offset:2px}
.field-help::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 9px);transform:translateX(-50%) translateY(4px);width:max-content;max-width:min(340px,78vw);padding:.55rem .65rem;border-radius:7px;background:#172033;color:#fff;font-size:.78rem;font-weight:500;line-height:1.35;white-space:normal;box-shadow:0 8px 24px rgba(23,32,51,.2);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease,transform .14s ease;z-index:80}
.field-help::before{content:"";position:absolute;left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);border:6px solid transparent;border-top-color:#172033;opacity:0;visibility:hidden;transition:opacity .14s ease;z-index:81}
.field-help:hover::after,.field-help:focus::after{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
.field-help:hover::before,.field-help:focus::before{opacity:1;visibility:visible}
input[readonly][data-unit-code]{background:#f5f8fb;color:#52657a;cursor:default}

/* 0.1.6: erweiterte Einheitenauswahl */
[data-custom-unit][hidden]{display:none!important}

/* 0.1.7: Dashboard-Kacheln verwenden dieselbe anklickbare stat-link-Interaktion wie Belegfilter. */

/* 0.2.1 A1-Paritaet */
.a1-tabs{display:flex;gap:.35rem;margin:0 0 1rem;border-bottom:1px solid var(--line)}.a1-tab{border:1px solid var(--line);border-bottom:0;border-radius:7px 7px 0 0;background:#edf2f8;padding:.48rem .85rem;font-weight:800;cursor:pointer}.a1-tab.is-active{background:#fff}.a1-tab-panel{display:none}.a1-tab-panel.is-active{display:block}.inline-fields{display:grid;grid-template-columns:120px 1fr;gap:.45rem}.panel.inset{background:#f8fafc;border:1px solid #e1e6ec;box-shadow:none}.catalog-a1-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,.8fr);gap:1.2rem}.catalog-calc-card{border-left:1px solid var(--line);padding-left:1.2rem}.catalog-calc-card label{display:block;margin-bottom:.65rem}.print-template-layout{grid-template-columns:minmax(220px,300px) minmax(0,1fr);align-items:start}.print-editor-shell{margin:1rem 0;border:1px solid #ccd4df;border-radius:8px;background:#fff;overflow:auto}.print-visual-editor{min-height:520px;padding:22px;color:#172033}.print-source-editor{display:block;width:100%;min-height:520px;border:0;font:13px/1.45 ui-monospace,Consolas,monospace;padding:16px}.placeholder-grid{display:flex;flex-wrap:wrap;gap:.4rem}.placeholder-grid code{padding:.3rem .45rem;border:1px solid #d9e0e8;border-radius:5px;background:#f7f9fb}
@media(max-width:980px){.catalog-a1-layout,.print-template-layout{grid-template-columns:1fr}.catalog-calc-card{border-left:0;border-top:1px solid var(--line);padding-left:0;padding-top:1rem}}
.badge.paid{background:#e7f6ec;color:#17663b}.badge.partial{background:#fff3d9;color:#835c00}.badge.open{background:#e9f3ff;color:#174e89}.badge.overdue,.badge.reminder,.badge.cancelled{background:#feeceb;color:#9f1d17}

/* 0.2.5-alpha: A1-artig zusammengefasste Navigation */
.nav-home{font-weight:750;margin-bottom:.45rem!important}.nav-group{margin:.2rem 0}.nav-group>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:.7rem;color:#dce8f8;padding:.72rem .8rem;border-radius:8px;cursor:pointer;font-weight:720;user-select:none}.nav-group>summary::-webkit-details-marker{display:none}.nav-group>summary:hover{background:#203653;color:#fff}.nav-group[open]>summary{background:#1d314d;color:#fff}.nav-chevron{font-size:1.15rem;line-height:1;transition:transform .16s ease}.nav-group[open] .nav-chevron{transform:rotate(90deg)}.nav-sub{padding:.16rem 0 .3rem .5rem;border-left:1px solid rgba(220,232,248,.16);margin-left:.8rem}.nav-sub a{font-size:.93rem;padding:.56rem .72rem;margin:.08rem 0}.nav-sub a.active{box-shadow:inset 3px 0 0 #8bbcf4}.nav-logout{border-top:1px solid rgba(255,255,255,.12);margin-top:.85rem;padding-top:.65rem}@media(max-width:900px){.nav{display:block}.nav-group{width:100%}.nav-sub{margin-left:.45rem}.nav-home{margin-bottom:.3rem!important}}

/* 0.2.7 - Firmendaten / Briefkopf */
.settings-form>.panel h2{margin-top:0}.checkbox-line{display:flex;align-items:center;gap:.55rem;font-weight:650}.checkbox-line input{width:auto;margin:0}.compact-panel{margin-top:1rem}.brand-preview{background:#fff;border:1px solid #cbd5e1;border-radius:10px;padding:16px;min-height:420px;display:flex;flex-direction:column}.brand-preview-head{padding-bottom:14px;border-bottom:1px solid #d9e0e8}.brand-preview-body{padding:28px 12px;min-height:210px}.brand-preview .company-letterhead{width:100%}.brand-preview .company-logo-wrap{margin-bottom:10px}.brand-preview .company-logo{display:inline-block;max-width:100%;height:auto}.brand-preview .company-letterhead-text{font-size:.9rem;line-height:1.4}.brand-preview .company-footer{margin-top:auto;padding-top:10px;border-top:1px solid #aeb8c5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;font-size:.75rem;line-height:1.35;color:#475569}.brand-preview .company-footer-col{overflow-wrap:anywhere}@media(max-width:900px){.brand-preview .company-footer{grid-template-columns:1fr 1fr}}@media(max-width:600px){.brand-preview .company-footer{grid-template-columns:1fr}}


/* 0.2.30-alpha: integrierter PDF-Reader */
.pdf-reader-shell{display:flex;flex-direction:column;min-height:calc(100vh - 115px);gap:.75rem}
.pdf-reader-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#fff;border:1px solid var(--line);border-radius:12px;padding:.8rem 1rem;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.pdf-reader-frame{display:block;width:100%;height:calc(100vh - 220px);min-height:620px;border:1px solid #cbd5e1;border-radius:12px;background:#525659}
.pdf-reader-fallback{margin:.05rem .25rem .5rem}
@media(max-width:900px){.pdf-reader-toolbar{align-items:flex-start;flex-direction:column}.pdf-reader-frame{height:calc(100vh - 285px);min-height:480px}}
@media(max-width:520px){.pdf-reader-frame{height:65vh;min-height:400px}.pdf-reader-toolbar .actions{width:100%}.pdf-reader-toolbar .btn{flex:1;text-align:center}}

/* 0.2.59: optionale Module wie SiSim + Grunddesign-Auswahl */
.module-switch-list{display:grid;gap:10px;margin-top:12px}.module-switch-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 16px;border:1px solid #d8e0e8;border-radius:10px;background:#fff;cursor:pointer}.module-switch-row>span:first-child{display:grid;gap:4px}.module-switch-row strong{font-size:14px}.module-switch-row small{display:block;color:#6b7280;line-height:1.35}.module-switch-control{display:flex;align-items:center;gap:9px;white-space:nowrap}.module-switch-control input{appearance:none;-webkit-appearance:none;width:44px!important;height:24px;border-radius:999px;background:#cbd5e1;border:0;position:relative;cursor:pointer;transition:.18s}.module-switch-control input:before{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.25);transition:.18s}.module-switch-control input:checked{background:#17324d}.module-switch-control input:checked:before{transform:translateX(20px)}.module-switch-control b{font-size:12px;color:#475569}.template-preset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.template-preset-card{display:flex;flex-direction:column;gap:7px;padding:12px;border:1px solid #d8e0e8;border-radius:10px;background:#f8fafc}.template-preset-card strong{font-size:14px}.template-preset-card span{font-size:12px;color:#64748b;line-height:1.35;min-height:48px}.template-preset-card .btn{margin-top:auto;align-self:flex-start}@media(max-width:760px){.module-switch-row{align-items:flex-start;flex-direction:column}.module-switch-control{align-self:flex-end}}

/* 0.2.60 - Firmendaten & Einstellungen als Reiter, Designfreigabe 03.10.2026 */
.settings-tab-shell{background:#fff;border:1px solid var(--line);border-radius:10px 10px 0 0;overflow-x:auto;margin-bottom:0;box-shadow:0 1px 2px rgba(15,23,42,.02)}
.settings-tabs{display:flex;min-width:max-content;border-bottom:1px solid #d8e0ea}
.settings-tab{display:flex;align-items:center;justify-content:center;min-height:64px;padding:0 30px;border-right:1px solid #e0e6ee;color:#31445f;font-weight:650;position:relative;background:#fff;white-space:nowrap}
.settings-tab:last-child{border-right:0}
.settings-tab:hover{background:#f8fbff;color:var(--accent)}
.settings-tab.is-active{color:var(--accent);font-weight:800;background:#fff}
.settings-tab.is-active:after{content:"";position:absolute;height:4px;border-radius:4px 4px 0 0;background:var(--accent);left:14px;right:14px;bottom:-1px}
.settings-tabs-help{margin:0;padding:17px 12px 19px;color:#66758c;font-size:.96rem;border-bottom:1px solid #e2e8f0}
.settings-content-heading{margin:18px 0 12px;padding:0 2px}
.settings-content-heading h2{margin:0 0 4px;font-size:1.6rem;color:#14213a}
.settings-content-heading p{margin:0;color:#66758c}
.settings-section-panel{padding:20px 22px;border-radius:12px}
.settings-section-panel>h3{margin:0 0 14px;color:#18263e;font-size:1.12rem}
.settings-tab-form{margin:0}
.settings-actions{display:flex;align-items:center;gap:12px;margin:4px 0 18px}
.settings-actions .btn{min-width:150px;text-align:center}
.settings-modules-panel{padding:18px 22px 16px}
.settings-module-list{gap:10px;margin-top:0}
.settings-module-row{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:16px;padding:10px 16px;min-height:80px;border-color:#d8e1ec;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.018)}
.settings-module-row:hover{border-color:#c5d6ea;background:#fbfdff}
.settings-module-row>span:first-child{display:flex}
.settings-module-icon{width:48px;height:48px;border-radius:9px;background:#eaf4ff;color:#1474d4;align-items:center;justify-content:center;flex:0 0 48px}
.settings-module-icon svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.settings-module-copy{display:grid;gap:4px;min-width:0}
.settings-module-copy strong{font-size:1rem;color:#16243b}
.settings-module-copy small{font-size:.9rem;color:#687890;line-height:1.35}
.settings-module-row .module-switch-control{min-width:190px;justify-content:flex-end;gap:14px}
.settings-module-row .module-switch-control input{width:54px!important;height:30px;background:#aebdca;flex:0 0 54px}
.settings-module-row .module-switch-control input:before{width:24px;height:24px;top:3px;left:3px}
.settings-module-row .module-switch-control input:checked{background:var(--accent)}
.settings-module-row .module-switch-control input:checked:before{transform:translateX(24px)}
.module-state-label{display:inline-flex;min-width:112px;font-size:.88rem;color:#55657c;font-weight:500}
.module-switch-control input:checked~.module-state-label .state-off{display:none}
.module-switch-control input:not(:checked)~.module-state-label .state-on{display:none}
.settings-core-note{display:flex;justify-content:flex-end;gap:8px;color:#7a8799;font-size:.82rem;padding:10px 2px 0}
.settings-core-note span{color:#60728a}
@media(max-width:1100px){.settings-tab{padding:0 22px}.settings-module-row .module-switch-control{min-width:170px}}
@media(max-width:760px){.settings-tab-shell{border-radius:10px}.settings-tab{min-height:54px;padding:0 18px}.settings-tabs-help{padding:12px 4px 16px}.settings-module-row{grid-template-columns:46px minmax(0,1fr);gap:12px;padding:12px}.settings-module-icon{width:42px;height:42px;flex-basis:42px}.settings-module-icon svg{width:25px;height:25px}.settings-module-row .module-switch-control{grid-column:2;min-width:0;justify-content:flex-start;align-self:auto}.settings-core-note{justify-content:flex-start}.settings-actions{flex-wrap:wrap}.settings-actions .btn{min-width:0}}


/* 0.2.61 - visuelle Korrektur nach freigegebener Firmendaten-Mockupvorlage */
.settings-tab-shell{border:0;border-radius:0;background:transparent;box-shadow:none;overflow-x:auto;margin:0}
.settings-tabs{background:#fff;border-top:1px solid #e6ebf2;border-bottom:1px solid #d9e2ec;min-width:max-content}
.settings-tab{min-height:66px;padding:0 36px;border-right:1px solid #e3e9f0;color:#334964;font-size:.98rem;background:#fff}
.settings-tab.is-active{background:#fff;color:#0874dd;box-shadow:0 0 0 1px #dfe7f0 inset;border-radius:9px 9px 0 0}
.settings-tab.is-active:after{height:4px;left:16px;right:16px;background:#0874dd}
.settings-tabs-help{margin:0;padding:18px 12px 20px;border-bottom:0;color:#65778f;font-size:.96rem}
.settings-main-card{padding:26px 22px 18px;border-radius:12px;border:1px solid #dce5ef;box-shadow:0 1px 2px rgba(15,23,42,.025)}
.settings-card-heading{margin:0 0 22px}
.settings-card-heading h2{margin:0 0 5px;font-size:1.62rem;line-height:1.15;color:#10203a}
.settings-card-heading p{margin:0;color:#66778e;font-size:.96rem}
.settings-modules-panel{padding:26px 22px 16px}
.settings-module-list{gap:10px;margin:0}
.settings-module-row{grid-template-columns:62px minmax(0,1fr) 220px;min-height:82px;padding:10px 18px;border:1px solid #d9e3ed;border-radius:10px;background:#fff;box-shadow:none}
.settings-module-row:hover{background:#fff;border-color:#c8d8e8}
.settings-module-icon{width:48px;height:48px;border-radius:9px;background:#eaf4ff;color:#0874dd;display:flex!important;align-items:center;justify-content:center}
.settings-module-icon svg{width:29px;height:29px;stroke-width:1.8}
.settings-module-copy{gap:3px}
.settings-module-copy strong{font-size:1.02rem;color:#12213a;line-height:1.25}
.settings-module-copy small{font-size:.91rem;color:#647791;line-height:1.35}
.settings-module-row .module-switch-control{min-width:210px;justify-content:flex-end;gap:15px}
.settings-module-row .module-switch-control input{width:56px!important;height:32px;border:0;background:#aebcc8;box-shadow:none;margin:0}
.settings-module-row .module-switch-control input:before{width:25px;height:25px;top:3.5px;left:3.5px}
.settings-module-row .module-switch-control input:checked{background:#0874dd}
.settings-module-row .module-switch-control input:checked:before{transform:translateX(24px)}
.settings-module-locked{cursor:default}
.settings-module-locked:hover{border-color:#d9e3ed}
.settings-module-locked .module-switch-control input:disabled{opacity:1;cursor:default;background:#0874dd}
.module-state-label{min-width:116px;color:#53657e;font-size:.9rem;font-weight:500}
.settings-card-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-top:12px}
.settings-card-footer .settings-actions{margin:0;display:flex;gap:12px}
.settings-card-footer .settings-actions .btn{min-width:0;padding:.72rem 1.1rem}
.settings-footer-note{display:flex;align-items:center;gap:8px;color:#71839a;font-size:.82rem;text-align:right}
.settings-footer-note span{color:#5e718b;font-size:1rem}
@media(max-width:1180px){.settings-tab{padding:0 26px}.settings-module-row{grid-template-columns:56px minmax(0,1fr) 190px}.settings-module-row .module-switch-control{min-width:180px}}
@media(max-width:820px){.settings-tab{min-height:56px;padding:0 20px}.settings-tabs-help{padding:14px 4px 17px}.settings-main-card,.settings-modules-panel{padding:18px 14px}.settings-module-row{grid-template-columns:48px minmax(0,1fr);gap:12px;padding:13px}.settings-module-icon{width:42px;height:42px}.settings-module-row .module-switch-control{grid-column:2;min-width:0;justify-content:flex-start}.settings-card-footer{align-items:flex-start;flex-direction:column}.settings-footer-note{text-align:left}.settings-card-footer .settings-actions{flex-wrap:wrap}}

/* 0.2.62 - UI Theme Registry / Theme-Changer + modernes Dashboard */
.brand{display:flex;align-items:center;gap:.55rem;min-width:0}.brand-mark{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid rgba(255,255,255,.32);border-radius:8px;font-size:.9rem;letter-spacing:-.03em}.brand-name{white-space:nowrap}.brand small{margin-left:auto;font-size:.68rem;font-weight:700;opacity:.7}

/* Theme-Changer */
.theme-settings-card{padding-bottom:18px}.theme-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.theme-choice-card{position:relative;display:flex;flex-direction:column;gap:12px;border:1px solid #d9e3ed;border-radius:14px;padding:13px;background:#fff;cursor:pointer;transition:.16s ease;overflow:hidden}.theme-choice-card:hover{border-color:#9fbfe4;box-shadow:0 8px 24px rgba(23,50,77,.08);transform:translateY(-1px)}.theme-choice-card.is-selected{border-color:#0874dd;box-shadow:0 0 0 2px rgba(8,116,221,.13)}.theme-choice-card>input{position:absolute;opacity:0;pointer-events:none}.theme-choice-copy{display:grid;gap:4px}.theme-choice-copy strong{font-size:1.02rem;color:#12213a}.theme-choice-copy em{font-style:normal;font-size:.83rem;font-weight:750;color:#0874dd}.theme-choice-copy small{color:#647791;line-height:1.45}.theme-choice-state{align-self:flex-start;border-radius:999px;padding:.32rem .58rem;background:#eef3f8;color:#586a80;font-size:.78rem;font-weight:750}.theme-choice-card.is-selected .theme-choice-state{background:#e8f3ff;color:#0874dd}.theme-choice-card.is-selected .theme-state-off,.theme-choice-card:not(.is-selected) .theme-state-on{display:none}.theme-extension-note{margin:16px 0 4px;padding:12px 14px;border-radius:10px;background:#f7f9fc;border:1px solid #e2e8f0;color:#5f7087;font-size:.88rem}.theme-preview{display:grid;grid-template-columns:28% 72%;height:150px;border-radius:10px;overflow:hidden;border:1px solid rgba(148,163,184,.35);box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}.theme-preview-nav{display:flex;flex-direction:column;gap:8px;padding:14px 8px}.theme-preview-nav i{display:block;height:7px;border-radius:4px}.theme-preview-main{display:flex;flex-direction:column;gap:9px;padding:13px}.theme-preview-main>b{display:block;width:46%;height:10px;border-radius:5px}.theme-preview-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.theme-preview-kpis i{display:block;height:42px;border-radius:7px}.theme-preview-panel{display:block;height:45px;border-radius:7px}
.theme-preview.theme-modern-classic{background:#f3f6fa}.theme-preview.theme-modern-classic .theme-preview-nav{background:#102d4c}.theme-preview.theme-modern-classic .theme-preview-nav i{background:#dce8f8}.theme-preview.theme-modern-classic .theme-preview-nav i:first-child{background:#1681e8}.theme-preview.theme-modern-classic .theme-preview-main>b{background:#20324d}.theme-preview.theme-modern-classic .theme-preview-kpis i,.theme-preview.theme-modern-classic .theme-preview-panel{background:#fff;border:1px solid #dce3ec}
.theme-preview.theme-modern-light{background:#f8fbff}.theme-preview.theme-modern-light .theme-preview-nav{background:#fff;border-right:1px solid #dde7f2}.theme-preview.theme-modern-light .theme-preview-nav i{background:#344b68}.theme-preview.theme-modern-light .theme-preview-nav i:first-child{background:#dcebfb}.theme-preview.theme-modern-light .theme-preview-main>b{background:#17324d}.theme-preview.theme-modern-light .theme-preview-kpis i,.theme-preview.theme-modern-light .theme-preview-panel{background:#fff;border:1px solid #e2eaf3}
.theme-preview.theme-elegant-dark{background:#0f1e2b}.theme-preview.theme-elegant-dark .theme-preview-nav{background:#0b1823}.theme-preview.theme-elegant-dark .theme-preview-nav i{background:#7890a4}.theme-preview.theme-elegant-dark .theme-preview-nav i:first-child{background:#1586ed}.theme-preview.theme-elegant-dark .theme-preview-main>b{background:#dce7ef}.theme-preview.theme-elegant-dark .theme-preview-kpis i,.theme-preview.theme-elegant-dark .theme-preview-panel{background:#1a3142;border:1px solid #2a4659}

/* Gemeinsames modernes Dashboard */
.dashboard-welcome{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:0 0 18px}.dashboard-welcome h2{margin:3px 0 4px;font-size:1.55rem}.dashboard-welcome p{margin:0;color:var(--muted)}.dashboard-kicker{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:var(--accent)}.dashboard-date{font-size:.84rem;color:var(--muted);white-space:nowrap}.dashboard-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.dashboard-kpi{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;align-items:center;color:inherit;background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:15px;box-shadow:0 2px 8px rgba(15,23,42,.035);transition:.16s ease}.dashboard-kpi:hover{color:inherit;transform:translateY(-1px);box-shadow:0 8px 22px rgba(15,23,42,.08)}.dashboard-kpi-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;font-weight:900;font-size:1.05rem}.dashboard-kpi span:last-child{display:grid;gap:1px;min-width:0}.dashboard-kpi b{font-size:1.55rem;line-height:1}.dashboard-kpi strong{font-size:.86rem}.dashboard-kpi small{font-size:.8rem;font-weight:750}.dashboard-kpi.tone-blue .dashboard-kpi-icon,.dashboard-kpi.tone-blue small{color:#0f6bd7}.dashboard-kpi.tone-blue .dashboard-kpi-icon{background:#eaf3ff}.dashboard-kpi.tone-red .dashboard-kpi-icon,.dashboard-kpi.tone-red small{color:#c3342b}.dashboard-kpi.tone-red .dashboard-kpi-icon{background:#fff0ef}.dashboard-kpi.tone-indigo .dashboard-kpi-icon,.dashboard-kpi.tone-indigo small{color:#4f56d9}.dashboard-kpi.tone-indigo .dashboard-kpi-icon{background:#eff0ff}.dashboard-kpi.tone-green .dashboard-kpi-icon,.dashboard-kpi.tone-green small{color:#148c5b}.dashboard-kpi.tone-green .dashboard-kpi-icon{background:#e9f8f1}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr);gap:16px}.dashboard-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:13px}.dashboard-section-head h2{margin:0 0 3px;font-size:1.05rem}.dashboard-section-head p{margin:0;color:var(--muted);font-size:.84rem}.dashboard-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.dashboard-quick-grid>a{display:grid;justify-items:center;gap:3px;text-align:center;border:1px solid var(--line);border-radius:11px;padding:13px 8px;color:inherit;background:rgba(248,250,252,.7)}.dashboard-quick-grid>a:hover{color:inherit;border-color:#9fb9d8;background:#f7fbff}.dashboard-quick-grid>a>span{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:#eaf3ff;color:var(--accent);font-size:1.12rem;font-weight:850}.dashboard-quick-grid strong{font-size:.86rem}.dashboard-quick-grid small{font-size:.75rem;color:var(--muted)}.dashboard-tasks>a{display:flex;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid var(--line);color:inherit}.dashboard-tasks>a:last-child{border-bottom:0}.dashboard-tasks>a:hover{color:var(--accent)}.task-dot{width:9px;height:9px;border-radius:50%;flex:0 0 9px}.task-dot.danger{background:#ef4444}.task-dot.warning{background:#f59e0b}.task-dot.info{background:#1681e8}.dashboard-recent{margin-top:0}.table-scroll{overflow-x:auto}

/* Theme 1: Modern Klassisch - vertraute A1-Richtung */
body.theme-modern-classic{--app-bg:#f3f6fa;--panel:#fff;--line:#dce3ec;--muted:#65738a;--accent:#1978d3;--nav:#102d4c;--text:#172033;background:var(--app-bg);color:var(--text)}body.theme-modern-classic .sidebar{background:linear-gradient(180deg,#0f3154 0%,#10263d 100%)}body.theme-modern-classic .nav a:hover,body.theme-modern-classic .nav a.active{background:#147edc;color:#fff}body.theme-modern-classic .nav-group[open]>summary,body.theme-modern-classic .nav-group>summary:hover{background:#173c61}body.theme-modern-classic .main{background:#f3f6fa}

/* Theme 2: Modern Hell - helle Navigation und luftige Oberflaeche */
body.theme-modern-light{--app-bg:#f7fafe;--panel:#fff;--line:#dfe7f0;--muted:#667991;--accent:#1478db;--nav:#fff;--text:#15243b;background:var(--app-bg);color:var(--text)}body.theme-modern-light .sidebar{background:#fff;color:#17324d;border-right:1px solid #dfe7f0;box-shadow:3px 0 16px rgba(15,23,42,.025)}body.theme-modern-light .brand-mark{border-color:#c9d9ea;background:#f4f8fd;color:#17324d}body.theme-modern-light .nav a{color:#263e5c}body.theme-modern-light .nav a:hover,body.theme-modern-light .nav a.active{background:#e8f3ff;color:#0d6fce}body.theme-modern-light .nav-group>summary{color:#263e5c}body.theme-modern-light .nav-group>summary:hover,body.theme-modern-light .nav-group[open]>summary{background:#f0f6fd;color:#17324d}body.theme-modern-light .nav-sub{border-left-color:#d9e4ef}body.theme-modern-light .nav-sub a.active{box-shadow:inset 3px 0 0 #1478db}body.theme-modern-light .nav-logout{border-top-color:#dce5ef}body.theme-modern-light .nav-logout button{color:#344b68}body.theme-modern-light .nav-logout button:hover{background:#f0f5fb}body.theme-modern-light .main{background:#f7fafe}body.theme-modern-light .panel,body.theme-modern-light .stat,body.theme-modern-light .dashboard-kpi{box-shadow:0 5px 18px rgba(30,64,175,.035)}body.theme-modern-light .dashboard-quick-grid>a{background:#fbfdff}

/* Theme 3: Elegant & Kompakt - Modern Dunkel */
body.theme-elegant-dark{--app-bg:#0f1e2b;--panel:#182c3b;--line:#294557;--muted:#92a7b6;--accent:#1d91f0;--nav:#0b1823;--text:#edf4f8;background:var(--app-bg);color:var(--text)}body.theme-elegant-dark .sidebar{background:linear-gradient(180deg,#091721 0%,#0c202d 100%);color:#edf4f8}body.theme-elegant-dark .brand-mark{background:#10293a;border-color:#38566a}body.theme-elegant-dark .nav a{color:#c9d8e4}body.theme-elegant-dark .nav a:hover,body.theme-elegant-dark .nav a.active{background:#1688e8;color:#fff}body.theme-elegant-dark .nav-group>summary{color:#c9d8e4}body.theme-elegant-dark .nav-group>summary:hover,body.theme-elegant-dark .nav-group[open]>summary{background:#132d3e;color:#fff}body.theme-elegant-dark .nav-sub{border-left-color:#294557}body.theme-elegant-dark .nav-logout{border-top-color:#294557}body.theme-elegant-dark .main{background:radial-gradient(circle at 80% -10%,#16384e 0,#0f1e2b 34%,#0f1e2b 100%)}body.theme-elegant-dark .topbar,body.theme-elegant-dark .topbar h1{color:#edf4f8}body.theme-elegant-dark .panel,body.theme-elegant-dark .stat,body.theme-elegant-dark .dashboard-kpi,body.theme-elegant-dark fieldset{background:#182c3b;border-color:#294557;color:#edf4f8;box-shadow:0 4px 16px rgba(0,0,0,.14)}body.theme-elegant-dark input,body.theme-elegant-dark select,body.theme-elegant-dark textarea{background:#102432;border-color:#365164;color:#edf4f8}body.theme-elegant-dark input::placeholder,body.theme-elegant-dark textarea::placeholder{color:#7890a4}body.theme-elegant-dark th{color:#9fb2bf}body.theme-elegant-dark th,body.theme-elegant-dark td{border-bottom-color:#294557}body.theme-elegant-dark a{color:#55b1ff}body.theme-elegant-dark .btn.light{background:#233d4f;color:#e6f0f5}body.theme-elegant-dark .badge{background:#233d4f;color:#d7e5ed}body.theme-elegant-dark .badge.open{background:#193b5c;color:#7fc0ff}body.theme-elegant-dark .badge.paid,body.theme-elegant-dark .badge.final{background:#163f36;color:#70ddb0}body.theme-elegant-dark .badge.draft,body.theme-elegant-dark .badge.partial{background:#4b3a16;color:#ffd67b}body.theme-elegant-dark .alert.info{background:#153754;color:#9ed0ff}body.theme-elegant-dark .alert.success{background:#153a31;color:#8de1b7}body.theme-elegant-dark .alert.danger{background:#4a2425;color:#ffb4ae}body.theme-elegant-dark .dashboard-quick-grid>a{background:#142737;border-color:#294557}body.theme-elegant-dark .dashboard-quick-grid>a:hover{background:#1a3549;border-color:#3f6b87}body.theme-elegant-dark .dashboard-quick-grid>a>span{background:#1a3a53;color:#55b1ff}body.theme-elegant-dark .dashboard-tasks>a{border-bottom-color:#294557}body.theme-elegant-dark .settings-tab-shell,body.theme-elegant-dark .settings-tabs,body.theme-elegant-dark .settings-tab{background:#142737;border-color:#294557;color:#c7d7e2}body.theme-elegant-dark .settings-tab.is-active{background:#182c3b;color:#55b1ff;box-shadow:0 0 0 1px #294557 inset}body.theme-elegant-dark .settings-tabs-help,body.theme-elegant-dark .settings-content-heading p,body.theme-elegant-dark .settings-card-heading p{color:#92a7b6}body.theme-elegant-dark .settings-content-heading h2,body.theme-elegant-dark .settings-card-heading h2,body.theme-elegant-dark .settings-section-panel>h3{color:#edf4f8}body.theme-elegant-dark .settings-module-row,body.theme-elegant-dark .theme-choice-card{background:#142737;border-color:#294557}body.theme-elegant-dark .settings-module-copy strong,body.theme-elegant-dark .theme-choice-copy strong{color:#edf4f8}body.theme-elegant-dark .settings-module-copy small,body.theme-elegant-dark .theme-choice-copy small{color:#92a7b6}body.theme-elegant-dark .settings-module-icon{background:#173a54;color:#55b1ff}body.theme-elegant-dark .theme-extension-note{background:#142737;border-color:#294557;color:#9fb2bf}body.theme-elegant-dark .module-state-label,body.theme-elegant-dark .settings-footer-note{color:#9fb2bf}body.theme-elegant-dark .a1-tabs{border-color:#294557}body.theme-elegant-dark .a1-tab{background:#142737;border-color:#294557;color:#c9d8e4}body.theme-elegant-dark .a1-tab.is-active{background:#182c3b;color:#fff}body.theme-elegant-dark .panel.inset{background:#142737;border-color:#294557}

@media(max-width:1100px){.theme-choice-grid{grid-template-columns:1fr}.theme-preview{height:132px}.dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}}
@media(max-width:700px){.dashboard-welcome{align-items:flex-start;flex-direction:column}.dashboard-kpis{grid-template-columns:1fr}.dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-preview{height:120px}}
@media print{body.theme-modern-classic,body.theme-modern-light,body.theme-elegant-dark{background:#fff!important;color:#111!important}}
.dashboard-secondary-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.dashboard-secondary-links a{font-size:.78rem;font-weight:750;padding:.28rem .5rem;border-radius:999px;background:#eaf1f8;color:#405671}.dashboard-secondary-links a:hover{background:#dceaf8;color:var(--accent)}body.theme-elegant-dark .dashboard-secondary-links a{background:#173247;color:#a8c9df}

/* 0.2.63-alpha: Farb- und Kontrastnacharbeit nach freigegebener Dashboard-Vorlage */
.ui-icon{display:block;width:24px;height:24px}.dashboard-kpi-icon .ui-icon{width:25px;height:25px}.dashboard-quick-grid .ui-icon{width:22px;height:22px}
.topbar{min-height:58px;padding:10px 14px;border:1px solid var(--line);border-radius:13px;background:var(--panel);box-shadow:0 4px 16px rgba(15,23,42,.045)}
.topbar-user{display:flex;align-items:center;gap:9px;min-width:0}.topbar-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:linear-gradient(145deg,#238cf2,#0a67ca);color:#fff;font-size:.76rem;font-weight:850;letter-spacing:.02em;box-shadow:0 4px 10px rgba(20,120,219,.22)}.topbar-user-copy{display:grid;gap:1px;line-height:1.15}.topbar-user-copy strong{font-size:.85rem}.topbar-user-copy small{font-size:.68rem;color:var(--muted);text-transform:capitalize}
.btn.primary{background:linear-gradient(180deg,#2488e9,#0f70d1);box-shadow:0 3px 8px rgba(15,112,209,.17)}.btn.primary:hover{filter:brightness(1.035);box-shadow:0 5px 13px rgba(15,112,209,.24)}.btn.light:hover{background:#e3edf7}
.panel{box-shadow:0 5px 18px rgba(15,23,42,.045)}
.brand-mark{background:linear-gradient(145deg,#228af0,#0d66c7);border-color:rgba(255,255,255,.34);color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.16)}
.nav a,.nav-group>summary{transition:background .15s ease,color .15s ease,box-shadow .15s ease}.nav a.active{box-shadow:0 5px 13px rgba(6,94,177,.24)}
.dashboard-welcome{padding:4px 2px 2px}.dashboard-welcome h2{font-size:1.62rem;letter-spacing:-.02em}.dashboard-kicker{padding:.2rem .42rem;border-radius:999px;background:#e9f3ff;color:#0d6fce}.dashboard-date{padding:.38rem .62rem;border:1px solid var(--line);border-radius:999px;background:var(--panel);font-weight:700}
.dashboard-kpi{--kpi-color:#1478db;--kpi-bg:#eef6ff;--kpi-amount:#1478db;position:relative;overflow:hidden;min-height:104px;background:linear-gradient(135deg,var(--kpi-bg) 0%,#fff 68%);border-color:#d9e3ee;padding:16px;box-shadow:0 7px 20px rgba(23,50,77,.065)}.dashboard-kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--kpi-color)}.dashboard-kpi:hover{border-color:#b7cbe1;box-shadow:0 11px 28px rgba(23,50,77,.11)}.dashboard-kpi-icon{width:48px;height:48px;background:#fff!important;color:var(--kpi-color)!important;border:1px solid rgba(15,23,42,.055);box-shadow:0 6px 16px rgba(23,50,77,.085)}.dashboard-kpi b{font-size:1.72rem;letter-spacing:-.035em;color:#14213a}.dashboard-kpi strong{color:#2f4058}.dashboard-kpi small{color:var(--kpi-amount)!important;font-size:.82rem;font-weight:850}.dashboard-kpi.tone-blue{--kpi-color:#e93c49;--kpi-bg:#fff1f2;--kpi-amount:#0f71d8}.dashboard-kpi.tone-red{--kpi-color:#ef4a3d;--kpi-bg:#fff2ef;--kpi-amount:#e43c32}.dashboard-kpi.tone-indigo{--kpi-color:#1779e8;--kpi-bg:#eef6ff;--kpi-amount:#156fda}.dashboard-kpi.tone-green{--kpi-color:#13a665;--kpi-bg:#ecfaf4;--kpi-amount:#11925a}
.dashboard-grid{gap:18px}.dashboard-quick,.dashboard-tasks,.dashboard-recent{border-color:#d9e3ed}.dashboard-section-head h2{font-size:1.08rem;color:#1a2a43}.dashboard-section-head p{font-size:.82rem}
.dashboard-quick-grid>a{--quick-color:#167be5;--quick-bg:#eef6ff;min-height:110px;align-content:center;padding:14px 9px;background:linear-gradient(145deg,var(--quick-bg) 0%,#fff 80%);border-color:#dde6ef;box-shadow:0 4px 12px rgba(20,50,80,.035);transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease}.dashboard-quick-grid>a:hover{transform:translateY(-2px);background:linear-gradient(145deg,var(--quick-bg) 0%,#fff 80%);border-color:#b7cae0;box-shadow:0 8px 19px rgba(20,50,80,.09)}.dashboard-quick-grid>a>span{width:44px;height:44px;border-radius:11px;background:#fff!important;color:var(--quick-color)!important;border:1px solid rgba(15,23,42,.055);box-shadow:0 5px 12px rgba(20,50,80,.08)}.dashboard-quick-grid strong{font-size:.9rem;color:#18283f}.dashboard-quick-grid>a small{color:#52667f}.dashboard-quick-grid .quick-invoice{--quick-color:#197fe9;--quick-bg:#edf6ff}.dashboard-quick-grid .quick-offer{--quick-color:#12a968;--quick-bg:#edf9f4}.dashboard-quick-grid .quick-credit{--quick-color:#f28a18;--quick-bg:#fff6e9}.dashboard-quick-grid .quick-customer{--quick-color:#7758e7;--quick-bg:#f3efff}.dashboard-quick-grid .quick-article{--quick-color:#6b8198;--quick-bg:#f2f6f9}.dashboard-quick-grid .quick-payment{--quick-color:#d8aa00;--quick-bg:#fff8dc}
.dashboard-tasks{padding-bottom:13px}.dashboard-tasks>a{margin:7px 0;padding:10px 11px;border:1px solid transparent!important;border-radius:9px}.dashboard-tasks>a:nth-of-type(1){background:#fff1f1;border-color:#ffdada!important}.dashboard-tasks>a:nth-of-type(2){background:#fff8e8;border-color:#f8e5b9!important}.dashboard-tasks>a:nth-of-type(3){background:#edf6ff;border-color:#d9eaff!important}.dashboard-tasks>a:hover{transform:translateX(2px)}.task-dot{box-shadow:0 0 0 4px rgba(255,255,255,.75)}
.dashboard-secondary-links a{background:#eaf4ff;color:#1d5f9e;border:1px solid #d7e9fb}.dashboard-secondary-links a:nth-child(2){background:#edf9f3;color:#19764d;border-color:#d6f0e2}
.dashboard-recent{margin-top:18px}.dashboard-recent table{border-collapse:separate;border-spacing:0}.dashboard-recent th{background:#f6f9fc;color:#5a6d84}.dashboard-recent th:first-child{border-radius:8px 0 0 8px}.dashboard-recent th:last-child{border-radius:0 8px 8px 0}.dashboard-recent tbody tr{transition:background .12s ease}.dashboard-recent tbody tr:hover{background:#f7fbff}.badge{font-weight:750}.badge.open{background:#ffe9e9;color:#c72f32}.badge.paid,.badge.final{background:#e5f8ee;color:#117647}.badge.partial,.badge.draft{background:#fff2cf;color:#8a6200}.badge.overdue,.badge.reminder,.badge.cancelled,.badge.danger{background:#ffe4e2;color:#b42318}
.theme-preview.theme-modern-classic .theme-preview-kpis i:nth-child(1),.theme-preview.theme-modern-light .theme-preview-kpis i:nth-child(1){background:#fff0f1;border-color:#f7cfd3}.theme-preview.theme-modern-classic .theme-preview-kpis i:nth-child(2),.theme-preview.theme-modern-light .theme-preview-kpis i:nth-child(2){background:#eef6ff;border-color:#cfe3fa}.theme-preview.theme-modern-classic .theme-preview-kpis i:nth-child(3),.theme-preview.theme-modern-light .theme-preview-kpis i:nth-child(3){background:#ebf9f2;border-color:#cbeedc}.theme-preview.theme-elegant-dark .theme-preview-kpis i:nth-child(1){background:#40252d;border-color:#6b3340}.theme-preview.theme-elegant-dark .theme-preview-kpis i:nth-child(2){background:#173b58;border-color:#245579}.theme-preview.theme-elegant-dark .theme-preview-kpis i:nth-child(3){background:#173d34;border-color:#235848}

/* Modern Klassisch: kraeftige A1-Farbwelt */
body.theme-modern-classic .sidebar{background:linear-gradient(180deg,#0b365e 0%,#0b2948 55%,#09223d 100%);box-shadow:4px 0 18px rgba(6,34,62,.12)}body.theme-modern-classic .nav a.active{background:linear-gradient(180deg,#1b89ee,#0e73d4);box-shadow:0 5px 14px rgba(5,88,169,.28)}body.theme-modern-classic .topbar{background:linear-gradient(110deg,#123c65 0%,#0d2f53 100%);border-color:#123d67;color:#fff;box-shadow:0 7px 20px rgba(9,45,79,.15)}body.theme-modern-classic .topbar h1,body.theme-modern-classic .topbar-user-copy strong{color:#fff}body.theme-modern-classic .topbar-user-copy small{color:#c9dbec}body.theme-modern-classic .topbar-avatar{background:linear-gradient(145deg,#3aa0ff,#1376da);box-shadow:0 4px 12px rgba(0,0,0,.18)}body.theme-modern-classic .main{background:radial-gradient(circle at 100% 0,#edf6ff 0,#f3f6fa 30%,#f3f6fa 100%)}

/* Modern Hell: freundlich, weiss, aber klar farbcodiert */
body.theme-modern-light .brand-mark{background:#eaf4ff;border-color:#cbdff3;color:#0d6fce;box-shadow:none}body.theme-modern-light .topbar{background:#fff;border-color:#dce6f0;box-shadow:0 6px 22px rgba(43,89,141,.06)}body.theme-modern-light .sidebar{box-shadow:5px 0 22px rgba(43,89,141,.04)}body.theme-modern-light .nav a.active{background:#dceeff;color:#096bc7;box-shadow:inset 3px 0 0 #1478db}body.theme-modern-light .dashboard-kicker{background:#edf6ff}body.theme-modern-light .dashboard-kpi{box-shadow:0 7px 20px rgba(30,83,145,.055)}body.theme-modern-light .panel{box-shadow:0 7px 22px rgba(30,83,145,.045)}

/* Elegant & Kompakt: Farben auch im dunklen Theme bewusst erhalten */
body.theme-elegant-dark .topbar{background:linear-gradient(110deg,#122f43,#0c2231);border-color:#27475b;box-shadow:0 8px 22px rgba(0,0,0,.2)}body.theme-elegant-dark .topbar-user-copy small{color:#91a9ba}body.theme-elegant-dark .dashboard-kicker{background:#173a54;color:#6ec0ff}body.theme-elegant-dark .dashboard-date{background:#142a39;border-color:#2c495c;color:#9fb5c4}body.theme-elegant-dark .dashboard-kpi{background:linear-gradient(145deg,#1b3445,#162b3a);border-color:#2e4b5f;box-shadow:0 7px 22px rgba(0,0,0,.18)}body.theme-elegant-dark .dashboard-kpi:before{width:3px}body.theme-elegant-dark .dashboard-kpi-icon{background:#102533!important;border-color:#315165;box-shadow:0 5px 15px rgba(0,0,0,.18)}body.theme-elegant-dark .dashboard-kpi b{color:var(--kpi-color)}body.theme-elegant-dark .dashboard-kpi strong{color:#dce8ef}body.theme-elegant-dark .dashboard-kpi small{color:var(--kpi-color)!important}body.theme-elegant-dark .dashboard-kpi.tone-blue{--kpi-color:#ff5b65}body.theme-elegant-dark .dashboard-kpi.tone-red{--kpi-color:#ff674f}body.theme-elegant-dark .dashboard-kpi.tone-indigo{--kpi-color:#42a7ff}body.theme-elegant-dark .dashboard-kpi.tone-green{--kpi-color:#35d98e}body.theme-elegant-dark .dashboard-section-head h2,body.theme-elegant-dark .dashboard-quick-grid strong{color:#edf4f8}body.theme-elegant-dark .dashboard-quick-grid>a{background:linear-gradient(145deg,#1a3344,#142a39);border-color:#2c495c;box-shadow:0 6px 16px rgba(0,0,0,.12)}body.theme-elegant-dark .dashboard-quick-grid>a:hover{background:linear-gradient(145deg,#203d51,#173043);border-color:#41667d;box-shadow:0 9px 20px rgba(0,0,0,.2)}body.theme-elegant-dark .dashboard-quick-grid>a>span{background:#102533!important;border-color:#34546a;box-shadow:0 5px 13px rgba(0,0,0,.16)}body.theme-elegant-dark .dashboard-quick-grid>a small{color:#9fb3c2}body.theme-elegant-dark .dashboard-tasks>a:nth-of-type(1){background:#3a252a;border-color:#59323a!important}body.theme-elegant-dark .dashboard-tasks>a:nth-of-type(2){background:#3a3221;border-color:#554829!important}body.theme-elegant-dark .dashboard-tasks>a:nth-of-type(3){background:#173449;border-color:#24506e!important}body.theme-elegant-dark .task-dot{box-shadow:0 0 0 4px rgba(12,32,45,.8)}body.theme-elegant-dark .dashboard-secondary-links a{background:#17384f;color:#8bcbff;border-color:#285470}body.theme-elegant-dark .dashboard-secondary-links a:nth-child(2){background:#16382f;color:#7de0b3;border-color:#285446}body.theme-elegant-dark .dashboard-recent th{background:#142a39;color:#9db1bf}body.theme-elegant-dark .dashboard-recent tbody tr:hover{background:#1c3444}body.theme-elegant-dark .badge.open{background:#5a2930;color:#ff9da4}body.theme-elegant-dark .badge.paid,body.theme-elegant-dark .badge.final{background:#174839;color:#79e2b3}body.theme-elegant-dark .badge.partial,body.theme-elegant-dark .badge.draft{background:#4c3f1e;color:#f7d472}

@media(max-width:700px){.topbar{align-items:flex-start;gap:12px}.topbar-user-copy{display:none}.topbar-avatar{width:32px;height:32px}.dashboard-kpi{min-height:96px}.dashboard-quick-grid>a{min-height:98px}}

/* 0.2.64-alpha - exakte bunte Dashboard-/Icon-Nacharbeit */
.ui-icon{width:24px;height:24px;display:block;overflow:visible}
.brand{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:8px;margin-bottom:1.35rem;min-height:48px}.brand-mark.brand-doc-icon{display:grid;place-items:center;width:38px;height:38px;border:0;background:transparent;color:#146fcf;border-radius:0;padding:0}.brand-mark.brand-doc-icon .ui-icon{width:36px;height:36px;stroke-width:1.7}.brand-name{font-size:1.28rem;font-weight:900;letter-spacing:-.025em;white-space:nowrap}.brand small{align-self:end;margin-bottom:4px;font-size:.64rem;font-weight:800;opacity:.75;white-space:nowrap}
.nav a,.nav-group>summary,.nav-logout button{display:flex;align-items:center;gap:11px}.nav-icon{display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px}.nav-icon .ui-icon{width:22px;height:22px;stroke-width:1.9}.nav-home{padding:.72rem .78rem!important}.nav-summary-label{display:flex;align-items:center;gap:11px;min-width:0}.nav-chevron{display:grid;place-items:center;margin-left:auto}.nav-chevron .ui-icon{width:17px;height:17px}.nav-group[open] .nav-chevron{transform:rotate(90deg)}.nav-sub{padding-left:.42rem;margin-left:.78rem}.nav-sub a{padding:.54rem .62rem}.nav-sub .nav-icon{flex-basis:22px;width:22px;height:22px}.nav-sub .nav-icon .ui-icon{width:18px;height:18px}.nav-logout button{border-radius:8px}

.topbar{min-height:58px;margin:-.25rem 0 1.35rem;padding:.35rem 0;gap:18px}.topbar-title{min-width:0}.topbar-title h1{font-size:1.42rem}.topbar-search{position:relative;flex:0 1 370px;margin-right:auto}.topbar-search input{height:42px;padding:.55rem .8rem .55rem 2.65rem;border-radius:9px;background:#fff;border:1px solid #cbdbee;box-shadow:0 2px 8px rgba(18,56,91,.03)}.topbar-search-icon{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:#315b8b;pointer-events:none}.topbar-search-icon .ui-icon{width:19px;height:19px}.topbar-actions{display:flex;align-items:center;gap:10px}.topbar-icon-button{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;color:#1d477d}.topbar-icon-button:hover{background:#edf5ff;color:#0875dc}.topbar-icon-button .ui-icon{width:22px;height:22px}.topbar-user{display:flex;align-items:center;gap:10px}.topbar-avatar{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#087cf0;color:#fff;font-size:.78rem;font-weight:850}.topbar-user-copy{display:grid;gap:1px}.topbar-user-copy strong{font-size:.86rem}.topbar-user-copy small{font-size:.7rem;color:var(--muted)}

.dashboard-welcome{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:0 0 18px;padding:0}.dashboard-welcome h2{margin:0 0 2px;font-size:1.75rem;line-height:1.1;letter-spacing:-.03em;color:#0f1f3c}.dashboard-welcome p{margin:0;color:#425d83;font-size:.93rem}.dashboard-date{padding:0;border:0;background:transparent;font-size:.79rem;font-weight:650;color:#3c5981;border-radius:0}
.dashboard-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:18px}.dashboard-kpi{--kpi-color:#087cf0;--kpi-soft:#eaf4ff;display:grid;grid-template-columns:58px minmax(0,1fr) 18px;gap:13px;align-items:center;min-height:126px;padding:17px 14px;background:linear-gradient(135deg,var(--kpi-soft),#fff 72%);border:1px solid color-mix(in srgb,var(--kpi-color) 26%,#dbe6f2);border-radius:13px;box-shadow:0 8px 22px rgba(27,73,120,.07);color:#0f1f3c;overflow:hidden}.dashboard-kpi:before{display:none}.dashboard-kpi:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--kpi-color) 42%,#dbe6f2);box-shadow:0 12px 30px rgba(27,73,120,.12);color:#0f1f3c}.dashboard-kpi-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:color-mix(in srgb,var(--kpi-color) 13%,#fff)!important;color:var(--kpi-color)!important;border:0;box-shadow:none}.dashboard-kpi-icon .ui-icon{width:30px;height:30px;stroke-width:2}.dashboard-kpi>span:nth-child(2){display:grid;gap:2px}.dashboard-kpi b{font-size:1.75rem;line-height:1;color:#0e1c39}.dashboard-kpi strong{font-size:.84rem;line-height:1.15;color:#173158}.dashboard-kpi small{font-size:.9rem;line-height:1.25;font-weight:900;color:var(--kpi-color)!important}.dashboard-kpi-arrow{color:var(--kpi-color)}.dashboard-kpi-arrow .ui-icon{width:18px;height:18px;stroke-width:2.3}.dashboard-kpi.tone-blue{--kpi-color:#087cf0;--kpi-soft:#eef7ff}.dashboard-kpi.tone-red{--kpi-color:#ff3e2f;--kpi-soft:#fff2ef}.dashboard-kpi.tone-green{--kpi-color:#08a965;--kpi-soft:#effcf6}.dashboard-kpi.tone-purple{--kpi-color:#7839e8;--kpi-soft:#f5f0ff}

.dashboard-grid-main{grid-template-columns:minmax(0,1.17fr) minmax(430px,1fr);gap:18px}.dashboard-quick,.dashboard-revenue,.dashboard-recent{border:1px solid #dce8f3;border-radius:13px;box-shadow:0 8px 24px rgba(36,89,146,.055);background:#fff}.dashboard-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}.dashboard-section-head h2{margin:0 0 2px;font-size:1.1rem;line-height:1.2;color:#102347}.dashboard-section-head h2 span{font-size:.8rem;font-weight:650;color:#29456f}.dashboard-section-head p{margin:0;font-size:.79rem;color:#607998}
.dashboard-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.dashboard-quick-grid>a{--quick-color:#087cf0;--quick-soft:#edf6ff;position:relative;display:grid;grid-template-columns:46px minmax(0,1fr) 15px;grid-template-rows:auto auto;align-items:center;column-gap:10px;min-height:92px;padding:12px;background:linear-gradient(135deg,var(--quick-soft),#fff 94%);border:1px solid color-mix(in srgb,var(--quick-color) 24%,#dbe6f0);border-radius:11px;color:#102347;text-align:left;justify-items:start;box-shadow:none}.dashboard-quick-grid>a:hover{transform:translateY(-1px);background:linear-gradient(135deg,var(--quick-soft),#fff 90%);border-color:color-mix(in srgb,var(--quick-color) 40%,#dbe6f0);box-shadow:0 7px 16px rgba(29,70,115,.08);color:#102347}.dashboard-quick-grid>a>span{grid-row:1/3;display:grid;place-items:center;width:44px;height:44px;border-radius:9px;background:var(--quick-color)!important;color:#fff!important;border:0;box-shadow:0 5px 12px color-mix(in srgb,var(--quick-color) 20%,transparent)}.dashboard-quick-grid>a>span .ui-icon{width:25px;height:25px;stroke-width:2}.dashboard-quick-grid strong{align-self:end;font-size:.86rem;color:#102347}.dashboard-quick-grid small{align-self:start;font-size:.75rem;color:#415b7f}.dashboard-quick-grid>a>i{grid-column:3;grid-row:1/3;color:var(--quick-color);font-style:normal}.dashboard-quick-grid>a>i .ui-icon{width:16px;height:16px;stroke-width:2.2}.dashboard-quick-grid .quick-invoice{--quick-color:#087cf0;--quick-soft:#edf6ff}.dashboard-quick-grid .quick-offer{--quick-color:#05a45f;--quick-soft:#effbf5}.dashboard-quick-grid .quick-credit{--quick-color:#ff8708;--quick-soft:#fff7e8}.dashboard-quick-grid .quick-customer{--quick-color:#7a3ff0;--quick-soft:#f5f0ff}.dashboard-quick-grid .quick-article{--quick-color:#55779e;--quick-soft:#f0f5fa}.dashboard-quick-grid .quick-payment{--quick-color:#f0a900;--quick-soft:#fff9e6}

.dashboard-year{display:flex;align-items:center;gap:7px;padding:.38rem .55rem;border:1px solid #cbdced;border-radius:7px;background:#f7fbff;color:#24476f;font-size:.76rem;font-weight:800}.dashboard-year .ui-icon{width:14px;height:14px;transform:rotate(90deg)}.dashboard-chart{display:grid;grid-template-columns:66px minmax(0,1fr);gap:8px;height:245px;margin-top:3px}.dashboard-chart-y{display:grid;grid-template-rows:repeat(5,1fr);padding:2px 0 27px}.dashboard-chart-y span{align-self:start;transform:translateY(-50%);font-size:.68rem;color:#4c6587;text-align:right;white-space:nowrap}.dashboard-chart-y span:last-child{transform:none;align-self:end}.dashboard-chart-plot{position:relative;min-width:0}.dashboard-chart-grid{position:absolute;inset:0 0 27px;display:grid;grid-template-rows:repeat(4,1fr);border-bottom:1px solid #cbd9e8}.dashboard-chart-grid i{border-top:1px solid #d6e2ee}.dashboard-chart-bars{position:absolute;inset:0 2px 0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:stretch}.dashboard-chart-col{display:grid;grid-template-rows:1fr 27px;align-items:end;min-width:0}.dashboard-chart-bar{position:relative;justify-self:center;width:min(44px,72%);height:max(4px,var(--bar-height));max-height:calc(100% - 3px);border-radius:4px 4px 0 0;background:linear-gradient(180deg,#64b8ff 0%,#1687f2 100%);box-shadow:inset 0 -16px 18px rgba(0,90,211,.08)}.dashboard-chart-bar:before{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,rgba(255,255,255,.28),transparent 36%)}.dashboard-chart-bar.is-empty{height:0;box-shadow:none;background:transparent}.dashboard-chart-bar span{position:absolute;left:50%;bottom:calc(100% + 5px);transform:translateX(-50%);font-size:.61rem;font-weight:750;color:#2f527e;white-space:nowrap;opacity:0;transition:.12s}.dashboard-chart-col:hover .dashboard-chart-bar span{opacity:1}.dashboard-chart-col b{align-self:end;padding-top:7px;font-size:.7rem;text-align:center;color:#29476e}

.dashboard-recent{margin-top:18px;padding:1rem 1.1rem}.dashboard-recent .dashboard-section-head{margin-bottom:7px}.dashboard-recent table{border-collapse:separate;border-spacing:0}.dashboard-recent th{padding:.62rem .7rem;background:#f4f8fc;color:#314b70;font-size:.69rem;text-transform:none;letter-spacing:0}.dashboard-recent td{padding:.62rem .7rem;font-size:.77rem;color:#233d64}.dashboard-recent td:first-child a{color:#087cf0}.dashboard-recent tbody tr:hover{background:#f8fbff}.badge{min-width:82px;text-align:center;padding:.25rem .58rem;font-weight:850;border-radius:999px}.badge.open{background:#ffe8ea;color:#f02432}.badge.paid,.badge.final{background:#ddf8eb;color:#04894f}.badge.partial,.badge.draft{background:#fff1c9;color:#c17700}.badge.overdue,.badge.reminder,.badge.cancelled,.badge.danger{background:#ffe4e3;color:#ef2e2e}.dashboard-row-actions{display:flex;align-items:center;gap:6px}.dashboard-row-actions a{display:grid;place-items:center;width:31px;height:31px;border:1px solid #dce7f1;border-radius:7px;background:#fff;color:#1d4b83}.dashboard-row-actions a:hover{background:#edf6ff;border-color:#bfd7ee;color:#087cf0}.dashboard-row-actions .ui-icon{width:17px;height:17px}

/* Modern Hell: Zieloptik der bunten Vorlage */
body.theme-modern-light{background:#f6faff;color:#11233f}body.theme-modern-light .sidebar{background:#fff;border-right:1px solid #dce7f2;box-shadow:4px 0 20px rgba(35,78,121,.035);color:#18375d}body.theme-modern-light .brand-name{color:#0e2144}body.theme-modern-light .nav a,body.theme-modern-light .nav-group>summary{color:#173961}body.theme-modern-light .nav a:hover,body.theme-modern-light .nav-group>summary:hover,body.theme-modern-light .nav-group[open]>summary{background:#eef6ff;color:#0870d8}body.theme-modern-light .nav a.active{background:linear-gradient(90deg,#dceeff,#cce6ff);color:#0874df;box-shadow:inset 4px 0 0 #087cf0}body.theme-modern-light .nav-home.active .nav-icon{color:#087cf0}body.theme-modern-light .nav-sub{border-left-color:#dbe7f2}body.theme-modern-light .nav-logout{border-top-color:#dce7f2}body.theme-modern-light .main{background:radial-gradient(circle at 100% 0,#eef7ff 0,#f7fbff 34%,#f7fbff 100%)}body.theme-modern-light .topbar{border-bottom:1px solid #dce7f2}body.theme-modern-light .dashboard-quick,body.theme-modern-light .dashboard-revenue,body.theme-modern-light .dashboard-recent{background:#fff}

/* Modern Klassisch: gleiche Farbwelt mit klassischer dunkelblauer Navigation */
body.theme-modern-classic .brand-mark.brand-doc-icon{color:#fff}body.theme-modern-classic .brand-name{color:#fff}body.theme-modern-classic .nav a,body.theme-modern-classic .nav-group>summary{color:#dfefff}body.theme-modern-classic .nav-icon{color:#98c8f3}body.theme-modern-classic .nav a.active .nav-icon,body.theme-modern-classic .nav a:hover .nav-icon{color:#fff}body.theme-modern-classic .topbar-search input{background:#fff;border-color:#c9d9e8;color:#17324d}body.theme-modern-classic .topbar-icon-button{color:#dbeaff}body.theme-modern-classic .topbar-icon-button:hover{background:rgba(255,255,255,.09);color:#fff}body.theme-modern-classic .dashboard-welcome h2{color:#102347}

/* Elegant & Kompakt / Dunkel: identische Farbcodierung in dunkler Ausprägung */
body.theme-elegant-dark .brand-mark.brand-doc-icon{color:#58b4ff}body.theme-elegant-dark .brand-name{color:#f4f8fb}body.theme-elegant-dark .nav-icon{color:#88a9c0}body.theme-elegant-dark .nav a.active .nav-icon,body.theme-elegant-dark .nav a:hover .nav-icon{color:#fff}body.theme-elegant-dark .topbar-search input{background:#102432;border-color:#355164;color:#eaf3f8}body.theme-elegant-dark .topbar-search-icon,body.theme-elegant-dark .topbar-icon-button{color:#9fc2da}body.theme-elegant-dark .topbar-icon-button:hover{background:#173247;color:#58b4ff}body.theme-elegant-dark .dashboard-welcome h2{color:#f2f7fa}body.theme-elegant-dark .dashboard-welcome p,body.theme-elegant-dark .dashboard-date{color:#a5bbca}body.theme-elegant-dark .dashboard-kpi{background:linear-gradient(135deg,color-mix(in srgb,var(--kpi-color) 14%,#172c3b),#172c3b 72%);border-color:color-mix(in srgb,var(--kpi-color) 32%,#294557);color:#eef5f9;box-shadow:0 8px 22px rgba(0,0,0,.2)}body.theme-elegant-dark .dashboard-kpi:hover{color:#fff}body.theme-elegant-dark .dashboard-kpi-icon{background:color-mix(in srgb,var(--kpi-color) 16%,#102432)!important}body.theme-elegant-dark .dashboard-kpi b,body.theme-elegant-dark .dashboard-kpi strong{color:#edf5f9}body.theme-elegant-dark .dashboard-quick,body.theme-elegant-dark .dashboard-revenue,body.theme-elegant-dark .dashboard-recent{background:#182c3b;border-color:#294557}body.theme-elegant-dark .dashboard-section-head h2,body.theme-elegant-dark .dashboard-section-head h2 span{color:#eef5f9}body.theme-elegant-dark .dashboard-section-head p{color:#94aabd}body.theme-elegant-dark .dashboard-quick-grid>a{background:linear-gradient(135deg,color-mix(in srgb,var(--quick-color) 13%,#142737),#142737 95%);border-color:color-mix(in srgb,var(--quick-color) 28%,#294557);color:#edf5f9}body.theme-elegant-dark .dashboard-quick-grid>a:hover{background:linear-gradient(135deg,color-mix(in srgb,var(--quick-color) 18%,#173043),#173043 95%);color:#fff}body.theme-elegant-dark .dashboard-quick-grid strong{color:#eef5f9}body.theme-elegant-dark .dashboard-quick-grid small{color:#9db2c2}body.theme-elegant-dark .dashboard-year{background:#112736;border-color:#355268;color:#a9c0d0}body.theme-elegant-dark .dashboard-chart-grid i,body.theme-elegant-dark .dashboard-chart-grid{border-color:#2d4b5f}body.theme-elegant-dark .dashboard-chart-y span,body.theme-elegant-dark .dashboard-chart-col b,body.theme-elegant-dark .dashboard-chart-bar span{color:#9fb7c9}body.theme-elegant-dark .dashboard-recent th{background:#142737;color:#afc1cd}body.theme-elegant-dark .dashboard-recent td{color:#dce8ef}body.theme-elegant-dark .dashboard-recent tbody tr:hover{background:#1d3545}body.theme-elegant-dark .dashboard-row-actions a{background:#142737;border-color:#2f4c60;color:#9fc9e6}body.theme-elegant-dark .dashboard-row-actions a:hover{background:#1b3a4e;border-color:#41677d;color:#5db8ff}

@media(max-width:1180px){.dashboard-grid-main{grid-template-columns:1fr}.dashboard-revenue{min-height:320px}.dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.topbar{flex-wrap:wrap}.topbar-search{order:3;flex-basis:100%;max-width:none}.topbar-actions{margin-left:auto}.brand{max-width:360px}.dashboard-chart{height:220px}}
@media(max-width:700px){.dashboard-kpis{grid-template-columns:1fr}.dashboard-quick-grid{grid-template-columns:1fr}.dashboard-chart{grid-template-columns:56px 1fr;height:210px}.dashboard-chart-bars{gap:5px}.dashboard-chart-bar{width:min(34px,72%)}.dashboard-row-actions{min-width:110px}}


/* 0.2.65-alpha: reference sidebar 288px + 50% = 432px, shared by all themes.
   Desktop only; the existing <=900px one-column layout remains responsive. */
:root{--sidebar-width:432px;--nav-icon-size:28px;--nav-item-gap:14px}
.app>.sidebar,.app>.main{min-width:0}
.sidebar .nav a,
.sidebar .nav-logout button{
    display:grid;
    grid-template-columns:var(--nav-icon-size) minmax(0,1fr);
    align-items:center;
    justify-content:start;
    gap:var(--nav-item-gap);
    text-align:left;
    min-width:0;
    min-height:46px;
}
.sidebar .nav-group>summary{display:flex;align-items:center;gap:var(--nav-item-gap);min-height:46px}
.sidebar .nav-summary-label{
    display:grid;
    grid-template-columns:var(--nav-icon-size) minmax(0,1fr);
    align-items:center;
    gap:var(--nav-item-gap);
    flex:1 1 auto;
    min-width:0;
}
.sidebar .nav-label{
    display:block;
    align-self:center;
    min-width:0;
    margin:0;
    padding:0;
    line-height:1.35;
    text-align:left;
    white-space:normal;
    overflow-wrap:anywhere;
}
.sidebar .nav-icon{
    display:grid;
    place-items:center;
    align-self:center;
    width:var(--nav-icon-size);
    height:var(--nav-icon-size);
    min-width:var(--nav-icon-size);
    margin:0;
}
.sidebar .nav-icon .ui-icon{width:24px;height:24px;display:block}
.sidebar .nav-chevron{flex:0 0 18px;width:18px;align-self:center;margin-left:auto}
@media screen and (min-width:901px) and (max-width:1400px){
    .dashboard-grid-main{grid-template-columns:minmax(0,1fr)}
    .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
    .topbar{flex-wrap:wrap}
    .topbar-search{order:3;flex-basis:100%;max-width:none}
    .topbar-actions{margin-left:auto}
}
@media screen and (min-width:901px) and (max-width:1080px){
    .dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* 0.2.71-alpha: aktives Druck-Grunddesign eindeutig markieren */
.template-preset-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.template-preset-card.is-current{border-color:#16a34a;background:#ecfdf5;box-shadow:0 0 0 2px rgba(22,163,74,.14)}
.template-preset-card.is-current strong{color:#166534}
.template-preset-state{display:inline-flex;align-items:center;border-radius:999px;padding:.2rem .48rem;background:#16a34a;color:#fff;font-size:.72rem;font-style:normal;font-weight:800;line-height:1.2}
.template-preset-active-button{background:#16a34a;color:#fff}
.template-preset-active-button:hover{background:#15803d;color:#fff}
body.theme-elegant-dark .template-preset-card.is-current{border-color:#4ade80;background:#123b2c;box-shadow:0 0 0 2px rgba(74,222,128,.12)}
body.theme-elegant-dark .template-preset-card.is-current strong{color:#bbf7d0}
body.theme-elegant-dark .template-preset-state,body.theme-elegant-dark .template-preset-active-button{background:#22c55e;color:#082f1e}

/* 0.2.75 Druckvorlagen: globale Grunddesigns + Vorschau vor Bearbeitung */
.print-template-sidebar{position:sticky;top:76px}.print-template-type-list{display:grid;gap:6px}.print-template-type-link{display:block;padding:.58rem .7rem;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);text-decoration:none;font-weight:700;line-height:1.25}.print-template-type-link:hover{background:#f5f8fb}.print-template-type-link.is-current{border-color:#17324d;background:#edf4fa;color:#17324d;box-shadow:inset 3px 0 0 #17324d}.print-template-preview-panel{overflow:hidden}.print-template-preview-head,.print-template-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.print-template-preview-head h2,.print-template-editor-head h2{margin-bottom:.25rem}.print-template-preview-frame{display:block;width:100%;height:900px;margin-top:12px;border:1px solid #cbd5e1;border-radius:10px;background:#dfe5ec}.print-template-preview-actions{margin-top:12px;align-items:center}.print-template-preview-actions form{margin:0}.print-template-preview-actions textarea{display:none}.template-preset-card .template-preset-state{white-space:nowrap}.template-preset-card span{min-height:64px}.print-template-editor-head{margin-bottom:12px}
body.theme-elegant-dark .print-template-type-link{background:#17212b;border-color:#334155;color:#e5e7eb}body.theme-elegant-dark .print-template-type-link:hover{background:#1f2c38}body.theme-elegant-dark .print-template-type-link.is-current{border-color:#7dd3fc;background:#153247;color:#e0f2fe;box-shadow:inset 3px 0 0 #7dd3fc}
@media(max-width:980px){.print-template-sidebar{position:static}.print-template-preview-frame{height:760px}}
@media(max-width:680px){.print-template-preview-head,.print-template-editor-head{flex-direction:column}.print-template-preview-frame{height:650px}.template-preset-card span{min-height:0}}

/* 0.2.76 Briefkopf-Vorschau: aktives Druck-Grunddesign statt generischem Musterkopf */
.brand-preview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:10px}
.brand-preview-heading h3{margin:0 0 .25rem}.brand-preview-heading p{margin:0}
.brand-preview-preset{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:.32rem .62rem;font-size:.78rem;font-weight:800}
.brand-preview-letterhead{display:block;min-height:185px;padding:24px 28px 18px;overflow:hidden}
.brand-preview-head-only{min-height:122px}
.brand-preview-letterhead .company-letterhead{width:100%;min-height:105px;position:relative}
.brand-preview-letterhead .company-logo-wrap.logo-right{float:right;margin:0 0 10px 30px}
.brand-preview-letterhead .company-logo-wrap.logo-left{float:left;margin:0 30px 10px 0}
.brand-preview-letterhead .company-logo-wrap.logo-center{float:none;text-align:center;margin:0 0 10px}
.brand-preview-letterhead .company-letterhead:after{content:"";display:block;clear:both}
.brand-preview-letterhead .company-letterhead-text{padding-top:28px}
.brand-preview-letterhead .legacy-letterhead-table{width:100%;border-collapse:collapse;table-layout:fixed}
.brand-preview-letterhead .legacy-logo-cell{width:56%;vertical-align:top;padding:8px 0 0 28px;border:0}
.brand-preview-letterhead .legacy-company-cell{width:44%;vertical-align:top;text-align:right;padding:0;border:0;font-size:.78rem;line-height:1.22;color:#111}
.brand-preview-letterhead .legacy-company-cell .legacy-spacer{display:block;height:8px}
.brand-preview-letterhead .legacy-brand-fallback{font-weight:800;font-size:1.4rem;line-height:1.05}
.brand-preview-sender-line{margin:10px 0 0 28px;max-width:48%;font-size:.76rem;line-height:1.25;text-decoration:underline;color:#222;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-preview-note{margin:.65rem 0 0}
.brand-preview-footer{display:block;min-height:0;padding:16px 20px}
.brand-preview-footer .company-footer{position:static!important;width:100%!important;margin:0!important}
body.theme-elegant-dark .brand-preview-preset{border-color:#2563eb;background:#172554;color:#bfdbfe}
@media(max-width:760px){.brand-preview-heading{flex-direction:column}.brand-preview-letterhead{padding:18px 16px}.brand-preview-letterhead .legacy-logo-cell{padding-left:0}.brand-preview-sender-line{margin-left:0;max-width:100%}.brand-preview-letterhead .legacy-company-cell{font-size:.7rem}}


/* 0.2.77-alpha: editierbarer Briefkopf/Fuss + sauberer rechter Kopfzeilenabstand */
.topbar-actions{padding-right:14px}
.branding-editor-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:16px;align-items:start;margin-top:14px}
.branding-editor-text textarea{min-height:142px;font-family:Arial,Helvetica,sans-serif;line-height:1.45}
.branding-format-card{border:1px solid var(--line);border-radius:10px;padding:12px 13px;background:#f8fafc}
.branding-format-card>strong{display:block;margin-bottom:9px;color:#233a59}
.branding-format-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.branding-format-grid label{font-size:.82rem;color:#52657e}.branding-format-grid input,.branding-format-grid select{margin-top:4px}
.branding-format-grid input[type=color]{height:43px;padding:4px;cursor:pointer}
.branding-style-toggles{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}.branding-style-toggles label{display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #d8e2ec;border-radius:8px;background:#fff;font-size:.84rem;cursor:pointer}.branding-style-toggles input{width:auto;margin:0}
.branding-preview-label{margin:16px 0 7px;font-size:.86rem;color:#50657f;text-transform:uppercase;letter-spacing:.04em}
.footer-count-select{display:flex;align-items:center;gap:8px;font-size:.84rem;white-space:nowrap}.footer-count-select select{width:76px;margin:0}
.footer-editor-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.footer-editor-field textarea{min-height:120px;font-family:Arial,Helvetica,sans-serif;font-size:.86rem;line-height:1.35}.footer-format-card{margin-top:8px}
.brand-preview-footer .company-footer.footer-cols-1 td{width:100%!important}.brand-preview-footer .company-footer.footer-cols-2 td{width:50%!important}.brand-preview-footer .company-footer.footer-cols-3 td{width:33.333%!important}.brand-preview-footer .company-footer.footer-cols-4 td{width:25%!important}
body.theme-elegant-dark .branding-format-card{background:#142737;border-color:#294557}body.theme-elegant-dark .branding-format-card>strong{color:#edf4f8}body.theme-elegant-dark .branding-style-toggles label{background:#102432;border-color:#365164;color:#edf4f8}
@media(max-width:1100px){.branding-editor-grid{grid-template-columns:1fr}.footer-editor-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.footer-editor-fields{grid-template-columns:1fr}.footer-count-select{align-self:flex-start}.topbar-actions{padding-right:8px}}

/* 0.2.79-alpha: schlanker lokaler HTML/WYSIWYG-Editor */
.simple-html-editor-card{overflow:visible}.mini-html-editor{margin-top:14px;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}.mini-html-toolbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:6px;border-bottom:1px solid var(--line);background:#f7f9fc}.mini-html-toolbar select,.mini-html-toolbar button,.mini-color-tool{height:32px;margin:0;border:1px solid #d5dee8;border-radius:6px;background:#fff;color:#26384f;font-size:.78rem;line-height:30px}.mini-html-toolbar select{width:auto;min-width:74px;padding:0 24px 0 8px}.mini-html-toolbar button{min-width:32px;padding:0 8px;cursor:pointer}.mini-html-toolbar button:hover,.mini-html-toolbar button.is-active{background:#e8f2ff;border-color:#93c5fd;color:#0b63b6}.mini-toolbar-sep{width:1px;height:22px;margin:0 2px;background:#dbe3ec}.mini-color-tool{display:flex;align-items:center;justify-content:center;gap:2px;padding:0 5px;font-weight:800;cursor:pointer}.mini-color-tool input{width:18px;height:18px;margin:0;padding:0;border:0;background:transparent;cursor:pointer}.mini-html-visual{min-height:185px;padding:12px 14px;outline:0;font-family:Arial,Helvetica,sans-serif;font-size:9pt;line-height:1.25;color:#111;background:#fff}.mini-html-visual:focus{box-shadow:inset 0 0 0 2px rgba(29,145,240,.14)}.mini-html-visual p,.mini-html-visual div{margin:0;padding:0}.mini-html-visual ul,.mini-html-visual ol{margin:.25em 0 .25em 1.5em;padding:0}.mini-html-code{display:block;width:100%;min-height:210px;margin:0;border:0;border-radius:0;padding:12px 14px;resize:vertical;font:12px/1.45 Consolas,"Courier New",monospace;color:#172033;background:#f8fafc}.mini-html-code:focus{outline:2px solid rgba(29,145,240,.18);outline-offset:-2px}.mini-html-editor.is-code-mode .mini-html-toolbar>:not(.mini-source-toggle){opacity:.45;pointer-events:none}.simple-editor-note{margin-top:14px}.editor-save-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.footer-part-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 8px}.footer-part-tab{border:1px solid var(--line);background:#f7f9fc;color:#40536d;border-radius:7px;padding:7px 12px;font-size:.82rem;font-weight:700;cursor:pointer}.footer-part-tab:hover,.footer-part-tab.is-active{background:#eaf4ff;border-color:#9cc9f7;color:#0b63b6}.footer-editor-pane{display:none}.footer-editor-pane.is-active{display:block}.footer-editor-pane[hidden]{display:none!important}.footer-width-hint{margin-top:8px;color:#71839a;font-size:.8rem}.simple-html-editor-card [hidden]{display:none!important}.footer-count-select select{width:78px}.simple-html-editor-card[data-footer-count="1"] .footer-part-tabs .footer-part-tab:nth-child(n+2){display:none}.simple-html-editor-card[data-footer-count="2"] .footer-part-tabs .footer-part-tab:nth-child(n+3){display:none}.simple-html-editor-card[data-footer-count="3"] .footer-part-tabs .footer-part-tab:nth-child(n+4){display:none}body.theme-elegant-dark .mini-html-editor{background:#102432;border-color:#365164}body.theme-elegant-dark .mini-html-toolbar{background:#142737;border-color:#365164}body.theme-elegant-dark .mini-html-toolbar select,body.theme-elegant-dark .mini-html-toolbar button,body.theme-elegant-dark .mini-color-tool{background:#102432;border-color:#365164;color:#edf4f8}body.theme-elegant-dark .mini-html-toolbar button:hover,body.theme-elegant-dark .mini-html-toolbar button.is-active{background:#173a54;border-color:#3f6b87;color:#7fc0ff}body.theme-elegant-dark .mini-toolbar-sep{background:#365164}body.theme-elegant-dark .mini-html-visual{background:#fff;color:#111}body.theme-elegant-dark .mini-html-code{background:#0d1d29;color:#d8e7f0}body.theme-elegant-dark .footer-part-tab{background:#142737;border-color:#365164;color:#c7d7e2}body.theme-elegant-dark .footer-part-tab:hover,body.theme-elegant-dark .footer-part-tab.is-active{background:#173a54;border-color:#3f6b87;color:#7fc0ff}@media(max-width:820px){.editor-save-row{align-items:flex-start;flex-direction:column}.mini-html-toolbar{gap:3px}.mini-html-toolbar select{min-width:68px}.mini-html-toolbar button{padding:0 6px}.mini-toolbar-sep{display:none}}
/* 0.2.80-alpha: Logo & Geschäftspapier mit Speicheraktion und aktiver Vorschau */
.branding-logo-head{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:14px}.branding-logo-head h3{margin:0 0 .25rem}.branding-logo-head p{margin:0}.branding-logo-preview-card{width:190px;min-height:96px;border:1px solid var(--line);border-radius:10px;background:#f8fafc;padding:9px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;flex:0 0 auto}.branding-logo-preview-card>span{align-self:flex-start;color:#6a7d94;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.branding-logo-preview-card img{display:block;max-width:168px;max-height:58px;width:auto;height:auto;object-fit:contain}.branding-logo-preview-card small{color:#6f8198;font-size:.72rem}.branding-logo-empty{min-height:48px;display:flex;align-items:center;justify-content:center;color:#8797aa;font-size:.78rem}.branding-logo-fields{align-items:start}.branding-logo-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}body.theme-elegant-dark .branding-logo-preview-card{background:#142737;border-color:#365164}body.theme-elegant-dark .branding-logo-preview-card>span,body.theme-elegant-dark .branding-logo-preview-card small,body.theme-elegant-dark .branding-logo-empty{color:#b7c8d6}@media(max-width:760px){.branding-logo-head{flex-direction:column}.branding-logo-preview-card{width:100%;box-sizing:border-box}.branding-logo-actions{align-items:stretch;flex-direction:column-reverse}.branding-logo-actions .btn{width:100%}}

/* 0.2.82 - Vorschlaege & Verbesserungswuensche */
.improvement-intro{display:flex;align-items:center;justify-content:space-between;gap:18px}.improvement-intro h2{margin:0 0 6px}.improvement-intro p{margin:0;max-width:850px}
.improvement-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0}.improvement-stats>div{background:var(--panel,#fff);border:1px solid var(--border,#dfe6ef);border-radius:12px;padding:14px 16px;display:flex;align-items:baseline;justify-content:space-between;gap:12px}.improvement-stats strong{font-size:25px;line-height:1}.improvement-stats span{font-size:13px;color:var(--muted,#667085);font-weight:700}
.improvement-filter{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(170px,.7fr) minmax(170px,.7fr) auto;gap:12px;align-items:end}.improvement-filter label,.improvement-form label{display:grid;gap:6px;font-weight:700}.improvement-filter .actions{margin:0;align-self:end;flex-wrap:nowrap}
.improvement-layout{display:grid;grid-template-columns:minmax(340px,.95fr) minmax(420px,1.25fr);gap:16px;align-items:start}.improvement-editor,.improvement-list-panel{min-width:0}.improvement-editor details{border-top:1px solid var(--border,#e4e9f0);margin-top:16px;padding-top:12px}.improvement-editor summary{cursor:pointer;font-weight:800;margin-bottom:12px}.improvement-description{line-height:1.55;white-space:normal;margin:12px 0 16px}.improvement-form{display:grid;grid-template-columns:1fr 1fr;gap:13px}.improvement-form .wide{grid-column:1/-1}.improvement-form textarea{resize:vertical;min-height:110px}.improvement-meta{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.improvement-meta span,.improvement-item-meta em{display:inline-flex;align-items:center;border-radius:999px;background:#eef2f6;padding:5px 9px;font-size:12px;font-style:normal;font-weight:800}.improvement-meta .priority-kritisch,.improvement-item-meta .priority-kritisch{background:#fee4e2;color:#b42318}.improvement-meta .priority-hoch,.improvement-item-meta .priority-hoch{background:#fff0d5;color:#9a5b00}.improvement-meta .priority-mittel,.improvement-item-meta .priority-mittel{background:#eaf2ff;color:#175cd3}.improvement-meta .priority-niedrig,.improvement-item-meta .priority-niedrig{background:#ecfdf3;color:#087a4b}.improvement-delete{margin-top:16px}
.improvement-list{display:grid;gap:9px}.improvement-item{display:grid;grid-template-columns:minmax(0,1fr) auto 18px;gap:12px;align-items:center;border:1px solid var(--border,#dfe6ef);border-radius:10px;padding:12px 13px;text-decoration:none;color:inherit;background:var(--panel,#fff);transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.improvement-item:hover{border-color:#9db5cf;box-shadow:0 4px 14px rgba(22,44,72,.07)}.improvement-item.selected{border-color:#1677ff;background:#f5f9ff}.improvement-main{display:grid;gap:5px;min-width:0}.improvement-main strong{overflow-wrap:anywhere}.improvement-main small{color:var(--muted,#667085)}.improvement-item-meta{display:flex;align-items:flex-end;flex-direction:column;gap:5px}.improvement-item-meta small{font-size:11px;color:var(--muted,#667085)}.improvement-item>b{font-size:22px;color:var(--muted,#667085)}
@media(max-width:1100px){.improvement-filter{grid-template-columns:1fr 1fr}.improvement-filter .actions{grid-column:1/-1}.improvement-layout{grid-template-columns:1fr}.improvement-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.improvement-intro{align-items:flex-start;flex-direction:column}.improvement-stats{grid-template-columns:1fr 1fr}.improvement-filter,.improvement-form{grid-template-columns:1fr}.improvement-form .wide,.improvement-filter .actions{grid-column:auto}.improvement-item{grid-template-columns:minmax(0,1fr) 18px}.improvement-item-meta{grid-column:1/-1;grid-row:2;align-items:flex-start;flex-direction:row;flex-wrap:wrap}.improvement-item>b{grid-column:2;grid-row:1}.improvement-filter .actions{flex-wrap:wrap}}

/* 0.2.83-alpha: Kopfzeile links/rechts symmetrischer Innenabstand */
.topbar-title{padding-left:14px}
@media(max-width:680px){.topbar-title{padding-left:8px}}

/* 0.2.84-alpha: Einrichtungsassistent fuer frische Installationen */
.dashboard-setup-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;margin:0 0 16px;padding:15px 16px;border:1px solid #c9d9ec;border-radius:12px;background:#f8fbff}.dashboard-setup-card.is-open{border-color:#8fbcec;background:#eef6ff}.dashboard-setup-card.is-complete{background:#f8fafc}.dashboard-setup-icon{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:#dcecff;color:#1768bd}.dashboard-setup-icon .ui-icon{width:24px;height:24px}.dashboard-setup-copy{display:grid;gap:4px;min-width:0}.dashboard-setup-copy>strong{font-size:1.02rem}.dashboard-setup-copy>span,.dashboard-setup-copy>small{color:var(--muted);line-height:1.35}.setup-progress{height:7px;border-radius:999px;background:#dfe7f0;overflow:hidden}.setup-progress>i{display:block;height:100%;min-width:0;background:var(--accent);border-radius:inherit}.dashboard-setup-copy .setup-progress{max-width:420px;margin-top:3px}
.setup-shell{max-width:1180px;margin:0 auto}.setup-head{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 20px}.setup-head h2{margin:3px 0 6px}.setup-head p{margin:0;color:var(--muted)}.setup-eyebrow{font-size:.74rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--accent)}.setup-progress-box{min-width:190px;display:grid;gap:5px;text-align:right}.setup-progress-box strong{font-size:1.2rem}.setup-progress-box span{font-size:.8rem;color:var(--muted)}.setup-progress-box .setup-progress{width:190px;margin-left:auto}
.setup-steps{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;margin:0 0 14px}.setup-steps a{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:7px 8px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:#40536d;font-size:.78rem;font-weight:750;text-align:center}.setup-steps a>span{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#eef2f7;color:#52647a;font-size:.72rem;flex:0 0 auto}.setup-steps a.is-active{border-color:#8fbcec;background:#eef6ff;color:#0f5faa}.setup-steps a.is-active>span{background:var(--accent);color:#fff}.setup-steps a.is-done{border-color:#a7d9bd;background:#f2fbf6;color:#17663b}.setup-steps a.is-done>span{background:#dff3e7;color:#17663b}
.setup-card{padding:20px}.setup-card h2{margin-top:0}.setup-card>p:first-of-type{margin-top:-2px;color:var(--muted)}.setup-prep-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.setup-prep-grid>div{border:1px solid var(--line);border-radius:10px;padding:13px 14px;background:#fafcff}.setup-prep-grid strong{display:block;margin-bottom:6px}.setup-prep-grid ul{margin:0;padding-left:19px;color:#4f6076;line-height:1.55}.setup-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.setup-actions button[disabled]{opacity:.5;cursor:not-allowed}.setup-logo-row{display:grid;grid-template-columns:250px minmax(0,1fr);gap:18px;align-items:center}.setup-logo-preview{display:block;max-width:230px;max-height:90px;width:auto;height:auto;object-fit:contain}.setup-logo-placeholder{min-height:92px;border:1px dashed #b9c8d8;border-radius:10px;display:grid;place-items:center;color:var(--muted);background:#fafcff;text-align:center;padding:12px}.setup-number-box{display:grid;grid-template-columns:minmax(220px,320px) minmax(0,1fr);gap:18px;align-items:end}.setup-number-box>div{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fafcff;display:grid;gap:3px}.setup-number-box>div span,.setup-number-box>div small{color:var(--muted);font-size:.8rem}.setup-number-box>div strong{font-size:1.08rem}.setup-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}.setup-summary-grid a{display:grid;gap:4px;border:1px solid var(--line);border-radius:10px;padding:13px 14px;background:#fafcff;color:inherit}.setup-summary-grid a:hover{border-color:#9cb9d8;background:#f5f9ff}.setup-summary-grid span{color:var(--muted);font-size:.86rem}
body.theme-elegant-dark .dashboard-setup-card,body.theme-elegant-dark .setup-prep-grid>div,body.theme-elegant-dark .setup-logo-placeholder,body.theme-elegant-dark .setup-number-box>div,body.theme-elegant-dark .setup-summary-grid a{background:#142737;border-color:#365164;color:#edf4f8}body.theme-elegant-dark .dashboard-setup-card.is-open{background:#17344a;border-color:#3f6b87}body.theme-elegant-dark .setup-steps a{background:#142737;border-color:#365164;color:#c7d7e2}body.theme-elegant-dark .setup-steps a.is-active{background:#173a54;border-color:#3f6b87;color:#8cc8ff}body.theme-elegant-dark .setup-steps a.is-done{background:#17392c;border-color:#356c50;color:#9de0b8}
@media(max-width:980px){.setup-steps{grid-template-columns:repeat(4,minmax(0,1fr))}.setup-prep-grid{grid-template-columns:1fr}.setup-summary-grid{grid-template-columns:1fr}.dashboard-setup-card{grid-template-columns:auto minmax(0,1fr)}.dashboard-setup-card>.btn{grid-column:1/-1;width:100%;text-align:center}.setup-head{align-items:flex-start}.setup-logo-row,.setup-number-box{grid-template-columns:1fr}}
@media(max-width:620px){.setup-head{flex-direction:column}.setup-progress-box{width:100%;text-align:left}.setup-progress-box .setup-progress{width:100%;margin-left:0}.setup-steps{grid-template-columns:1fr 1fr}.setup-steps a{justify-content:flex-start}.dashboard-setup-card{grid-template-columns:1fr}.dashboard-setup-icon{display:none}.setup-actions>.btn,.setup-actions>button{width:100%;text-align:center}.setup-logo-preview{max-width:100%}}


/* 0.2.85: kundenfreundliche Hilfe im Einrichtungsassistenten E-Rechnung */
.setup-einvoice-hint{margin:14px 0 18px;padding:12px 14px;border:1px solid #cfe2f7;border-radius:10px;background:#f3f8fe;color:#36536f;line-height:1.5}.setup-einvoice-hint strong{color:#173a5e}.setup-check-line{display:flex;align-items:center;gap:9px;padding:10px 12px;border:1px solid #dfe7f0;border-radius:9px;background:#f9fbfd;font-weight:600}.setup-check-line input{width:auto;margin:0;flex:0 0 auto}.setup-check-line span{line-height:1.35}.setup-einvoice-status{margin:10px 0 0;padding-left:2px}.field-help:hover,.field-help:focus{background:#dfeeff;border-color:#7ba8d6;color:#174e89}.field-help:focus-visible{outline:3px solid rgba(27,111,209,.22);outline-offset:2px}.field-help[aria-expanded="true"]::after,.field-help[aria-expanded="true"]::before{opacity:1;visibility:visible}.setup-card input[readonly][data-einvoice-address]{background:#f4f7fa;color:#52657a;cursor:default}
body.theme-elegant-dark .setup-einvoice-hint{background:#142f43;border-color:#355c78;color:#bdd1df}body.theme-elegant-dark .setup-einvoice-hint strong{color:#edf4f8}body.theme-elegant-dark .setup-check-line{background:#142737;border-color:#365164;color:#edf4f8}body.theme-elegant-dark .field-help{background:#173a54;border-color:#3f6b87;color:#9ed0ff}body.theme-elegant-dark .setup-card input[readonly][data-einvoice-address]{background:#102432;color:#a9bdca}
@media(max-width:620px){.setup-einvoice-hint{margin-top:10px}.setup-check-line{align-items:flex-start}}


/* 0.2.86-alpha: ausfuehrliche kontextsensitive Hilfe im Einrichtungsassistenten */
.field-help{touch-action:manipulation}
.field-help::after{width:min(420px,calc(100vw - 40px));max-width:420px}
.setup-card h2 .field-help{transform:translateY(-1px)}
.setup-prep-grid .field-help{margin-left:.2rem}
.setup-check-line .field-help{margin-left:.2rem}
@media(max-width:620px){.field-help::after{width:min(330px,calc(100vw - 36px));font-size:.8rem;line-height:1.4}.setup-prep-grid .field-help{vertical-align:text-bottom}}


/* 0.2.87-alpha: sichtbare Pflichtfeld-Kennzeichnung im Einrichtungsassistenten */
.setup-required-mark{display:inline-block;margin-left:.16rem;color:#c62828;font-size:1.02em;font-weight:900;line-height:1;vertical-align:baseline}.setup-required-badge{display:inline-flex;align-items:center;margin-left:.3rem;padding:.13rem .42rem;border:1px solid #e3b8a5;border-radius:999px;background:#fff4ee;color:#9b3d16;font-size:.68rem;font-weight:800;line-height:1.2;vertical-align:middle;white-space:nowrap}.setup-required-legend{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0 16px;padding:9px 11px;border:1px solid #efc2c2;border-radius:9px;background:#fff7f7;color:#7d2626;font-size:.84rem;line-height:1.35}.setup-required-legend .setup-required-mark{margin-left:0;font-size:1.2rem}.setup-required-legend>span:last-child{color:#695050}.setup-required-legend.conditional{border-color:#ecd3a8;background:#fffaf0;color:#7b5618}.setup-required-legend.conditional>span:last-child{color:#6c604b}.setup-required-legend.optional{border-color:#d5e1ee;background:#f7faff;color:#425b75}.setup-required-legend.optional>span:last-child{color:#627386}.setup-card [data-xinvoice-required].is-required-now{padding:.45rem .55rem;border-left:3px solid #c62828;border-radius:5px;background:#fff8f8}.setup-card [data-xinvoice-required].is-required-now .setup-required-badge{border-color:#d8876b;background:#ffe9df;color:#8f2d0a}.setup-card input:required,.setup-card select:required{border-left-color:#c62828}.setup-card label:has(>input:required) .setup-required-mark,.setup-card label:has(>select:required) .setup-required-mark{color:#b71c1c}body.theme-elegant-dark .setup-required-mark{color:#ff9a9a}body.theme-elegant-dark .setup-required-badge{background:#3a251d;border-color:#80513e;color:#ffc1a5}body.theme-elegant-dark .setup-required-legend{background:#351f24;border-color:#76404a;color:#ffbdc4}body.theme-elegant-dark .setup-required-legend>span:last-child{color:#dcb8bd}body.theme-elegant-dark .setup-required-legend.conditional{background:#332b1c;border-color:#6f5a32;color:#f0d194}body.theme-elegant-dark .setup-required-legend.conditional>span:last-child{color:#d8c7a6}body.theme-elegant-dark .setup-required-legend.optional{background:#162a3a;border-color:#35516a;color:#c6d8e7}body.theme-elegant-dark .setup-required-legend.optional>span:last-child{color:#a9bdcc}body.theme-elegant-dark .setup-card [data-xinvoice-required].is-required-now{background:#341f23;border-left-color:#ff9a9a}
@media(max-width:620px){.setup-required-badge{white-space:normal}.setup-required-legend{align-items:flex-start}.setup-card [data-xinvoice-required].is-required-now{padding:.5rem}}

/* 0.2.89-alpha: strukturierte, minimalistische Belegbearbeitung */
.document-workspace{max-width:1600px;margin:0 auto}.document-workspace .panel{margin-bottom:.85rem}.document-workspace textarea{min-height:76px}.document-head-card{padding:.9rem 1rem}.document-head-grid{display:grid;grid-template-columns:minmax(280px,1.3fr) minmax(260px,.9fr) auto;gap:18px;align-items:center}.document-customer-summary{display:flex;flex-direction:column;gap:3px;min-width:0}.document-customer-summary strong{font-size:1rem}.document-customer-summary>span:last-child{color:var(--muted);font-size:.88rem}.document-kicker{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:800}.document-status-summary{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}.document-status-item{display:grid;gap:4px;min-width:90px}.document-status-item>span{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:750}.document-status-item small{color:var(--muted);font-size:.72rem}.document-head-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap}.document-head-actions form,.document-list-actions form,.document-line-actions form,.document-finish-actions form,.document-secondary-body form{margin:0}.document-secondary-actions{padding:.78rem 1rem}.document-secondary-actions>summary{cursor:pointer;font-weight:750;color:#31445f;list-style:none;display:flex;align-items:center;justify-content:space-between}.document-secondary-actions>summary::-webkit-details-marker{display:none}.document-secondary-actions>summary:after{content:"+";font-size:1.15rem;color:var(--muted)}.document-secondary-actions[open]>summary:after{content:"−"}.document-secondary-body{padding-top:.9rem}.document-followup-form{display:flex;gap:8px;align-items:center}.document-followup-form select{width:auto;min-width:190px}.document-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:.85rem}.document-section-head h2,.document-section-head h3{margin:0 0 .2rem}.document-section-head p{margin:0}.document-form-card{padding:1rem 1.1rem}.document-basic-grid{display:grid;grid-template-columns:170px minmax(280px,1fr) 170px 170px;gap:.85rem;align-items:end}.document-text-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem;margin-top:.85rem}.document-text-grid textarea{min-height:76px}.document-full-field{margin-top:.85rem}.document-disclosure{margin-top:.8rem;border:1px solid var(--line);border-radius:9px;background:#fbfcfe;overflow:hidden}.document-disclosure>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:.72rem .85rem;font-weight:750;list-style:none}.document-disclosure>summary::-webkit-details-marker{display:none}.document-disclosure>summary small{font-weight:600;color:var(--muted)}.document-disclosure>summary:after{content:"+";margin-left:auto;color:var(--muted);font-size:1.1rem}.document-disclosure[open]>summary:after{content:"−"}.document-disclosure[open]>summary{border-bottom:1px solid var(--line);background:#f7f9fc}.document-disclosure-body{padding:.85rem}.document-terms-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;margin-top:.85rem}.document-save-row{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:.9rem;padding-top:.85rem;border-top:1px solid #edf1f5}.document-lines-card{padding:1rem 1.1rem}.table-scroll{overflow-x:auto}.document-lines-table{min-width:900px}.document-line-description{min-width:260px}.document-line-description small{display:block;color:var(--muted);margin-bottom:3px}.document-line-actions{justify-content:flex-end;gap:4px;flex-wrap:nowrap}.document-line-actions .btn{white-space:nowrap}.document-empty-lines{padding:1.35rem;text-align:center;color:var(--muted);background:#fafbfd;border-radius:8px}.document-totals{width:min(360px,100%);margin:.9rem 0 0 auto;border-top:1px solid var(--line);padding-top:.45rem}.document-totals>div{display:flex;justify-content:space-between;gap:18px;padding:.32rem .1rem}.document-totals span{color:var(--muted)}.document-totals strong{font-variant-numeric:tabular-nums}.document-totals .document-grand-total{font-size:1.08rem;padding-top:.5rem;border-top:1px solid #edf1f5}.document-totals .document-grand-total span,.document-totals .document-grand-total strong{color:#172033;font-weight:800}.document-add-line-card{padding:1rem 1.1rem}.document-line-main-grid{display:grid;grid-template-columns:minmax(320px,1.5fr) 110px 150px 145px 120px;gap:.85rem;align-items:end}.document-item-select{grid-column:span 3}.document-line-description-input{grid-column:span 3}.document-line-description-input textarea{min-height:72px}.document-line-extra{margin-top:.9rem}.document-checkbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;padding-top:.2rem}.document-checkbox-grid label{font-weight:600;display:flex;gap:.45rem;align-items:center}.document-checkbox-grid input{width:auto;margin:0}.document-add-row{display:flex;justify-content:flex-end;margin-top:.9rem}.document-finish-card{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:1rem 1.1rem}.document-finish-card h2{margin:0 0 .2rem}.document-finish-card p{margin:0}.document-finish-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.document-list-actions{justify-content:flex-end;flex-wrap:nowrap}.btn:disabled{opacity:.5;cursor:not-allowed}.document-workspace .badge.cancelled{background:#f1f3f5;color:#596273}
@media(max-width:1250px){.document-head-grid{grid-template-columns:1fr 1fr}.document-head-actions{grid-column:1/-1;justify-content:flex-start}.document-basic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.document-line-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.document-item-select,.document-line-description-input{grid-column:span 2}.document-terms-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.document-head-grid,.document-text-grid,.document-basic-grid,.document-line-main-grid,.document-terms-grid,.document-checkbox-grid{grid-template-columns:1fr}.document-head-actions,.document-save-row,.document-finish-card,.document-finish-actions{justify-content:flex-start;align-items:stretch}.document-head-actions,.document-finish-actions{flex-direction:column}.document-head-actions .btn,.document-finish-actions .btn,.document-head-actions form,.document-finish-actions form,.document-finish-actions button{width:100%}.document-status-summary{gap:10px}.document-item-select,.document-line-description-input{grid-column:auto}.document-save-row{flex-direction:column}.document-finish-card{flex-direction:column;align-items:stretch}.document-followup-form{align-items:stretch;flex-direction:column}.document-followup-form select{width:100%}}

/* 0.2.92: einheitliche deutsche Zahlen-/Waehrungsdarstellung in Eingabefeldern */
.locale-number-wrap{display:flex;align-items:center;gap:8px;width:100%}
.locale-number-wrap>input{flex:1 1 auto;min-width:0;width:auto}
.locale-number-suffix{flex:0 0 auto;font-weight:700;color:var(--muted,#64748b);white-space:nowrap}
.actions .locale-number-wrap{width:auto}
.actions .locale-number-wrap>input{flex:0 1 auto}
.locale-money>input,.locale-percent>input{text-align:right}

/* 0.2.97-alpha: schlanker 3-Schritt-Belegassistent */
.document-start-card{max-width:920px;margin-left:auto;margin-right:auto}
.document-wizard{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 .85rem}
.document-wizard-step{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:.65rem .8rem;border:1px solid var(--line);border-radius:9px;background:#fff;color:#53657d;text-decoration:none;font-weight:700}
.document-wizard-step span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#edf2f7;color:#53657d;font-size:.82rem;flex:0 0 auto}
.document-wizard-step.is-active{border-color:#8bb9eb;background:#f2f8ff;color:#143f6b}
.document-wizard-step.is-active span{background:#1677ff;color:#fff}
.document-wizard-step.is-done{color:#24633f}
.document-wizard-step.is-done span{background:#e8f5ed;color:#24633f}
.document-wizard-footer{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:.85rem 1rem}
.document-wizard-footer .muted{margin-right:auto}
.document-finish-summary{min-width:0;flex:1}
.document-review-facts{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:8px;margin-top:.85rem}
.document-review-facts span{display:grid;gap:2px;padding:.62rem .7rem;border:1px solid #e7edf4;border-radius:8px;background:#fafbfd}
.document-review-facts small{color:var(--muted);font-weight:650}
.document-review-facts strong{font-variant-numeric:tabular-nums}
@media(max-width:760px){.document-wizard{grid-template-columns:1fr}.document-wizard-step{justify-content:flex-start}.document-wizard-footer{align-items:stretch;flex-direction:column}.document-wizard-footer .muted{margin-right:0}.document-review-facts{grid-template-columns:1fr 1fr}}

.document-format-tools{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;grid-column:1/-1}.document-format-tools[hidden],.document-item-select [hidden]{display:none!important}.document-format-tools label{display:flex;gap:.5rem;align-items:center}.document-format-tools select{width:auto}.document-item-select{display:grid;gap:.3rem}.document-item-select>select{width:100%}

/* Softwarelizenz: auffaelliges, barrierearm beschriftetes Ablaufdatum. */
.license-expiry{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem 2rem;margin:1rem 0 1.25rem;padding:1.15rem 1.35rem;border:2px solid;border-radius:10px}
.license-expiry__block{min-width:0;display:flex;flex-direction:column;gap:.25rem}
.license-expiry__label{font-size:.85rem;font-weight:750;text-transform:uppercase;letter-spacing:.055em}
.license-expiry__date{font-size:clamp(1.7rem,3vw,2.35rem);font-weight:850;line-height:1.2;overflow-wrap:anywhere}
.license-expiry__remaining{font-size:clamp(1.25rem,2.4vw,1.85rem);font-weight:800;line-height:1.3}
.license-expiry--success{background:#eaf8ef;border-color:#9bd4b0;color:#165c36}
.license-expiry--warning{background:#fff5df;border-color:#e7b552;color:#755000}
.license-expiry--danger{background:#fff0f0;border-color:#e29b98;color:#a11e20}
.license-expiry--neutral{background:#f1f4f8;border-color:#cbd5e1;color:#344054}
@media(max-width:620px){.license-expiry{grid-template-columns:1fr;padding:1rem}}


/* Faktura Bildschirmbreite 1600px, responsiv und zentriert.
   Die obere Navigation und modale Dialoge behalten ihre eigene Breite.
   Der PDF- und Rechnungsdruck bleibt unveraendert. */
@media screen {
  .app > main.main > :not(.topbar):not(#a1-update-notice):not(.a1-backup-overlay):not(dialog):not(script):not(style):not([role="dialog"]):not([class*="overlay"]):not([class*="modal"]) {
    box-sizing: border-box;
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    margin-inline: auto;
  }
  .app > main.main > .document-workspace {
    max-width: 1600px;
  }
}

/* A1 OP-Optik 2026-10-17: nur Tabellen mit OP-Wiedervorlage. */
@media screen {
 table:has(input[name="action"][value="save_op"]) { --op-row-a:#f6f6f6; --op-row-b:#e9e9e9; --op-line:#d1d1d1; --op-pay:#fff5ce; --op-pay-head:#ffedaf; }
 table:has(input[name="action"][value="save_op"]) > tbody > tr:has(>td):nth-child(even) > td { background:var(--op-row-a); }
 table:has(input[name="action"][value="save_op"]) > tbody > tr:has(>td):nth-child(odd) > td { background:var(--op-row-b); }
 table:has(input[name="action"][value="save_op"]) > tbody > tr > td { border-bottom:1px solid var(--op-line); }
 table:has(input[name="action"][value="save_op"]) > tbody > tr > td:last-child { background:var(--op-pay)!important; border-left:2px solid #e4ce84; }
 table:has(input[name="action"][value="save_op"]) > tbody > tr > th:last-child { background:var(--op-pay-head); border-left:2px solid #e4ce84; }
 body.theme-elegant-dark table:has(input[name="action"][value="save_op"]) { --op-row-a:#25313b; --op-row-b:#303d48; --op-line:#50606c; --op-pay:#fff5ce; --op-pay-head:#ffedaf; }
 body.theme-elegant-dark table:has(input[name="action"][value="save_op"]) > tbody > tr > :last-child { color:#243347; }
 body.theme-elegant-dark table:has(input[name="action"][value="save_op"]) > tbody > tr > td:last-child .muted { color:#536174; }
}

/* Zahlungsspalte folgt dem Zeilenwechsel der offenen Posten. */
@media screen {
 table:has(input[name="action"][value="save_op"]) > tbody > tr:has(>td):nth-child(even) > td:last-child { background:#fff8df!important; border-bottom-color:#ddca87; }
 table:has(input[name="action"][value="save_op"]) > tbody > tr:has(>td):nth-child(odd) > td:last-child { background:#ffecaf!important; border-bottom-color:#ddca87; }
}

/* A1-Faktura: bessere Zeilenführung in Bildschirmtabellen. */
@media screen {
 .main { --a1-list-row-light:#f6f6f6; --a1-list-row-dark:#e9e9e9; --a1-list-row-border:#cdd2d7; }
 body.theme-elegant-dark .main { --a1-list-row-light:#25313b; --a1-list-row-dark:#303d48; --a1-list-row-border:#50606c; }
 :where(.main table:has(th)) > tbody > tr:nth-child(odd) > td { background-color:var(--a1-list-row-light); }
 :where(.main table:has(th)) > tbody > tr:nth-child(even) > td { background-color:var(--a1-list-row-dark); }
 :where(.main table:has(th)) > tbody > tr > td { border-bottom:1px solid var(--a1-list-row-border); }
}
