/* pandabu V2.0.4 RC16.279a STARTUP HOTFIX
   Based strictly on RC16.278.
   Scope: visual inventory modal polish only. No mutation/API logic changes. */

/* Bestandssteuerung: clearer structure without changing markup or data logic */
#inventory-form .stock-form-section{
  display:grid!important;
  row-gap:12px!important;
}
#inventory-form .stock-form-heading{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:2px!important;
}
#inventory-form .stock-basics-grid,
#inventory-form .stock-threshold-grid{
  row-gap:12px!important;
}
#inventory-form .stock-basics-grid > .field label,
#inventory-form .stock-threshold-grid > .field label,
#inventory-form .expiry-batch-row .field > label{
  margin-bottom:8px!important;
}

/* Ablaufdatum: keep all controls equal-height; reserve a real separate column for X */
#inventory-form .expiry-batch-row{
  --expiry-control-height:50px;
  --expiry-control-radius:14px;
  grid-template-columns:minmax(92px,.74fr) minmax(0,.88fr) 54px!important;
  column-gap:12px!important;
  align-items:end!important;
}
#inventory-form .expiry-batch-row .field{
  min-width:0!important;
  width:100%!important;
}
#inventory-form .expiry-batch-row input[data-expiry-quantity],
#inventory-form .expiry-batch-row input[data-expiry-date]{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:var(--expiry-control-height)!important;
  min-height:var(--expiry-control-height)!important;
  max-height:var(--expiry-control-height)!important;
  border-radius:var(--expiry-control-radius)!important;
  box-sizing:border-box!important;
}
#inventory-form .expiry-remove-wrap{
  width:54px!important;
  min-width:54px!important;
  max-width:54px!important;
  height:var(--expiry-control-height)!important;
  min-height:var(--expiry-control-height)!important;
  max-height:var(--expiry-control-height)!important;
  align-self:end!important;
  justify-self:start!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
#inventory-form .expiry-batch-row .expiry-remove{
  position:static!important;
  inset:auto!important;
  transform:none!important;
  width:50px!important;
  min-width:50px!important;
  max-width:50px!important;
  height:var(--expiry-control-height)!important;
  min-height:var(--expiry-control-height)!important;
  max-height:var(--expiry-control-height)!important;
  margin:0!important;
  padding:0!important;
  border-radius:var(--expiry-control-radius)!important;
  display:grid!important;
  place-items:center!important;
  box-sizing:border-box!important;
}

@media (max-width:600px){
  #inventory-form .stock-form-heading{flex-wrap:wrap!important;}
  #inventory-form .stock-form-heading .small{width:100%!important;text-align:left!important;}
  #inventory-form .expiry-batch-row{
    --expiry-control-height:48px;
    --expiry-control-radius:13px;
    grid-template-columns:minmax(86px,.74fr) minmax(0,.84fr) 52px!important;
    column-gap:10px!important;
  }
  #inventory-form .expiry-remove-wrap{width:52px!important;min-width:52px!important;max-width:52px!important;}
  #inventory-form .expiry-batch-row .expiry-remove{width:48px!important;min-width:48px!important;max-width:48px!important;}
}
@media (max-width:390px){
  #inventory-form .expiry-batch-row{
    --expiry-control-height:46px;
    --expiry-control-radius:12px;
    grid-template-columns:minmax(80px,.72fr) minmax(0,.80fr) 50px!important;
    column-gap:9px!important;
  }
  #inventory-form .expiry-remove-wrap{width:50px!important;min-width:50px!important;max-width:50px!important;}
  #inventory-form .expiry-batch-row .expiry-remove{width:46px!important;min-width:46px!important;max-width:46px!important;}
}
