/* MENSING MEISTERWERKSTATT · V021.2 premium shell
   Layout-only. Does not touch customer/vehicle modules or backend handlers. */
:root{--ma212-navy:#081d31;--ma212-ink:#10293e;--ma212-blue:#274b68;--ma212-border:#d3dfe8;--ma212-paper:#f5f8fb;--ma212-teal:#02948f}
html[data-skin="modern"] body{background:#09192c!important}
body>header.ma-v212-header,html[data-skin="modern"] body>header.ma-v212-header,
html[data-skin="classic"] body>header.ma-v212-header{
  display:grid!important;grid-template-columns:156px minmax(0,1fr) auto!important;
  grid-template-areas:"brand nav alerts" "brand admin admin"!important;
  column-gap:14px!important;row-gap:5px!important;position:relative!important;
  background:linear-gradient(110deg,#09213a 0%,#0a233c 50%,#08182b 100%)!important;
  min-height:128px!important;width:100%!important;max-width:none!important;margin:0!important;
  padding:10px clamp(15px,2.6vw,34px) 12px!important;border:0!important;border-bottom:1px solid #2c5a7c!important;
  box-shadow:0 4px 22px #02111e42!important;color:#f5faff!important;
}
body>header.ma-v212-header>.ma-v212-brand{grid-area:brand!important;display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;gap:0!important;min-width:0!important;width:156px!important;
  padding:0 12px 0 0!important;margin:0!important;border-right:1px solid #5780a266!important;overflow:hidden}
.ma-v212-brand-logo{display:block;width:135px;height:104px;object-fit:contain;filter:drop-shadow(0 2px 5px #0004)}
body>header.ma-v212-header .ma-v16-brand .ma-v16-kicker{margin:0!important;padding:0!important;font-size:0!important;height:0!important;overflow:visible!important;line-height:0!important}
body>header.ma-v212-header .ma-v16-brand .ma-v16-kicker #maLiveVersion{position:absolute;left:clamp(20px,2.6vw,39px);bottom:3px;font-size:10px!important;line-height:15px!important;background:#224963;border:1px solid #5885a4;color:#ecf8ff;border-radius:12px;padding:1px 8px}
body>header.ma-v212-header .ma-v212-brand-heading{display:none!important}
body>header.ma-v212-header .ma-v16-brand>small{display:none!important}
body>header.ma-v212-header #nav.ma-v212-primary-nav,
#nav.ma-v16-nav.ma-v212-primary-nav{grid-area:nav!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
 gap:7px!important;padding:0 1px!important;width:100%!important;min-height:50px!important;max-width:none!important;
 overflow-x:auto!important;overflow-y:hidden!important;background:transparent!important;border:0!important;
 scrollbar-width:thin;scrollbar-color:#45799b transparent;align-self:center}
#nav.ma-v212-primary-nav>button:not(#maHourlyButton){flex:0 0 auto!important;white-space:nowrap!important;min-height:47px!important;
  padding:9px 10px!important;background:#214361!important;color:#f3faff!important;border:1px solid #44718f!important;
  border-radius:11px!important;font-size:12px!important;letter-spacing:-.12px!important;font-weight:750!important;
  box-shadow:0 3px 9px #04152536!important}
#nav.ma-v212-primary-nav>button.primary:not(#maHourlyButton){background:#008f90!important;border:2px solid #62e3d4!important;
 color:#fff!important;padding:8px 9px!important;box-shadow:0 0 0 1px #0ce2c533 inset!important}
body>header.ma-v212-header #maV16TopAlerts.ma-v16-alertbar{grid-area:alerts!important;display:block!important;width:auto!important;max-width:none!important;
 min-height:0!important;margin:0!important;padding:0!important;border:0!important;z-index:90!important;align-self:center!important}
body>header.ma-v212-header #maNotificationDock{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:5px!important}
body>header.ma-v212-header #workshopBellArea,body>header.ma-v212-header #maActivityControls{display:contents!important}
body>header.ma-v212-header #maNotificationDock #workshopBell,
body>header.ma-v212-header #maNotificationDock #maActivityWork,
body>header.ma-v212-header #maNotificationDock #maActivityLeave,
body>header.ma-v212-header #maNotificationDock #maV18InvoiceBell{
 display:flex!important;justify-content:center!important;align-items:center!important;gap:2px!important;
 flex:0 0 auto!important;box-sizing:border-box!important;min-width:38px!important;width:auto!important;max-width:48px!important;
 height:42px!important;min-height:42px!important;padding:7px!important;line-height:1!important;font-size:19px!important;
 color:#f5f9ff!important;background:#1d3956!important;border:1px solid #527895!important;border-radius:10px!important;
}
body>header.ma-v212-header #maNotificationDock .ma-notify-label{display:none!important}
body>header.ma-v212-header #maNotificationDock .ma-count,body>header.ma-v212-header #workshopBellCount{font-size:9px!important;line-height:1!important;padding:2px 3px!important;min-width:13px!important}
body>header.ma-v212-header #adminTopActions{grid-area:admin!important;display:flex!important;align-items:center!important;
 justify-content:flex-end!important;justify-self:stretch!important;gap:6px!important;
 flex-wrap:wrap!important;width:auto!important;max-width:none!important;margin:0!important;padding:1px 0!important}
body>header.ma-v212-header #adminTopActions>button,body>header.ma-v212-header #adminTopActions #maHourlyButton{
 min-height:32px!important;padding:6px 11px!important;font-size:11px!important;border-radius:8px!important}
body>header.ma-v212-header #identity,body>header.ma-v212-header #skinSwitcher{display:none!important}
body>header.ma-v212-header #maNotificationDock .hidden{display:none!important}
/* Keep all popup buttons independent, original click handlers untouched. */
#maNotificationDock #workshopBellPopup,#maNotificationDock #maActivityPopup{z-index:1700!important}
@media(max-width:1370px){body>header.ma-v212-header{grid-template-columns:145px minmax(0,1fr) auto!important;padding-left:14px!important;padding-right:14px!important}
 body>header.ma-v212-header>.ma-v212-brand{width:145px!important}.ma-v212-brand-logo{width:123px}
 #nav.ma-v212-primary-nav>button:not(#maHourlyButton){font-size:11px!important;padding-left:8px!important;padding-right:8px!important}}
@media(max-width:800px){body>header.ma-v212-header{grid-template-columns:115px minmax(0,1fr)!important;grid-template-areas:"brand alerts" "nav nav" "admin admin"!important;min-height:0!important;gap:6px!important;padding:9px 12px!important}
 body>header.ma-v212-header>.ma-v212-brand{width:115px!important;height:76px!important}.ma-v212-brand-logo{width:105px;height:76px}
 #nav.ma-v212-primary-nav>button:not(#maHourlyButton){font-size:12px!important}
 body>header.ma-v212-header #adminTopActions{justify-content:flex-start!important}}
/* Invoice editor: precisely separated heading, input panel and A4 preview. */
#app:has(#maV210CreateInvoice){max-width:none!important;margin:0!important;padding:26px clamp(18px,2.7vw,48px) 60px!important;
 background:linear-gradient(135deg,#dfe7ee 0%,#f4f6fa 55%,#e4ecf2 100%)!important;min-height:calc(100vh - 120px)!important}
#app:has(#maV210CreateInvoice) #view{max-width:1720px!important;margin:0 auto!important}
.ma-v212-invoice-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 16px;color:#142d42}
.ma-v212-heading-name{display:flex;align-items:center;gap:14px}
.ma-v212-heading-name>span{font-size:27px;color:#1378c1}
#view .ma-v212-heading-name h2{color:#102a43!important;font-size:27px!important;margin:0!important;font-weight:850!important}
.ma-v212-invoice-heading .ma-v212-invoice-tabs{display:flex!important;gap:4px!important;border:1px solid #cdd8e0;
 background:#f8fafc;padding:4px;border-radius:12px;box-shadow:0 5px 15px #243c5320;margin:0}
#view .ma-v212-invoice-tabs button{background:transparent!important;color:#22415b!important;border:0!important;border-radius:9px!important;
 min-width:150px!important;min-height:40px!important;padding:8px 16px!important;font-size:13px!important}
#view .ma-v212-invoice-tabs button.active{background:#274f70!important;color:white!important;box-shadow:0 2px 8px #14334a33!important}
#view .ma-v210-invoice-create{display:grid!important;grid-template-columns:minmax(460px,.94fr) minmax(520px,1.10fr)!important;
 gap:24px!important;align-items:start!important;max-width:none!important;margin:0!important}
#view .ma-v210-invoice-create .ma-v210-form{background:#fff!important;color:#132b42!important;border:1px solid #d5dfe7!important;
 border-radius:17px!important;box-shadow:0 9px 24px #173b5425!important;padding:22px 25px!important;min-width:0!important;margin:0!important;
 display:flex!important;flex-direction:column!important;gap:13px!important}
#view .ma-v210-invoice-create .ma-v210-form label{color:#263a50!important;font-weight:800!important;font-size:12px!important;line-height:1.35!important;margin:0!important}
#view .ma-v210-invoice-create .ma-v210-form input:not([type=checkbox]),
#view .ma-v210-invoice-create .ma-v210-form textarea,
#view .ma-v210-invoice-create .ma-v210-form select{background:#fff!important;color:#162f45!important;border:1px solid #b9c9d8!important;
 border-radius:9px!important;min-height:39px!important;padding:9px 11px!important;font-size:13px!important;box-shadow:none!important;width:100%!important;margin:5px 0 0!important}
#view .ma-v210-invoice-create .ma-v210-form input:focus,
#view .ma-v210-invoice-create .ma-v210-form select:focus,
#view .ma-v210-invoice-create .ma-v210-form textarea:focus{outline:2px solid #288cc4!important;outline-offset:1px!important}
#view .ma-v210-invoice-create .ma-v210-form textarea{resize:vertical!important;min-height:78px!important}
.ma-v210-form .ma-v210-pair{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:13px!important}
.ma-v210-form .ma-v212-screen-help{font-size:11px!important;line-height:1.35!important;color:#5e7586!important;margin:-3px 0 0!important}
.ma-v210-form #maV210ModeHelp{background:#f0f5f8!important;border:1px solid #d9e4eb!important;color:#466077!important;
 font-size:11px!important;padding:8px 12px!important;border-radius:8px!important;margin:0!important}
#view .ma-v210-form .ma-v211-invoice-section{color:#173149!important;font-size:17px!important;text-transform:uppercase;letter-spacing:.15px;
 margin:0!important;padding:0!important;border:0!important}
.ma-v212-positions-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:15px!important;
 margin:3px 0 0!important;border-top:1px solid #e3eaf0!important}
#view .ma-v210-form .ma-v212-positions-heading #maV210InvoiceAddRow{font-size:12px!important;color:#126fae!important;border:0!important;
 background:transparent!important;min-height:34px!important;padding:4px 9px!important;white-space:nowrap!important}
#view .ma-v210-form .ma-v212-positions-heading #maV210InvoiceAddRow:hover{background:#edf5fa!important}
#view .ma-v210-form .ma-v210-staged{background:#f8fafc!important;border:1px solid #e3eaf0!important;border-radius:9px!important;
 padding:6px 10px!important;min-height:45px!important}
.ma-v210-staged p{color:#698195!important;font-size:12px!important;line-height:1.4!important}
.ma-v210-staged table{font-size:12px!important;min-width:0!important;table-layout:auto!important;width:100%!important}
.ma-v210-staged th{background:#e8eef3!important;color:#203e55!important;padding:8px 7px!important}
.ma-v210-staged td{background:#fff!important;color:#19374e!important;padding:8px 7px!important;border-bottom:1px solid #dae3eb!important}
.ma-v210-staged .scroll{max-height:330px!important}
#view .ma-v210-invoice-create .ma-v210-form .ma-v210-actions{display:flex!important;gap:9px!important;align-items:center!important;flex-wrap:wrap!important;
 padding-top:7px!important}
#view .ma-v210-form .ma-v210-actions>button{flex:1 1 auto!important;min-height:46px!important;
 background:#e6eef4!important;color:#28445b!important;border:1px solid #bfd1df!important;border-radius:9px!important;font-size:13px!important}
#view .ma-v210-form .ma-v210-actions #maV210InvoiceSave{background:#086ccc!important;color:#fff!important;border:1px solid #287ee5!important}
#view .ma-v210-form .ma-v210-actions .ma-v212-print-button{background:#138757!important;color:#fff!important;border:1px solid #36a377!important}
#view .ma-v210-form .ma-v210-actions #maV210InvoiceRefresh{flex:1 1 100%!important;min-height:32px!important;background:#f8fafc!important}
.ma-v212-description-wrap{display:flex;position:relative}.ma-v212-description-wrap input{padding-right:35px!important}
#view .ma-v210-invoice-create .ma-v212-clear-desc{position:absolute!important;right:6px!important;top:9px!important;
 border:0!important;background:transparent!important;color:#637e91!important;font-size:21px!important;padding:0!important;width:26px!important;height:27px!important;min-height:27px!important}
#view .ma-v210-invoice-create .ma-v210-invoice-paper{background:#fff!important;border:1px solid #d3dfe7!important;border-radius:17px!important;
 padding:17px!important;box-shadow:0 9px 24px #173b5425!important;min-width:0!important;position:sticky!important;top:12px!important}
#view .ma-v210-invoice-create .ma-v210-invoice-paper iframe{width:100%!important;min-height:830px!important;height:870px!important;
 border:1px solid #e0e8ef!important;background:#fff!important;border-radius:5px!important;box-shadow:0 1px 8px #0c29451a!important}
.ma-v212-document-caption{font-size:12px;color:#4d6477;text-align:right;padding:0 7px 11px;font-weight:650}
#view .ma-v210-invoice-create .ma-v210-form #maV210InvoiceMsg{font-size:12px!important;color:#4b6c80!important;line-height:1.45!important;margin:0!important}
/* Existing customer-invoice editor and appointment editor use same proportions. */
#view .ma-v210-invoice-editor{display:grid!important;grid-template-columns:minmax(430px,.97fr) minmax(500px,1.03fr)!important;gap:22px!important}
#view .ma-v210-invoice-editor>.ma-v210-invoice-paper{background:#f8fafb!important;border:1px solid #cfdae4!important;padding:14px!important;border-radius:15px!important}
#view .ma-v210-wizard .ma-v209-form{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:14px!important}
#view .ma-v210-wizard .ma-v209-form>.card{background:#132e48!important;border:1px solid #355f7c!important;padding:18px!important;border-radius:14px!important}
#view .ma-v210-wizard .ma-v209-form>.ma-v209-wide{grid-column:1/-1!important}
@media(max-width:1160px){#view .ma-v210-invoice-create{grid-template-columns:1fr!important}#view .ma-v210-invoice-create .ma-v210-invoice-paper{position:static!important}#view .ma-v210-invoice-editor{grid-template-columns:1fr!important}}
@media(max-width:750px){#app:has(#maV210CreateInvoice){padding:16px 12px 40px!important}.ma-v212-invoice-heading{flex-wrap:wrap}.ma-v212-invoice-heading .ma-v212-invoice-tabs{width:100%}
 #view .ma-v210-invoice-create .ma-v210-form{padding:16px!important}.ma-v210-form .ma-v210-pair{grid-template-columns:1fr!important}
 #view .ma-v210-wizard .ma-v209-form{grid-template-columns:1fr!important}}
@media print{body>header.ma-v212-header,.ma-v212-invoice-heading{display:none!important}}

/* The admin palette uses high-specificity !important selectors; make invoice
   inputs readable without changing that palette in other areas. */
html[data-ma20-palette="custom"][data-skin="modern"] #view .ma-v210-invoice-create .ma-v210-form input:not([type="checkbox"]),
html[data-ma20-palette="custom"][data-skin="modern"] #view .ma-v210-invoice-create .ma-v210-form select,
html[data-ma20-palette="custom"][data-skin="modern"] #view .ma-v210-invoice-create .ma-v210-form textarea,
html[data-ma20-palette="custom"][data-skin="classic"] #view .ma-v210-invoice-create .ma-v210-form input:not([type="checkbox"]),
html[data-ma20-palette="custom"][data-skin="classic"] #view .ma-v210-invoice-create .ma-v210-form select,
html[data-ma20-palette="custom"][data-skin="classic"] #view .ma-v210-invoice-create .ma-v210-form textarea{
  background:#fff!important;color:#152f46!important;border-color:#bdcddc!important;
}
html[data-ma20-palette="custom"] #view .ma-v212-invoice-heading .ma-v212-invoice-tabs button:not(.active){background:#f3f7fa!important;color:#294761!important;border-color:transparent!important}
html[data-ma20-palette="custom"] #view .ma-v212-invoice-heading .ma-v212-invoice-tabs button.active{background:#2a5272!important;color:#fff!important;border-color:transparent!important}
body>header.ma-v212-header .ma-v212-brand:has(.ma-v18-header-logo) .ma-v212-brand-logo{display:none!important}
body>header.ma-v212-header .ma-v212-brand .ma-v18-header-logo{width:135px!important;height:104px!important;max-width:135px!important;max-height:104px!important;object-fit:contain!important;margin:0!important;display:block!important;filter:drop-shadow(0 2px 5px #0004)}
.ma-v212-standard-logo{display:flex;gap:16px;align-items:center;margin:13px 0 0;padding:14px;
 background:#16354d;border:1px solid #527c9d;border-radius:12px;max-width:790px}
.ma-v212-standard-logo img{width:110px;height:95px;object-fit:contain;flex:0 0 110px}
.ma-v212-standard-logo strong{display:block;color:#f1faff;font-size:14px}
.ma-v212-standard-logo p{color:#c0d8e8;font-size:12px;line-height:1.45;margin:5px 0 9px}
.ma-v212-standard-logo button{background:#137d79!important;border-color:#5cd0c6!important;font-weight:750}
@media(max-width:560px){.ma-v212-standard-logo{flex-wrap:wrap}}

