/* Opt-in presentation only. Existing mobile visibility and widget settings win. */
#ebner-appearance-toggle{font:inherit;font-size:11px;padding:8px 10px;min-height:34px;border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}
.ebner-brand-logo,.ebner-nav-icon{display:none}
html[data-ebner-appearance="modern"]{--bg:#f5f6f8;--bg-soft:#fff;--bg-softer:#edf0f3;--fg:#292d33;--border:#e0e4e9;--muted:#6f7886;--accent:#b32931;--accent-hover:#95232c;--error:#bd2736;--sidebar-w:228px;color-scheme:light}
html[data-ebner-appearance="modern"] body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.5}
html[data-ebner-appearance="modern"] .sidebar{background:#272a2f;border-right:0;padding:0 12px 16px;color:#e9eaed}
html[data-ebner-appearance="modern"] .sidebar .brand{visibility:visible!important;height:auto!important;min-height:110px;flex-shrink:0;margin:0 -12px 18px;padding:23px 18px!important;border-bottom:3px solid #b32931;background:#fff;font-size:0}
html[data-ebner-appearance="modern"] .ebner-brand-logo{display:block;width:192px;max-width:100%;height:auto;margin:auto}
html[data-ebner-appearance="modern"] .sidebar .nav-btn{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:500;min-height:39px;padding:9px 12px;border-radius:6px;background:transparent;color:#c6c9d0;border:0}
html[data-ebner-appearance="modern"] .sidebar .nav-btn.active{background:#443135;color:#fff;box-shadow:inset 3px 0 #d44a50;font-weight:600}
html[data-ebner-appearance="modern"] .sidebar .nav-btn:hover{background:#373236;color:#fff}
html[data-ebner-appearance="modern"] .ebner-nav-icon{display:inline-block;width:16px;height:16px;flex-shrink:0;opacity:.85}
html[data-ebner-appearance="modern"] .nav-group-header{color:#8e939d;font-size:10px;letter-spacing:1.1px;padding:19px 12px 7px;background:transparent}
html[data-ebner-appearance="modern"] .sidebar-footer{border-top-color:#ffffff20;color:#a2a7b0}
html[data-ebner-appearance="modern"] .sidebar-footer .muted,html[data-ebner-appearance="modern"] .sidebar-footer button{color:#b8bdc6}
html[data-ebner-appearance="modern"] #ebner-appearance-toggle{border-color:#ffffff30;color:#e0e2e6;background:#303339}
html[data-ebner-appearance="modern"] .ebner-decorative-emoji{display:none}
html[data-ebner-appearance="modern"] h1{font-size:27px;font-weight:650;letter-spacing:-.7px}
html[data-ebner-appearance="modern"] h2{font-size:17px;font-weight:600}
html[data-ebner-appearance="modern"] button,html[data-ebner-appearance="modern"] input,html[data-ebner-appearance="modern"] select,html[data-ebner-appearance="modern"] textarea{font-family:inherit;border-radius:6px}
html[data-ebner-appearance="modern"] button{font-size:13px;padding:8px 12px}
html[data-ebner-appearance="modern"] button:focus-visible,html[data-ebner-appearance="modern"] a:focus-visible{outline:2px solid #cc777d;outline-offset:3px}
html[data-ebner-appearance="modern"] input:focus,html[data-ebner-appearance="modern"] select:focus,html[data-ebner-appearance="modern"] textarea:focus{outline:2px solid #f4dde0;border-color:#c67579}
html[data-ebner-appearance="modern"] .view-actions{gap:8px;flex-wrap:wrap}
html[data-ebner-appearance="modern"] .view-actions>button{white-space:nowrap;flex-shrink:0}
html[data-ebner-appearance="modern"] .view-actions>select{width:auto;min-width:100px}
html[data-ebner-appearance="modern"] .table-wrap{border:1px solid #e0e4e9;border-radius:8px;background:#fff}
html[data-ebner-appearance="modern"] table{font-size:13px}
html[data-ebner-appearance="modern"] th{background:#f7f8fa;color:#758090;font-size:10px;letter-spacing:.55px;font-weight:650}
html[data-ebner-appearance="modern"] td{border-bottom-color:#edf0f3}
html[data-ebner-appearance="modern"] tbody tr:hover{background:#fafafb}
html[data-ebner-appearance="modern"] fieldset{background:#fff;border-radius:8px}
html[data-ebner-appearance="modern"] .modal-card{border-radius:10px;box-shadow:0 16px 60px #15181c30}
html[data-ebner-appearance="modern"] .dash-widget{background:#fff!important;border:1px solid #e0e4e9!important;border-radius:8px!important;padding:17px!important;min-width:0}
html[data-ebner-appearance="modern"] #dash-widget-container{gap:14px!important}
html[data-ebner-appearance="modern"] .stat-card{box-shadow:none;border-radius:8px;padding:15px}
html[data-ebner-appearance="modern"] .badge{border-radius:4px;font-size:11px}
@media(min-width:861px){html[data-ebner-appearance="modern"] .content{padding:28px 30px}}
@media(max-width:860px){html[data-ebner-appearance="modern"] .sidebar .brand{padding-top:20px!important}html[data-ebner-appearance="modern"] .sidebar .nav-btn{min-height:44px}html[data-ebner-appearance="modern"] #ebner-appearance-toggle{min-height:44px}html[data-ebner-appearance="modern"] .dash-widget{padding:12px!important}}
@media(max-width:480px){html[data-ebner-appearance="modern"] h1{font-size:23px}html[data-ebner-appearance="modern"] table{font-size:12px}html[data-ebner-appearance="modern"] #dash-widget-container{gap:9px!important}}
@media print{#ebner-appearance-toggle{display:none!important}}
/* Compact AN / AG / RE header. IDs, fields, DOM/tab order and handlers stay intact. */
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.view-header{gap:10px;margin-bottom:16px}
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.view-header .view-actions{gap:6px}
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.view-header button{font-size:12px;padding:7px 10px;min-height:32px}
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 14px;padding:14px 16px;align-items:start}
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child>label{margin:0;font-size:11px;min-width:0;line-height:1.5}
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child>label:has(:is(#qe-customer-search,#qe-title,#qe-top-heading,#qe-vat-mode,#qe-object-address,#inve-customer-search,#inve-title,#inve-comment,#inve-object-address)){grid-column:span 2}
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child>label:has(#qe-intro-editor){grid-column:1/-1}
html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child :is(input,select,textarea){padding:7px 9px;min-height:34px;font-size:13px;background:#fff}
html[data-ebner-appearance="modern"] #qe-intro-editor{min-height:5rem!important}
html[data-ebner-appearance="modern"] #qe-intro-editor .ql-editor{min-height:5rem;max-height:15rem;overflow:auto}
@media(max-width:1100px){html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child{grid-template-columns:minmax(0,1fr);gap:12px;padding:13px}html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child>label{grid-column:1/-1!important}html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child :is(input,select){min-height:42px}html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.view-header button{min-height:40px}}
@media(min-width:651px) and (max-width:1100px){html[data-ebner-appearance="modern"] :is(#view-quotation-editor,#view-invoice-editor)>.qe-grid>.qe-header:first-child>label:has(:is(#qe-customer-search,#qe-title,#qe-top-heading,#qe-vat-mode,#inve-customer-search,#inve-title)){grid-column:span 1}}
/* Decorations never intercept legacy delegated event targets, including classic mode. */
.ebner-decorative-emoji,.ebner-nav-icon,.ebner-nav-icon *{pointer-events:none}

#ebner-powered-by{display:block;padding:3px 0;font:10px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--muted);text-align:center}html[data-ebner-appearance="modern"] #ebner-powered-by{color:#9ca1aa}
/* White sidebar requested by Patrick; brand sits on the same uninterrupted surface. */
html[data-ebner-appearance="modern"] .sidebar{background:#fff;color:#363b43;border-right:1px solid #e2e5e9}
html[data-ebner-appearance="modern"] .sidebar .brand{background:transparent;border-bottom:1px solid #edf0f3}
html[data-ebner-appearance="modern"] .sidebar .nav-btn{color:#626b78}
html[data-ebner-appearance="modern"] .sidebar .nav-btn.active{background:#fae9eb;color:#a32932;box-shadow:inset 3px 0 #b32931}
html[data-ebner-appearance="modern"] .sidebar .nav-btn:hover{background:#f7f0f1;color:#9c2932}
html[data-ebner-appearance="modern"] .sidebar .nav-group-header{color:#89919c}
html[data-ebner-appearance="modern"] .sidebar-footer{border-top-color:#e8ebef;color:#747d89}
html[data-ebner-appearance="modern"] .sidebar-footer .muted,html[data-ebner-appearance="modern"] .sidebar-footer button{color:#67717e}
html[data-ebner-appearance="modern"] #ebner-appearance-toggle{background:#fff;border-color:#dce1e7;color:#555f6d}
html[data-ebner-appearance="modern"] #ebner-appearance-toggle:hover{background:#faf1f2;color:#a32932;border-color:#e4c4c7}
html[data-ebner-appearance="modern"] #ebner-powered-by{color:#8b939e}

/* Bounded, dismissible rollout hint; never covers document controls. */
#ebner-appearance-notice{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:13px 16px;border:1px solid #ead5d7;border-left:3px solid #b32931;border-radius:7px;background:#fff8f8;color:#59464a;font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#ebner-appearance-notice p{margin:0;max-width:650px}.ebner-notice-actions{display:flex;flex-shrink:0;gap:8px;flex-wrap:wrap}#ebner-appearance-notice button{font:inherit;font-size:12px;min-height:34px;padding:7px 10px;border:1px solid #e3cdd0;border-radius:5px;background:#fff;color:#94323b;white-space:nowrap}#ebner-appearance-notice button:last-child{background:#b32931;border-color:#b32931;color:#fff}
@media(max-width:900px){#ebner-appearance-notice{flex-direction:column;align-items:flex-start;gap:10px}.ebner-notice-actions{flex-shrink:1}}
@media print{#ebner-appearance-notice{display:none!important}}

/* AS touch layout: presentation only; original nodes, handlers and canvases retained. */
html[data-ebner-appearance="modern"] #view-work-report-editor>.view-header{align-items:flex-start;gap:10px;margin-bottom:12px}
html[data-ebner-appearance="modern"] #view-work-report-editor>.view-header h1{font-size:22px;margin:0;line-height:1.3}
html[data-ebner-appearance="modern"] #view-work-report-editor>.view-header .view-actions{gap:6px}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid{gap:12px;min-width:0}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header{min-width:0;padding:12px 14px}
html[data-ebner-appearance="modern"] #view-work-report-editor legend{font-size:13px;font-weight:650;padding:0 5px}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>label{font-size:12px;color:var(--muted)}
html[data-ebner-appearance="modern"] #view-work-report-editor :is(input:not([type=checkbox]):not([type=range]):not([type=color]),select,textarea){font-size:16px!important;min-height:44px;padding:9px 10px;background:#fff;color:var(--fg)}
html[data-ebner-appearance="modern"] #view-work-report-editor :is(button,.photo-btn){min-height:44px;padding:9px 11px;line-height:1.3}
html[data-ebner-appearance="modern"] #view-work-report-editor .view-actions>label{min-height:44px}
html[data-ebner-appearance="modern"] #view-work-report-editor input[type=checkbox]{width:20px;height:20px;flex-shrink:0;accent-color:var(--accent)}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header:first-child{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 12px;align-items:start}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header:first-child>label{margin:0;min-width:0}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header:first-child>label:has(:is(#wre-customer-search,#wre-title)){grid-column:span 2}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header:first-child>label:has(#wre-object){grid-column:span 2}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-object{min-height:44px;height:66px}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(>#wre-add-te){display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,.7fr) minmax(0,1.4fr) minmax(0,1.4fr) auto;gap:8px!important;align-items:end!important}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(>#wre-add-te)>label{min-width:0!important;font-size:12px;color:var(--muted)}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(>#wre-add-te) :is(input,select){width:100%!important}
html[data-ebner-appearance="modern"] #view-work-report-editor :is(#wre-items,#wre-te-list){min-width:0;max-width:100%;overflow-x:auto}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(#wre-total-net){flex-wrap:wrap;gap:8px 16px!important;font-size:13px}
html[data-ebner-appearance="modern"] #view-work-report-editor .cl-check{display:flex;align-items:center;min-height:44px}
html[data-ebner-appearance="modern"] #view-work-report-editor .cl-row{padding:6px 0}
html[data-ebner-appearance="modern"] #view-work-report-editor .wre-photo-del{min-width:44px;min-height:44px}
@media(max-width:1100px){
html[data-ebner-appearance="modern"] #view-work-report-editor>.view-header{flex-direction:column;align-items:stretch}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header:first-child{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(>#wre-add-te){grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-add-te{justify-self:start}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items table{display:block;min-width:0;width:100%;overflow:visible;white-space:normal}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items tbody{display:block}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 10px;position:relative;padding:12px 0;border-bottom:1px solid var(--border)}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items tr:last-child{border-bottom:0}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td{display:block;width:auto;min-width:0;border:0;padding:0;text-align:left!important;white-space:normal}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td::before{display:block;font-size:11px;line-height:1.5;color:var(--muted);margin-bottom:3px}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(1)::before{content:"Position"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(3)::before{content:"Menge"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(4)::before{content:"Einheit"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(5)::before{content:"EP €"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(6)::before{content:"Rabatt %"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(7)::before{content:"USt %"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(8)::before{content:"Netto €"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:first-child{grid-column:1/-1;padding-right:50px;display:flex;gap:5px;align-items:center;min-height:32px;font-size:12px;font-weight:600}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:first-child::before{margin:0}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:nth-child(2){grid-column:1/-1}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items td:last-child{position:absolute;right:0;top:6px}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items :is(.wri-i-del,.wri-add-desc){font-size:12px!important;min-width:44px;min-height:44px;padding:8px!important}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items .wri-i-del{color:#9b3038}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items .is-heading td:nth-child(n+3):not(:last-child){display:none}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items .is-heading input{font-weight:650;background:#f7f8fa}
}
@media(max-width:650px){
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header{padding:10px}
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header:first-child>label:has(:is(#wre-customer-search,#wre-title,#wre-object)){grid-column:1/-1}
html[data-ebner-appearance="modern"] #view-work-report-editor .inv-toolbar{gap:6px!important}
html[data-ebner-appearance="modern"] #view-work-report-editor .inv-toolbar>button{flex:1 1 auto}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(>#wre-add-te)>label:has(:is(#wre-te-tm,#wre-te-desc)){grid-column:1/-1}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-add-te{grid-column:1/-1;justify-self:stretch}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(.sig-display){gap:10px!important}
html[data-ebner-appearance="modern"] #view-work-report-editor .qe-header>div:has(.sig-display)>div{min-width:0!important;flex-basis:100%!important}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items tr{gap:6px 8px}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list table{display:block;white-space:normal;min-width:0}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list :is(td,th){padding:0;font-size:13px;border:0;width:auto!important}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list :is(td,th):nth-child(2){width:auto!important}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list :is(td,th):last-child{width:44px!important}
html[data-ebner-appearance="modern"] #view-work-report-editor .wre-te-del{min-width:44px;padding:8px 0}

html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list tbody{display:block}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list tr{display:grid;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);gap:5px 10px;padding:10px 44px 10px 0;position:relative;border-bottom:1px solid var(--border)}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list td{display:block}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list td:nth-child(2)::after{content:" h"}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list td:nth-child(4){grid-column:1/-1;color:var(--muted)}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-te-list td:last-child{position:absolute;right:0;top:4px}
}
@media(min-width:651px) and (max-width:1100px){
html[data-ebner-appearance="modern"] #view-work-report-editor>.qe-grid>.qe-header:first-child>label:has(:is(#wre-customer-search,#wre-title)){grid-column:span 1}
html[data-ebner-appearance="modern"] #view-work-report-editor #wre-items tr{grid-template-columns:repeat(6,minmax(0,1fr))}
}
