/* MENSINGS WERKSTATT V021.6 – reiner Layout-Fix.
   Keine Bilder, keine Logo-URLs, keine Preis-/Kunden-/Terminlogik.
   Gleiche Groesse fuer ALLE sechs unteren Aktionsbuttons; Teileverkauf ganz links,
   alle anderen rechts, weiterhin EINE gemeinsame Zeile. */
body>header.ma-v212-header #adminTopActions{
  --ma216-action-width:clamp(156px,10.1vw,196px);
  --ma216-action-height:52px;
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:9px!important;flex-wrap:nowrap!important;min-width:0!important;
  width:100%!important;max-width:100%!important;height:54px!important;min-height:54px!important;
  padding:0!important;margin:0!important;overflow:visible!important;
}
body>header.ma-v212-header #adminTopActions>*{
  flex:0 0 var(--ma216-action-width)!important;
  width:var(--ma216-action-width)!important;
  min-width:var(--ma216-action-width)!important;
  max-width:var(--ma216-action-width)!important;
  height:var(--ma216-action-height)!important;
  min-height:var(--ma216-action-height)!important;
  max-height:var(--ma216-action-height)!important;
  margin:0!important;box-sizing:border-box!important;
}
body>header.ma-v212-header #adminTopActions #maV18PartsButton{
  margin-right:auto!important;
  background:#EF8426!important;border:1px solid #FFAD61!important;color:#fff!important;
  box-shadow:none!important;
}
body>header.ma-v212-header #adminTopActions>:is(button,.ma-v11-menu) > button,
body>header.ma-v212-header #adminTopActions>button{
  display:flex!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;
  width:100%!important;height:var(--ma216-action-height)!important;
  min-height:var(--ma216-action-height)!important;max-height:var(--ma216-action-height)!important;
  line-height:1.18!important;font-size:12.5px!important;font-weight:750!important;
  padding:6px 10px!important;white-space:normal!important;text-align:center!important;
  overflow-wrap:break-word!important;hyphens:auto!important;
  border-radius:10px!important;margin:0!important;
}
/* Single, flat gold color – older gradient themes must not win. */
html body>header.ma-v212-header #adminTopActions #maHourlyButton,
html body>header.ma-v212-header #adminTopActions #maV215MaterialButton{
  background:#E5B52B!important;background-image:none!important;color:#142A3B!important;
  border:1px solid #F6D56B!important;box-shadow:none!important;
}
html body>header.ma-v212-header #adminTopActions #maHourlyButton:hover,
html body>header.ma-v212-header #adminTopActions #maV215MaterialButton:hover{
  background:#F4CB4B!important;background-image:none!important;
}
/* Respect separate notice bells and reserve their actual width. */
body>header.ma-v212-header #maV16TopAlerts{
  min-width:196px!important;width:196px!important;max-width:196px!important;
  justify-self:end!important;z-index:10!important;overflow:visible!important;
}
body>header.ma-v212-header #maNotificationDock{min-width:192px!important;width:192px!important;gap:5px!important;flex-wrap:nowrap!important}
body>header.ma-v212-header #maNotificationDock button{flex-shrink:0!important}
/* On small displays retain one row; horizontal scroll only for the toolbar. */
@media(max-width:1230px){
 body>header.ma-v212-header #adminTopActions{
   --ma216-action-width:158px;
   overflow-x:auto!important;overflow-y:hidden!important;
   scrollbar-width:thin;justify-content:flex-start!important;
 }
 body>header.ma-v212-header #adminTopActions #maV18PartsButton{margin-right:auto!important}
}
@media(max-width:650px){
 body>header.ma-v212-header #adminTopActions{--ma216-action-width:156px}
}
/* Einheitliche Formular-Gridspalten. Kein Overflow bei langen Feldnamen. */
#view :is(.grid,.two,.ma-v210-pair,.v214-cols,.ma-v215-material-form-pair,.ma-hourly-row){
  align-items:stretch!important;min-width:0;
}
#view :is(.grid,.two,.ma-v210-pair,.v214-cols,.ma-hourly-row) > label:has(> :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select)),
.ma-v215-material-form-pair>label:has(> :is(input:not([type="checkbox"]):not([type="radio"]),select)),
#maHourlyFloating .grid>label:has(> :is(input:not([type="checkbox"]):not([type="radio"]),select)),
#maHourlyFloating .ma-hourly-row>label:has(> :is(input:not([type="checkbox"]):not([type="radio"]),select)){
  box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
  min-width:0!important;min-height:90px!important;height:100%!important;
  justify-content:flex-end!important;margin:0!important;
  line-height:1.35!important;overflow-wrap:break-word;
}
#view :is(.grid,.two,.ma-v210-pair,.v214-cols,.ma-hourly-row)>label> :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select),
.ma-v215-material-form-pair>label> :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select),
#maHourlyFloating :is(.grid,.ma-hourly-row)>label> :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select){
  box-sizing:border-box!important;width:100%!important;min-width:0!important;
  height:46px!important;min-height:46px!important;max-height:46px!important;
  flex:0 0 46px!important;margin-top:auto!important;
}
/* A few page-specific paired fields don't use .grid. Preserve their form values. */
#view .ma-v209-form .card :is(input,select,textarea),
#view .planner-booking .card :is(input,select,textarea),
#view .ma-v210-form :is(input,select,textarea),
#view #maV214InvoiceRoot .v214-panel :is(input,select,textarea),
.ma-v215-material-form :is(input,select,textarea){
  box-sizing:border-box!important;max-width:100%!important;min-width:0;
}
#view .ma-v209-form .card .grid,
#view .planner-booking .card .grid,
#view .ma-v210-form .ma-v210-pair,
#view #maV214InvoiceRoot .v214-cols{
  grid-auto-rows:auto;align-items:stretch!important;min-width:0!important;
}
/* Textareas, checkboxes and file uploads keep natural heights/behavior. */
#view :is(.card,.ma-v210-form,.v214-panel) :is(h2,h3,p,legend){overflow-wrap:break-word;min-width:0}
#view :is(.grid,.two,.ma-v210-pair,.v214-cols) > *{min-width:0}
@media(max-width:740px){
 #view :is(.grid,.two,.ma-v210-pair,.v214-cols) > label:has(> :is(input,select)){
    min-height:72px!important;
 }
}
/* Legacy explicit button height is 46px with !important; override all 6 controls. */
html body>header.ma-v212-header #adminTopActions #maHourlyButton,
html body>header.ma-v212-header #adminTopActions #maV16Theme,
html body>header.ma-v212-header #adminTopActions #logout,
html body>header.ma-v212-header #adminTopActions #maV215MaterialButton,
html body>header.ma-v212-header #adminTopActions #maV18PartsButton{
  height:var(--ma216-action-height)!important;
  min-height:var(--ma216-action-height)!important;
  max-height:var(--ma216-action-height)!important;
}
html body>header.ma-v212-header #adminTopActions #maV18PartsButton.ma-v215-parts-orange{
  background:#EF8426!important;background-image:none!important;
  border-color:#FFAD61!important;color:#fff!important;
}
