
/* ==========================================================================
   Inoviq ERP — Dispatch Advice FINAL Gate Entry UI lock
   Dispatch Advice only. No business/API/SQL/save/stock-hold logic changed.
   ========================================================================== */

html body #dispatchAdvice{
  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;
  color:#111!important;
}

/* One header only */
html body #dispatchAdvice > h1,
html body #dispatchAdvice .da-ge-legacy-title{
  display:none!important;
}
html body #dispatchAdvice .da-ge-header{
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  margin:0 0 10px!important;
  padding:0 14px!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;
  color:#fff!important;
  border:1px solid #184d70!important;
  border-bottom:2px solid #ef8b22!important;
  border-radius:5px 5px 0 0!important;
  box-shadow:none!important;
}
html body #dispatchAdvice .da-ge-title{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:800 18px/20px Arial,sans-serif!important;
  white-space:nowrap!important;
}
html body #dispatchAdvice .da-ge-title i{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body #dispatchAdvice .da-ge-mode{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:20px!important;
  min-height:20px!important;
  margin-left:2px!important;
  padding:0 8px!important;
  background:#1f4d91!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:1px solid #9fc4ff!important;
  border-radius:10px!important;
  font:800 10px/18px Arial,sans-serif!important;
}
html body #dispatchAdvice .da-ge-context,
html body #dispatchAdvice .da-ge-context span,
html body #dispatchAdvice .da-ge-context b{
  display:inline-flex!important;
  align-items:center!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:700 12px/16px Arial,sans-serif!important;
  white-space:nowrap!important;
}
html body #dispatchAdvice .da-ge-context{
  margin-left:auto!important;
  gap:7px!important;
}
html body #dispatchAdvice .da-ge-config{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  margin-left:2px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#f39a22!important;
  background-image:none!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid #c97310!important;
  border-radius:7px!important;
  box-shadow:none!important;
  font-size:16px!important;
}

/* Field card exactly before toolbar */
html body #dispatchAdvice .da-ge-header-card{
  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;
  box-shadow:none!important;
}
html body #dispatchAdvice .da-ge-fields{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px 14px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
html body #dispatchAdvice .da-ge-fields .field-wrap{
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}
html body #dispatchAdvice .da-ge-fields label{
  display:block!important;
  margin:0 0 3px!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  font:700 11.5px/15px Arial,sans-serif!important;
}
html body #dispatchAdvice .da-ge-fields input,
html body #dispatchAdvice .da-ge-fields select{
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  padding:4px 8px!important;
  box-sizing:border-box!important;
  background:#fff!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid #b7c6d2!important;
  border-radius:4px!important;
  font:600 12.5px Arial,sans-serif!important;
}
html body #dispatchAdvice .da-ge-fields input[readonly],
html body #dispatchAdvice .da-ge-fields input:disabled,
html body #dispatchAdvice .da-ge-fields select:disabled{
  background:#e9eef2!important;
  opacity:1!important;
}

/* Remove duplicate title/mode from lower toolbar */
html body #dispatchAdvice .da-ge-toolbar .clean-toolbar-title,
html body #dispatchAdvice .da-ge-toolbar .erpplus-ui-toolbar-title,
html body #dispatchAdvice .da-ge-toolbar .ai-standard-toolbar-title,
html body #dispatchAdvice .da-ge-toolbar .ai-tf-toolbar-title,
html body #dispatchAdvice .da-ge-toolbar [class*="toolbar-title"]{
  display:none!important;
}

/* Toolbar exact Gate Entry */
html body #dispatchAdvice .da-ge-toolbar,
html body #dispatchAdvice > .clean-action-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;
  gap:6px!important;
  background:#1f5f8b!important;
  background-image:none!important;
  color:#fff!important;
  border:1px solid #184d70!important;
  border-radius:5px!important;
  box-shadow:none!important;
}
html body #dispatchAdvice .da-ge-toolbar-actions,
html body #dispatchAdvice .da-ge-toolbar .clean-toolbar-buttons,
html body #dispatchAdvice > .clean-action-toolbar .clean-toolbar-buttons{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  width:auto!important;
  margin:0 0 0 auto!important;
  flex-wrap:nowrap!important;
}
html body #dispatchAdvice .da-ge-toolbar button,
html body #dispatchAdvice > .clean-action-toolbar button{
  height:32px!important;
  min-height:32px!important;
  min-width:auto!important;
  width:auto!important;
  margin:0!important;
  padding:3px 11px!important;
  background:#f39a22!important;
  background-image:none!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid #c97310!important;
  border-radius:4px!important;
  box-shadow:none!important;
  font:700 12px Arial,sans-serif!important;
  white-space:nowrap!important;
  opacity:1!important;
}
html body #dispatchAdvice .da-ge-toolbar button:disabled,
html body #dispatchAdvice > .clean-action-toolbar button:disabled{
  background:#6f91a8!important;
  background-image:none!important;
  color:#dbe7ef!important;
  -webkit-text-fill-color:#dbe7ef!important;
  border-color:#5b7c92!important;
  opacity:1!important;
  cursor:not-allowed!important;
}

/* Items section */
html body #dispatchAdvice .da-ge-grid-card{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  background:#fff!important;
  border:1px solid #b9c9d5!important;
  border-radius:5px!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
html body #dispatchAdvice .da-ge-grid-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;
  background:#edf6fc!important;
  color:#163750!important;
  -webkit-text-fill-color:#163750!important;
  border:0!important;
  border-bottom:1px solid #b9cfdf!important;
  font:800 13px Arial,sans-serif!important;
}
html body #dispatchAdvice .da-ge-grid-title::before{
  content:"▣ ";
  margin-right:4px!important;
}
html body #dispatchAdvice .da-ge-grid-wrap{
  width:100%!important;
  overflow:auto!important;
  background:#fff!important;
}
html body #dispatchAdvice .da-ge-grid{
  width:max-content!important;
  min-width:100%!important;
  border-collapse:collapse!important;
  background:#fff!important;
}
html body #dispatchAdvice .da-ge-grid th{
  height:32px!important;
  padding:5px 8px!important;
  background:#dcebf5!important;
  color:#17374e!important;
  -webkit-text-fill-color:#17374e!important;
  border:1px solid #aebfcb!important;
  font:800 11.5px/14px Arial,sans-serif!important;
  text-align:left!important;
  white-space:nowrap!important;
}
html body #dispatchAdvice .da-ge-grid td{
  height:34px!important;
  padding:3px 4px!important;
  background:#fff!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid #c6d2da!important;
}

/* Hide obsolete duplicate/legacy action row only */
html body #dispatchAdvice .sales-actions{
  display:none!important;
}

@media(max-width:900px){
  html body #dispatchAdvice{
    width:calc(100% - 20px)!important;
    margin:10px auto 60px!important;
    padding:8px!important;
  }
  html body #dispatchAdvice .da-ge-fields{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
/* ===== INOVIQ SALES FINAL TOUCH V1 — Dispatch Advice ===== */
html body #dispatchAdvice .da-ge-header{
  border-bottom-width:3px!important;
}
html body #dispatchAdvice .da-ge-config{
  width:26px!important;
  min-width:26px!important;
  height:26px!important;
  min-height:26px!important;
  margin-left:5px!important;
  border-radius:4px!important;
  background:#ef8b22!important;
  border-color:#d87812!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body #dispatchAdvice .da-ge-header-card{
  padding:9px 10px 10px!important;
}
html body #dispatchAdvice .da-ge-fields{
  gap:7px 10px!important;
}
html body #dispatchAdvice .da-ge-fields input,
html body #dispatchAdvice .da-ge-fields select{
  height:29px!important;
  min-height:29px!important;
  padding:3px 7px!important;
  border-radius:3px!important;
  font:600 12px Arial,sans-serif!important;
}
html body #dispatchAdvice .da-ge-toolbar,
html body #dispatchAdvice > .clean-action-toolbar{
  height:39px!important;
  min-height:39px!important;
  padding:5px 7px!important;
  border-radius:4px!important;
}
html body #dispatchAdvice .da-ge-toolbar button,
html body #dispatchAdvice > .clean-action-toolbar button{
  min-width:70px!important;
  height:28px!important;
  min-height:28px!important;
  padding:0 10px!important;
  background:#ef8b22!important;
  border:1px solid #d87812!important;
  border-radius:3px!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:800 11px/26px Arial,sans-serif!important;
}
html body #dispatchAdvice .da-ge-toolbar button:disabled,
html body #dispatchAdvice > .clean-action-toolbar button:disabled{
  opacity:1!important;
  background:#aeb5ba!important;
  border-color:#9099a0!important;
  color:#f5f5f5!important;
  -webkit-text-fill-color:#f5f5f5!important;
}
\n\n/* 2026-09-21 Dispatch Advice: Gate Entry matched detail controls */\nhtml body #dispatchAdvice .sales-search-cell{position:relative!important;min-width:210px!important;width:210px!important;overflow:visible!important;}\nhtml body #dispatchAdvice .sales-part-search{width:100%!important;height:34px!important;box-sizing:border-box!important;background:#fff!important;background-image:none!important;color:#111!important;-webkit-text-fill-color:#111!important;border:1px solid #b7c6d2!important;border-radius:4px!important;padding:4px 8px!important;font:600 12px Arial,sans-serif!important;}\nhtml body #dispatchAdvice .sales-part-search::placeholder{color:#7b8794!important;-webkit-text-fill-color:#7b8794!important;opacity:1!important;}\nhtml body #dispatchAdvice .sales-part-suggestions{top:35px!important;left:0!important;right:auto!important;width:360px!important;max-width:480px!important;max-height:230px!important;overflow-y:auto!important;background:#fff!important;background-image:none!important;border:1px solid #9fb3c2!important;border-radius:2px!important;box-shadow:0 5px 14px rgba(0,0,0,.18)!important;color:#111!important;}\nhtml body #dispatchAdvice .sales-part-option{padding:7px 9px!important;background:#fff!important;background-image:none!important;color:#111!important;-webkit-text-fill-color:#111!important;border-bottom:1px solid #d6e0e7!important;font:600 12px/1.35 Arial,sans-serif!important;}\nhtml body #dispatchAdvice .sales-part-option b,html body #dispatchAdvice .sales-part-option small{color:#111!important;-webkit-text-fill-color:#111!important;}\nhtml body #dispatchAdvice .sales-part-option:hover{background:#dcecf7!important;color:#111!important;-webkit-text-fill-color:#111!important;}\nhtml body #dispatchAdvice .sales-part-option.disabled{background:#f5f7f9!important;color:#555!important;-webkit-text-fill-color:#555!important;}\nhtml body #dispatchAdvice .da-ge-grid input,html body #dispatchAdvice .sales-items-table input{background:#fff!important;color:#111!important;-webkit-text-fill-color:#111!important;border:1px solid #b7c6d2!important;border-radius:3px!important;}\nhtml body #dispatchAdvice .da-ge-grid-card{border-color:#b9c9d5!important;background:#fff!important;}\nhtml body #dispatchAdvice .da-ge-grid-title{background:#eaf4fb!important;color:#12364f!important;-webkit-text-fill-color:#12364f!important;border-bottom:1px solid #b9c9d5!important;}\n