/* Mensings LIVE V17: centered, immovable notification dialogs. */
#maV17NoticeBackdrop,#maV17RateBackdrop{position:fixed!important;inset:0!important;background:rgba(3,13,25,.76)!important;z-index:1400!important;cursor:default}
#maV17NoticeBackdrop[hidden],#maV17RateBackdrop[hidden]{display:none!important}
#maNotificationDock #workshopBellPopup,#maNotificationDock #maActivityPopup{
  position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;
  transform:translate(-50%,-50%)!important;margin:0!important;
  width:min(690px,calc(100vw - 32px))!important;max-width:none!important;
  max-height:min(76vh,740px)!important;min-height:0!important;
  padding:22px!important;overflow-y:auto!important;overflow-x:hidden!important;
  border:1px solid #6c91b0!important;border-radius:17px!important;
  background:#172c44!important;color:#f4f9ff!important;box-shadow:0 24px 80px #000c!important;
  z-index:1500!important;
}
#maNotificationDock #workshopBellPopup.hidden,#maNotificationDock #maActivityPopup.hidden{display:none!important}
#maNotificationDock #workshopBellRows,#maNotificationDock #maActivityRows{max-height:min(54vh,525px);overflow-y:auto;overscroll-behavior:contain;padding-right:5px}
#maNotificationDock .bell-popup-title,#maNotificationDock .ma-activity-head{position:sticky;top:-22px;z-index:2;padding:7px 0 12px;background:#172c44}
#maNotificationDock #workshopBellClose,#maNotificationDock #maActivityClose{min-width:42px;min-height:39px;flex:none}
html[data-skin='classic'] #maNotificationDock #workshopBellPopup,html[data-skin='classic'] #maNotificationDock #maActivityPopup{background:#fff!important;color:#17314b!important}
html[data-skin='classic'] #maNotificationDock .bell-popup-title,html[data-skin='classic'] #maNotificationDock .ma-activity-head{background:#fff!important}

/* Preisliste als zentriertes, NICHT verschiebbares Pop-out. */
#maV17RateBackdrop{z-index:1550!important}
#maHourlyFloating.ma-hourly-panel{
 position:fixed!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;
 transform:translate(-50%,-50%)!important;margin:0!important;
 width:min(1190px,calc(100vw - 28px))!important;max-width:none!important;min-width:0!important;
 max-height:min(91vh,950px)!important;height:auto!important;overflow:auto!important;
 border-radius:17px!important;box-shadow:0 24px 85px #000e!important;z-index:1650!important;
}
#maHourlyFloating.ma-hourly-panel[hidden]{display:none!important}
#maHourlyFloating .ma-hourly-header{cursor:default!important;user-select:text!important;position:sticky;top:0;z-index:1;background:inherit;padding-bottom:12px}
#maHourlyFloating .ma-v11-price-layout{grid-template-columns:minmax(0,1.45fr) minmax(290px,.9fr)!important;gap:16px!important}
#maHourlyFloating .ma-v11-price-left{min-width:0;overflow:hidden}
#maHourlyFloating .ma-v11-price-left #maHourlyRateRows{max-height:min(54vh,550px)!important;overflow-y:auto!important;overscroll-behavior:contain!important}
#maHourlyFloating .ma-v11-price-editor{min-width:0}

/* Collapsed cards: do not leave an orphaned padded box showing. */
#view details.ma-v16-accordion:not([open]),#view details.ma-v16-secondary-accordion:not([open]){overflow:hidden!important}
#view details.ma-v16-accordion:not([open]) > :not(summary),
#view details.ma-v16-secondary-accordion:not([open]) > :not(summary){display:none!important}
#view details.ma-v16-accordion:not([open]) > summary{padding:18px 24px!important;margin:0!important;min-height:65px!important;align-items:center}
#view details.ma-v16-accordion[open] > summary{padding-bottom:12px!important}
#view details.ma-v16-accordion:not([open]){min-height:0!important}
#view .ma-v16-accordion>summary::after{margin-left:auto!important}

/* Echte Rechnungsbearbeitung aus der Demo, angepasst an die Bildschirmbreite. */
#view.ma-v17-invoice-editor{width:100%;max-width:none;min-width:0}
#view.ma-v17-invoice-editor>.card{width:100%;min-width:0}
#view.ma-v17-invoice-editor .grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important}
#view.ma-v17-invoice-editor .scroll{max-width:100%;overflow:auto}
.ma-v17-invoice-vehicle{margin:13px 0;padding:11px 15px;background:#112c42;border:1px solid #41637e;border-radius:10px}
.ma-v17-invoice-vehicle label{max-width:600px}
.ma-v17-invoice-vehicle .muted{font-size:13px}
#view.ma-v17-invoice-editor .ma-v16-paper-wrap{width:100%;max-width:100%}
#view.ma-v17-invoice-editor .ma-v16-paper{width:100%!important;height:1120px!important}
#maV16InvoiceCustomer,#maV17InvoiceVehicle{min-width:0}
@media(max-width:750px){
 #maNotificationDock #workshopBellPopup,#maNotificationDock #maActivityPopup{width:calc(100vw - 22px)!important;max-height:86vh!important;padding:15px!important}
 #maHourlyFloating .ma-v11-price-layout{grid-template-columns:1fr!important}
 #maHourlyFloating .ma-v11-price-left #maHourlyRateRows{max-height:37vh!important}
 #view.ma-v17-invoice-editor .ma-v16-paper{height:800px!important}
}
@media print{#maV17NoticeBackdrop,#maV17RateBackdrop,#maHourlyFloating{display:none!important}}

/* Zahlungsspiegel im fertigen Rechnungsentwurf. */
.ma-v17-payment-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.ma-v17-payment-stats>div{background:#19334b;border:1px solid #446783;border-radius:11px;padding:14px;min-width:0}
.ma-v17-payment-stats small{display:block;color:#abd1e7}.ma-v17-payment-stats b{display:block;font-size:20px;margin-top:6px}
.ma-v17-payment-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:9px;align-items:end;margin:12px 0}
@media(max-width:600px){.ma-v17-payment-stats{grid-template-columns:1fr}}
@media(min-width:1400px){#nav.ma-v16-nav>button{padding:10px 9px!important;font-size:13px!important;min-height:49px!important}#nav.ma-v16-nav #maHourlyButton{min-height:49px!important;padding:10px 11px!important;font-size:13px!important}}
