
/* Item Weight Master sub-screen — locked modal reference */
#weightModal{
  align-items:center!important;
  justify-content:center!important;
  padding:18px!important;
  overflow:auto!important;
  background:rgba(15,23,42,.34)!important;
  backdrop-filter:blur(1px);
}
#weightModal .modal-content{
  box-sizing:border-box!important;
  width:590px!important;
  max-width:calc(100vw - 36px)!important;
  max-height:calc(100vh - 36px)!important;
  margin:auto!important;
  padding:0!important;
  overflow:auto!important;
  background:#fff!important;
  border:1px solid #dce5ef!important;
  border-radius:12px!important;
  box-shadow:0 18px 50px rgba(15,23,42,.18)!important;
  font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif!important;
}
#weightModal .modal-content>h2,
#weightModal .modal-content>h3{
  position:relative!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-height:74px!important;
  margin:0!important;
  padding:20px 20px 18px 61px!important;
  display:flex!important;
  align-items:flex-start!important;
  border-bottom:1px solid #e3eaf2!important;
  color:#17233b!important;
  font-size:18px!important;
  line-height:1.15!important;
  font-weight:600!important;
}
#weightModal .modal-content>h2:before,
#weightModal .modal-content>h3:before{
  content:'▤';
  position:absolute;
  left:15px;top:17px;
  width:38px;height:38px;
  display:grid;place-items:center;
  border-radius:10px;
  background:linear-gradient(145deg,#6d5dfc,#5a42f5);
  color:#fff;font-size:15px;
  box-shadow:0 5px 12px rgba(91,66,245,.18);
}
#weightModal form{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:18px 15px 0!important;
}
#weightModal .form-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:14px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
#weightModal .form-group{
  width:100%!important;
  margin:0 0 14px!important;
  padding:0!important;
}
#weightModal .form-group label{
  display:block!important;
  margin:0 0 5px!important;
  color:#334155!important;
  font-size:11.5px!important;
  line-height:1.25!important;
  font-weight:600!important;
}
#weightModal .form-control,
#weightModal input,
#weightModal select{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:41px!important;
  margin:0!important;
  padding:0 12px!important;
  border:1px solid #d8e2ee!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#17233b!important;
  font-size:13px!important;
  box-shadow:none!important;
}
#weightModal .form-control:focus,#weightModal input:focus,#weightModal select:focus{
  outline:none!important;border-color:#7c8cff!important;
  box-shadow:0 0 0 3px rgba(99,102,241,.08)!important;
}
/* Existing direct form buttons: make them a clean footer without changing handlers */
#weightModal form>button{
  position:relative!important;
  width:auto!important;
  min-width:70px!important;
  height:38px!important;
  margin:4px 5px 14px 0!important;
  padding:0 14px!important;
  border-radius:7px!important;
  font-size:12px!important;
  font-weight:600!important;
  vertical-align:middle!important;
}
#weightModal form>button.btn-primary,
#weightModal form>button.btn-success{
  background:#2563eb!important;color:#fff!important;border:1px solid #2563eb!important;
  box-shadow:0 3px 8px rgba(37,99,235,.15)!important;
}
#weightModal form>button.btn-outline,
#weightModal form>button.btn-secondary{
  background:#fff!important;color:#111827!important;border:1px solid #d9e2ec!important;
}
