
/* ==========================================================================
   Inoviq ERP — QUALITY UI LOCK FINAL
   Scope only:
     1) Incoming Inspection
     2) Inspection Checkpoint Master
     3) In Process Quality (IPQC)
     4) QRD - Quality Rejection Detail

   Purpose: keep all four approved Quality forms on the same Gate Entry UI
   standard without changing transaction, API, SQL, save/edit/delete/print,
   checkpoint, rejection/rework/scrap or rights logic.
   ========================================================================== */

:root{
  --q-ge-blue:#1f5f8b;
  --q-ge-blue-dark:#184d70;
  --q-ge-orange:#f39a22;
  --q-ge-orange-dark:#c97310;
  --q-ge-line:#b9c9d5;
  --q-ge-grid:#dcebf5;
  --q-ge-section:#edf6fc;
  --q-ge-text:#111;
  --q-ge-title:#163750;
}

/* ---------- shared outer card ---------- */
html body #incomingInspection,
html body #inspectionCheckpointMaster,
html body #ae50-phase4-final-ipqc,
html body #ae50-phase4-final-qrd{
  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;
  color:var(--q-ge-text)!important;
  border:1px solid var(--q-ge-line)!important;
  border-radius:9px!important;
  box-shadow:0 5px 18px rgba(31,95,139,.16)!important;
}

/* Remove only known duplicate formatter headers. */
html body #ae50-phase4-final-ipqc .ipqc-standard-head,
html body #ae50-phase4-final-qrd .qrd-standard-head{
  display:none!important;
}

/* ---------- Incoming Inspection + Checkpoint owner framework ---------- */
html body #incomingInspection .ae50-p4-head,
html body #inspectionCheckpointMaster .ae50-p4-head{
  margin:0 0 10px!important;
  padding:0!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border:1px solid var(--q-ge-line)!important;
  border-radius:5px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

html body #incomingInspection .ae50-p4-form-title,
html body #inspectionCheckpointMaster .quality-lock-header{
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!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:var(--q-ge-blue)!important;
  background-image:none!important;
  color:#fff!important;
  border:0!important;
  border-bottom:2px solid #ef8b22!important;
  border-radius:0!important;
  box-shadow:none!important;
}

html body #incomingInspection .ai-insp-title-wrap,
html body #inspectionCheckpointMaster .quality-lock-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 #incomingInspection .ai-insp-title-wrap i,
html body #incomingInspection .ai-insp-title-wrap b,
html body #inspectionCheckpointMaster .quality-lock-title i,
html body #inspectionCheckpointMaster .quality-lock-title span{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

html body #incomingInspection .ai-insp-mode-badge,
html body #inspectionCheckpointMaster .quality-lock-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:2px!important;
  background:#1f4d91!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:1px solid #9fc4ff!important;
  border-radius:10px!important;
  box-shadow:none!important;
  font:800 10px/18px Arial,sans-serif!important;
  font-style:normal!important;
}

html body #incomingInspection .ai-insp-head-right,
html body #inspectionCheckpointMaster .quality-lock-context{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!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;
}

html body #incomingInspection .ai-insp-company-fy{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:700 12px/16px Arial,sans-serif!important;
}

html body #incomingInspection .ai-insp-config{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  padding:0!important;
  margin-left:2px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:var(--q-ge-orange)!important;
  background-image:none!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid var(--q-ge-orange-dark)!important;
  border-radius:7px!important;
  box-shadow:none!important;
  font-size:16px!important;
}

/* Hide Company/FY input boxes only in Checkpoint Master; context is in header. */
html body #inspectionCheckpointMaster.quality-lock-ready .ae50-p4-grid > .fw:nth-child(1),
html body #inspectionCheckpointMaster.quality-lock-ready .ae50-p4-grid > .fw:nth-child(2){
  display:none!important;
}

html body #incomingInspection .ae50-p4-grid,
html body #inspectionCheckpointMaster .ae50-p4-grid{
  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;
}

html body #incomingInspection .ae50-p4-grid label,
html body #inspectionCheckpointMaster .ae50-p4-grid 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 #incomingInspection .ae50-p4-grid input,
html body #incomingInspection .ae50-p4-grid select,
html body #inspectionCheckpointMaster .ae50-p4-grid input,
html body #inspectionCheckpointMaster .ae50-p4-grid 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 #incomingInspection .ae50-p4-grid input[readonly],
html body #inspectionCheckpointMaster .ae50-p4-grid input[readonly]{
  background:#e9eef2!important;
}

/* Incoming + Checkpoint toolbar exactly Gate Entry. */
html body #incomingInspection .ae50-p4-toolbar,
html body #inspectionCheckpointMaster .ae50-p4-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:var(--q-ge-blue)!important;
  background-image:none!important;
  border:1px solid var(--q-ge-blue-dark)!important;
  border-radius:5px!important;
  box-shadow:none!important;
}

html body #incomingInspection .ae50-p4-title,
html body #inspectionCheckpointMaster .ae50-p4-title{
  display:none!important;
}

html body #incomingInspection .ae50-p4-actions,
html body #inspectionCheckpointMaster .ae50-p4-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  margin-left:auto!important;
  flex-wrap:nowrap!important;
}

html body #incomingInspection .ae50-p4-actions button,
html body #inspectionCheckpointMaster .ae50-p4-actions button{
  height:32px!important;
  min-height:32px!important;
  min-width:auto!important;
  margin:0!important;
  padding:3px 11px!important;
  background:var(--q-ge-orange)!important;
  background-image:none!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid var(--q-ge-orange-dark)!important;
  border-radius:4px!important;
  box-shadow:none!important;
  font:700 12px Arial,sans-serif!important;
  white-space:nowrap!important;
}

/* Incoming + Checkpoint detail sections. */
html body #incomingInspection .ae50-p4-detail,
html body #inspectionCheckpointMaster .ae50-p4-detail{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  background:#fff!important;
  color:#111!important;
  border:1px solid var(--q-ge-line)!important;
  border-radius:5px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

html body #incomingInspection .ae50-p4-section,
html body #inspectionCheckpointMaster .ae50-p4-section{
  width:100%!important;
  min-height:34px!important;
  margin:0!important;
  padding:0 12px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  background:var(--q-ge-section)!important;
  color:var(--q-ge-title)!important;
  -webkit-text-fill-color:var(--q-ge-title)!important;
  border:0!important;
  border-bottom:1px solid #b9cfdf!important;
  font:800 13px Arial,sans-serif!important;
}

html body #incomingInspection .ae50-p4-section i,
html body #inspectionCheckpointMaster .ae50-p4-section i{
  color:var(--q-ge-title)!important;
  -webkit-text-fill-color:var(--q-ge-title)!important;
}

html body #inspectionCheckpointMaster #aiCpAddLine{
  width:30px!important;
  min-width:30px!important;
  height:28px!important;
  min-height:28px!important;
  padding:0!important;
  margin:0!important;
  background:#f3bd73!important;
  color:#17374e!important;
  -webkit-text-fill-color:#17374e!important;
  border:1px solid #d9a758!important;
  border-radius:4px!important;
  box-shadow:none!important;
  font-size:0!important;
}
html body #inspectionCheckpointMaster #aiCpAddLine::after{
  content:"+";
  font:900 18px/26px Arial,sans-serif!important;
}

html body #incomingInspection .ae50-p4-table-wrap,
html body #inspectionCheckpointMaster .ae50-p4-table-wrap{
  width:100%!important;
  overflow:auto!important;
  background:#fff!important;
}
html body #incomingInspection .ae50-p4-table,
html body #inspectionCheckpointMaster .ae50-p4-table{
  width:max-content!important;
  min-width:100%!important;
  border-collapse:collapse!important;
  background:#fff!important;
}
html body #incomingInspection .ae50-p4-table th,
html body #inspectionCheckpointMaster .ae50-p4-table th{
  height:32px!important;
  padding:5px 8px!important;
  background:var(--q-ge-grid)!important;
  color:#17374e!important;
  -webkit-text-fill-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 #incomingInspection .ae50-p4-table td,
html body #inspectionCheckpointMaster .ae50-p4-table 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;
}

/* ---------- IPQC + QRD generated by 414/432 ---------- */
html body #ae50-phase4-final-ipqc .p4f-head,
html body #ae50-phase4-final-qrd .p4f-head{
  margin:0 0 10px!important;
  padding:0!important;
  background:#fff!important;
  border:1px solid var(--q-ge-line)!important;
  border-radius:5px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-header-title,
html body #ae50-phase4-final-qrd .p4f-header-title{
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!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:var(--q-ge-blue)!important;
  background-image:none!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:0!important;
  border-bottom:2px solid #ef8b22!important;
  border-radius:0!important;
  box-shadow:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-header-title > span,
html body #ae50-phase4-final-qrd .p4f-header-title > span{
  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 #ae50-phase4-final-ipqc .p4f-header-title > span i,
html body #ae50-phase4-final-qrd .p4f-header-title > span i{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

html body #ae50-phase4-final-ipqc .p4f-mode-badge,
html body #ae50-phase4-final-qrd .qrd-mode-badge{
  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:2px!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;
  font-style:normal!important;
}

html body #ae50-phase4-final-ipqc .p4f-header-title > strong,
html body #ae50-phase4-final-qrd .p4f-header-title > strong{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!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;
}

html body #ae50-phase4-final-ipqc .p4f-header-title > strong i,
html body #ae50-phase4-final-qrd .p4f-header-title > strong i{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font:700 12px/16px Arial,sans-serif!important;
  font-style:normal!important;
}

html body #ae50-phase4-final-ipqc .p4f-config-btn,
html body #ae50-phase4-final-qrd .qrd-series-btn{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  padding:0!important;
  margin-left:8px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:var(--q-ge-orange)!important;
  background-image:none!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid var(--q-ge-orange-dark)!important;
  border-radius:7px!important;
  box-shadow:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-grid,
html body #ae50-phase4-final-qrd .p4f-grid{
  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;
}

html body #ae50-phase4-final-ipqc .p4f-grid label,
html body #ae50-phase4-final-qrd .p4f-grid label{
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  font:700 11.5px/15px Arial,sans-serif!important;
}
html body #ae50-phase4-final-ipqc .p4f-grid input,
html body #ae50-phase4-final-ipqc .p4f-grid select,
html body #ae50-phase4-final-qrd .p4f-grid input,
html body #ae50-phase4-final-qrd .p4f-grid select{
  height:34px!important;
  min-height:34px!important;
  padding:4px 8px!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 #ae50-phase4-final-ipqc .p4f-grid input[readonly],
html body #ae50-phase4-final-qrd .p4f-grid input[readonly]{
  background:#e9eef2!important;
}

/* IPQC + QRD toolbar — explicit ID selectors beat legacy grey gradients. */
html body #ae50-phase4-final-ipqc .p4f-toolbar,
html body #ae50-phase4-final-qrd .p4f-toolbar,
html body #ae50-phase4-final-ipqc .ipqc-primary-toolbar,
html body #ae50-phase4-final-qrd .qrd-primary-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:var(--q-ge-blue)!important;
  background-image:none!important;
  border:1px solid var(--q-ge-blue-dark)!important;
  border-radius:5px!important;
  box-shadow:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-title,
html body #ae50-phase4-final-qrd .p4f-title{
  display:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-actions,
html body #ae50-phase4-final-qrd .p4f-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  margin-left:auto!important;
  width:auto!important;
}

html body #ae50-phase4-final-ipqc .p4f-actions button,
html body #ae50-phase4-final-qrd .p4f-actions button{
  height:32px!important;
  min-height:32px!important;
  min-width:auto!important;
  margin:0!important;
  padding:3px 11px!important;
  background:var(--q-ge-orange)!important;
  background-image:none!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  border:1px solid var(--q-ge-orange-dark)!important;
  border-radius:4px!important;
  box-shadow:none!important;
  font:700 12px Arial,sans-serif!important;
  white-space:nowrap!important;
}

/* IPQC + QRD details */
html body #ae50-phase4-final-ipqc .p4f-detail,
html body #ae50-phase4-final-qrd .p4f-detail,
html body #ae50-phase4-final-qrd .qrd-defect-panel{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  background:#fff!important;
  color:#111!important;
  border:1px solid var(--q-ge-line)!important;
  border-radius:5px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-section,
html body #ae50-phase4-final-qrd .p4f-section,
html body #ae50-phase4-final-qrd .qrd-detail-title{
  width:100%!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:space-between!important;
  gap:8px!important;
  background:var(--q-ge-section)!important;
  color:var(--q-ge-title)!important;
  -webkit-text-fill-color:var(--q-ge-title)!important;
  border:0!important;
  border-bottom:1px solid #b9cfdf!important;
  font:800 13px Arial,sans-serif!important;
}

html body #ae50-phase4-final-ipqc .p4f-section span,
html body #ae50-phase4-final-ipqc .p4f-section i,
html body #ae50-phase4-final-qrd .p4f-section span,
html body #ae50-phase4-final-qrd .p4f-section i{
  color:var(--q-ge-title)!important;
  -webkit-text-fill-color:var(--q-ge-title)!important;
}

html body #ae50-phase4-final-ipqc .p4f-rowbar,
html body #ae50-phase4-final-qrd .p4f-rowbar,
html body #ae50-phase4-final-qrd .qrd-row-actions{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  margin:0 0 0 auto!important;
  padding:0!important;
}

html body #ae50-phase4-final-ipqc .p4f-rowbar button,
html body #ae50-phase4-final-qrd .p4f-rowbar button,
html body #ae50-phase4-final-qrd .qrd-row-actions button{
  width:30px!important;
  min-width:30px!important;
  height:28px!important;
  min-height:28px!important;
  margin:0!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#f3bd73!important;
  color:#17374e!important;
  -webkit-text-fill-color:#17374e!important;
  border:1px solid #d9a758!important;
  border-radius:4px!important;
  box-shadow:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-tablewrap,
html body #ae50-phase4-final-qrd .p4f-tablewrap{
  width:100%!important;
  overflow:auto!important;
  background:#fff!important;
}
html body #ae50-phase4-final-ipqc .p4f-tablewrap table,
html body #ae50-phase4-final-qrd .p4f-tablewrap table{
  width:max-content!important;
  min-width:100%!important;
  border-collapse:collapse!important;
  background:#fff!important;
}
html body #ae50-phase4-final-ipqc .p4f-tablewrap th,
html body #ae50-phase4-final-qrd .p4f-tablewrap th{
  height:32px!important;
  padding:5px 8px!important;
  background:var(--q-ge-grid)!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 #ae50-phase4-final-ipqc .p4f-tablewrap td,
html body #ae50-phase4-final-qrd .p4f-tablewrap 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;
}

/* ---------- responsive ---------- */
@media(max-width:900px){
  html body #incomingInspection,
  html body #inspectionCheckpointMaster,
  html body #ae50-phase4-final-ipqc,
  html body #ae50-phase4-final-qrd{
    width:calc(100% - 20px)!important;
    margin:10px auto 60px!important;
    padding:8px!important;
  }
  html body #incomingInspection .ae50-p4-grid,
  html body #inspectionCheckpointMaster .ae50-p4-grid,
  html body #ae50-phase4-final-ipqc .p4f-grid,
  html body #ae50-phase4-final-qrd .p4f-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}


/* ======================================================================
   QUALITY MERGED V2 — exact Gate Entry toolbar + Checkpoint header lock
   ====================================================================== */

/* IPQC + QRD toolbar: exact Gate Entry dimensions/colors/disabled state */
html body #ae50-phase4-final-ipqc .p4f-toolbar,
html body #ae50-phase4-final-qrd .p4f-toolbar,
html body #ae50-phase4-final-ipqc .ipqc-primary-toolbar,
html body #ae50-phase4-final-qrd .qrd-primary-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;
  border:1px solid #184d70!important;
  border-radius:5px!important;
  box-shadow:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-title,
html body #ae50-phase4-final-qrd .p4f-title,
html body #ae50-phase4-final-ipqc .ipqc-primary-toolbar-title,
html body #ae50-phase4-final-qrd .qrd-primary-toolbar-title{
  display:none!important;
}

html body #ae50-phase4-final-ipqc .p4f-actions,
html body #ae50-phase4-final-qrd .p4f-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  margin:0 0 0 auto!important;
  width:auto!important;
}

html body #ae50-phase4-final-ipqc .p4f-actions button,
html body #ae50-phase4-final-qrd .p4f-actions button{
  height:32px!important;
  min-height:32px!important;
  min-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;
}
html body #ae50-phase4-final-ipqc .p4f-actions button:disabled,
html body #ae50-phase4-final-qrd .p4f-actions 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;
}

/* Inspection Checkpoint: ensure Gate Entry header is visible and fields start below it */
html body #inspectionCheckpointMaster .quality-lock-header{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0 14px!important;
  box-sizing:border-box!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  background:#1f5f8b!important;
  background-image:none!important;
  border:0!important;
  border-bottom:2px solid #ef8b22!important;
  border-radius:0!important;
  box-shadow:none!important;
}
html body #inspectionCheckpointMaster .quality-lock-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 #inspectionCheckpointMaster .quality-lock-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;
  font-style:normal!important;
}
html body #inspectionCheckpointMaster .quality-lock-context{
  display:flex!important;
  align-items:center!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;
}

/* Checkpoint toolbar exact Gate Entry */
html body #inspectionCheckpointMaster .ae50-p4-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;
  border:1px solid #184d70!important;
  border-radius:5px!important;
  box-shadow:none!important;
}
html body #inspectionCheckpointMaster .ae50-p4-title{display:none!important}
html body #inspectionCheckpointMaster .ae50-p4-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  margin-left:auto!important;
}
html body #inspectionCheckpointMaster .ae50-p4-actions button{
  height:32px!important;
  min-height:32px!important;
  min-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;
}


/* QUALITY MERGED V3 — toolbar button states exactly like Gate Entry */
html body #ae50-phase4-final-ipqc .p4f-actions button:disabled,
html body #ae50-phase4-final-qrd .p4f-actions button:disabled,
html body #inspectionCheckpointMaster .ae50-p4-actions 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;
}
/* ===== INOVIQ QUALITY FINAL TOUCH V1 =====
   UI-only finishing pass for:
   Incoming Inspection
   Inspection Checkpoint Master
   In Process Quality / IPQC
   QRD - Quality Rejection Detail
   No transaction/API/SQL/rights logic changed.
*/

/* Header orange line + settings button normalized */
html body #incomingInspection .ae50-p4-form-title,
html body #inspectionCheckpointMaster .quality-lock-header,
html body #ae50-phase4-final-ipqc .p4f-header-title,
html body #ae50-phase4-final-qrd .p4f-header-title{
  border-bottom-width:3px!important;
}

html body #incomingInspection .ai-insp-config,
html body #ae50-phase4-final-ipqc .p4f-config-btn,
html body #ae50-phase4-final-qrd .qrd-series-btn{
  width:26px!important;
  min-width:26px!important;
  height:26px!important;
  min-height:26px!important;
  padding:0!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;
}

/* Header field areas: compact Gate Entry geometry */
html body #incomingInspection .ae50-p4-grid,
html body #inspectionCheckpointMaster .ae50-p4-grid,
html body #ae50-phase4-final-ipqc .p4f-grid,
html body #ae50-phase4-final-qrd .p4f-grid{
  gap:7px 10px!important;
  padding:9px 10px 10px!important;
}

html body #incomingInspection .ae50-p4-grid input,
html body #incomingInspection .ae50-p4-grid select,
html body #inspectionCheckpointMaster .ae50-p4-grid input,
html body #inspectionCheckpointMaster .ae50-p4-grid select,
html body #ae50-phase4-final-ipqc .p4f-grid input,
html body #ae50-phase4-final-ipqc .p4f-grid select,
html body #ae50-phase4-final-qrd .p4f-grid input,
html body #ae50-phase4-final-qrd .p4f-grid select{
  height:29px!important;
  min-height:29px!important;
  padding:3px 7px!important;
  border-radius:3px!important;
  font:600 12px Arial,sans-serif!important;
}

/* Toolbars: same blue/orange visual rhythm as Gate Entry */
html body #incomingInspection .ae50-p4-toolbar,
html body #inspectionCheckpointMaster .ae50-p4-toolbar,
html body #ae50-phase4-final-ipqc .p4f-toolbar,
html body #ae50-phase4-final-qrd .p4f-toolbar{
  height:39px!important;
  min-height:39px!important;
  margin:8px 0!important;
  padding:5px 7px!important;
  border-radius:4px!important;
}

html body #incomingInspection .ae50-p4-actions button,
html body #inspectionCheckpointMaster .ae50-p4-actions button,
html body #ae50-phase4-final-ipqc .p4f-actions button,
html body #ae50-phase4-final-qrd .p4f-actions button{
  min-width:70px!important;
  height:28px!important;
  min-height:28px!important;
  max-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 #incomingInspection .ae50-p4-actions button:disabled,
html body #inspectionCheckpointMaster .ae50-p4-actions button:disabled,
html body #ae50-phase4-final-ipqc .p4f-actions button:disabled,
html body #ae50-phase4-final-qrd .p4f-actions button:disabled{
  opacity:1!important;
  background:#aeb5ba!important;
  border-color:#9099a0!important;
  color:#f5f5f5!important;
  -webkit-text-fill-color:#f5f5f5!important;
}

/* Detail section titles and tables */
html body #incomingInspection .ae50-p4-section,
html body #inspectionCheckpointMaster .ae50-p4-section,
html body #ae50-phase4-final-ipqc .p4f-section,
html body #ae50-phase4-final-qrd .p4f-section{
  min-height:32px!important;
  padding:0 8px!important;
  background:#dcebf5!important;
  color:#17374e!important;
  -webkit-text-fill-color:#17374e!important;
  border-bottom:1px solid #b9c9d5!important;
  font:800 12px/20px Arial,sans-serif!important;
}

html body #incomingInspection .ae50-p4-table th,
html body #inspectionCheckpointMaster .ae50-p4-table th,
html body #ae50-phase4-final-ipqc table th,
html body #ae50-phase4-final-qrd table th{
  height:31px!important;
  padding:5px 7px!important;
  background:#dcebf5!important;
  color:#17374e!important;
  -webkit-text-fill-color:#17374e!important;
  font:800 11px/14px Arial,sans-serif!important;
  white-space:nowrap!important;
}

html body #incomingInspection .ae50-p4-table td,
html body #inspectionCheckpointMaster .ae50-p4-table td,
html body #ae50-phase4-final-ipqc table td,
html body #ae50-phase4-final-qrd table td{
  height:33px!important;
  padding:3px 4px!important;
}

@media(max-width:900px){
  html body #incomingInspection,
  html body #inspectionCheckpointMaster,
  html body #ae50-phase4-final-ipqc,
  html body #ae50-phase4-final-qrd{
    width:calc(100% - 20px)!important;
    margin:10px auto 60px!important;
    padding:8px!important;
  }
}
