
/* Inoviq ERP — Purchase Return exact Gate Entry header spacing
   CSS only. No JS / transaction logic changed. */

html body #purchaseReturnV1{
  width:min(1120px,calc(100% - 44px))!important;
  max-width:1120px!important;
  margin:20px auto 70px!important;
  padding:10px!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border:1px solid #b9c9d5!important;
  border-radius:9px!important;
  box-shadow:0 5px 18px rgba(31,95,139,.16)!important;
}

/* Header shell */
html body #purchaseReturnV1>.prtv-header.ai-tf-header{
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  margin:0 0 10px!important;
  padding:0 16px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  background:#1f5f8b!important;
  background-image:none!important;
  border:1px solid #184d70!important;
  border-bottom:3px solid #ef8b22!important;
  border-radius:5px 5px 0 0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

/* Disable all old artificial header pseudo elements */
html body #purchaseReturnV1>.prtv-header::before,
html body #purchaseReturnV1>.prtv-header::after{
  content:none!important;
  display:none!important;
}

/* Real title generated by transaction framework */
html body #purchaseReturnV1>.prtv-header .ai-tf-header-title{
  display:inline-flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  min-width:0!important;
  margin:0 auto 0 0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:800 18px/20px Arial,sans-serif!important;
  white-space:nowrap!important;
  overflow:visible!important;
}

/* ADD MODE exactly after title, like Gate Entry */
html body #purchaseReturnV1>.prtv-header .ai-tf-header-title::after{
  content:"ADD MODE";
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:20px!important;
  min-height:20px!important;
  padding:0 8px!important;
  margin-left:9px!important;
  background:#1f4d91!important;
  border:1px solid #9fc4ff!important;
  border-radius:10px!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:800 10px/18px Arial,sans-serif!important;
  letter-spacing:0!important;
  box-shadow:none!important;
}

/* Company / FY like Gate Entry */
html body #purchaseReturnV1>.prtv-header .ai-tf-header-info{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  flex:0 0 auto!important;
  margin-left:auto!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:700 12px/16px Arial,sans-serif!important;
  white-space:nowrap!important;
  background:transparent!important;
  border:0!important;
}
html body #purchaseReturnV1>.prtv-header .ai-tf-header-info *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:700 12px/16px Arial,sans-serif!important;
}

/* Field card */
html body #purchaseReturnV1>.prtv-fields{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px 14px!important;
  width:100%!important;
  margin:0!important;
  padding:12px 16px 13px!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border:1px solid #b9c9d5!important;
  border-radius:5px!important;
}
html body #purchaseReturnV1>.prtv-fields label{
  display:block!important;
  margin:0 0 3px!important;
  color:#111!important;
  font:700 11.5px/15px Arial,sans-serif!important;
}
html body #purchaseReturnV1>.prtv-fields input,
html body #purchaseReturnV1>.prtv-fields select{
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  box-sizing:border-box!important;
  padding:4px 8px!important;
  background:#fff!important;
  color:#111!important;
  border:1px solid #b7c6d2!important;
  border-radius:4px!important;
  font:600 12.5px Arial,sans-serif!important;
}
html body #purchaseReturnV1>.prtv-fields input[readonly]{
  background:#e9eef2!important;
}

/* Toolbar */
html body #purchaseReturnV1>.prtv-toolbar{
  width:100%!important;
  height:46px!important;
  min-height:46px!important;
  margin:8px 0!important;
  padding:6px 9px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  background:#1f5f8b!important;
  border:1px solid #184d70!important;
  border-radius:5px!important;
}
html body #purchaseReturnV1>.prtv-toolbar .clean-toolbar-title{display:none!important}
html body #purchaseReturnV1>.prtv-toolbar .clean-toolbar-buttons{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  margin-left:auto!important;
}
html body #purchaseReturnV1>.prtv-toolbar button{
  height:32px!important;
  min-height:32px!important;
  padding:3px 11px!important;
  margin:0!important;
  background:#f39a22!important;
  color:#111!important;
  border:1px solid #c97310!important;
  border-radius:4px!important;
  font:700 12px Arial,sans-serif!important;
}
html body #purchaseReturnV1>.prtv-toolbar button:disabled{
  background:#6f91a8!important;
  border-color:#5b7c92!important;
  color:#dbe7ef!important;
}

/* Details */
html body #purchaseReturnV1>.prtv-detail{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border:1px solid #b9c9d5!important;
  border-radius:5px!important;
  overflow:auto!important;
}
html body #purchaseReturnV1>.prtv-detail>.prtv-detail-title{
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:0 12px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  background:#edf6fc!important;
  color:#163750!important;
  border:0!important;
  border-bottom:1px solid #b9cfdf!important;
  font:800 13px Arial,sans-serif!important;
  text-align:left!important;
}
html body #purchaseReturnV1>.prtv-detail>.prtv-detail-title::before{
  content:"▣ ";
}
html body #purchaseReturnV1 .prtv-table{
  width:max-content!important;
  min-width:100%!important;
  border-collapse:collapse!important;
  background:#fff!important;
}
html body #purchaseReturnV1 .prtv-table th{
  height:32px!important;
  padding:5px 8px!important;
  background:#dcebf5!important;
  color:#17374e!important;
  border:1px solid #aebfcb!important;
  font:800 11.5px/14px Arial,sans-serif!important;
  white-space:nowrap!important;
  text-align:left!important;
}
html body #purchaseReturnV1 .prtv-table td{
  height:34px!important;
  padding:3px 4px!important;
  background:#fff!important;
  color:#111!important;
  border:1px solid #c6d2da!important;
}

@media(max-width:900px){
  html body #purchaseReturnV1{
    width:calc(100% - 20px)!important;
    margin:10px auto 60px!important;
    padding:8px!important;
  }
  html body #purchaseReturnV1>.prtv-fields{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
