.re-entry {
  --re-compact-cols:minmax(275px,2.8fr) 1.1fr .9fr .7fr .8fr .8fr 1.1fr .55fr .55fr .8fr .9fr .65fr 115px;
}
.re-entry {
  --pe-accent:#dc4d5d;
  --pe-amount:#fdecf0;
  --re-cols:minmax(300px,3fr) 135px 105px 80px 100px 100px 125px 70px 65px 90px 105px 80px 125px;
  font-size: 15px;
  min-height: calc(100vh - 50px);
}
.re-entry .pe-top {
  gap: 20px;
  min-height: 72px;
  height: auto;
  padding: 14px 0 6px;
  align-items: flex-start;
}
.re-entry .pe-crumb {
  white-space: nowrap;
  font-size: 17px;
  gap: 10px;
  min-height: 34px;
}
.re-entry .pe-crumb a:nth-of-type(2) {
  color: #d65060;
}
.re-entry .pe-actions {
  gap: 16px;
  flex-wrap: nowrap;
}
.re-entry .pe-actions > select {
  width: 150px;
  height: 34px;
}
.re-entry .pe-actions > select[data-tax] {
  width: 165px;
}
.re-entry .pe-primary {
  height: 34px;
  background: #15a1ed;
}
.re-entry .pe-save-group summary {
  height: 34px;
  background: #108fd6;
}
.re-stage {
  font-size: 12px;
  line-height: 25px;
  border-radius: 20px;
  background: #ffbd21;
  color: #fff;
  padding: 0 16px;
  text-transform: capitalize;
}
.re-tax-notice {
  font-size: 14px;
  line-height: 21px;
  max-width: 350px;
  color: #29a3df;
  font-weight: 700;
  margin: 2px auto 0;
}
.re-credit {
  height: 34px;
  min-width: 120px;
  border: 1px solid #d5dfe9;
  background: #fff;
  color: #9eacc4;
  text-align: left;
  padding: 5px 12px;
  cursor: default !important;
  opacity: 1;
}
.re-credit .pe-icon {
  color: #d77d94;
  margin-right: 8px;
}
.re-tools {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 8px;
}
.re-tools .pl-source-status {
  padding: 0;
  max-width: 700px;
  margin-left: auto;
}
.re-tools .pl-source-status p {
  margin: 0;
}
.re-tools .pl-source-status small {
  display: inline;
  padding: 0;
  border: 0;
}
.re-entry .pe-party-strip {
  grid-template-columns: 95px minmax(300px, 465px) 206px;
  gap: 28px;
  padding: 14px 20px 16px;
  align-items: start;
}
.re-entry .re-serial small {
  display: block;
  color: #8198b5;
  font-size: 14px;
}
.re-entry .re-serial b {
  display: block;
  color: #234b74;
  padding: 8px 0 5px;
  border-bottom: 1px solid #728ca5;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.re-entry .pe-party-field input {
  font-size: 17px;
  font-weight: 500;
  height: 34px;
  border-color: #728ca5;
}
.re-party-search {
  display: flex;
  position: relative;
  align-items: center;
  border-bottom: 1px solid #728ca5;
}
.re-party-search input {
  flex: 1;
  width: 160px !important;
  border: 0 !important;
}
.re-party-search > button {
  font-size: 20px;
  color: #a2b5cb;
  padding: 0 8px;
}
.re-entry .pe-party-field small {
  display: block;
  font-size: 11px;
  color: #6c809b;
  max-width: 465px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.re-entry .pe-date {
  max-width: 206px;
}
.re-entry .pe-date .se-date-display {
  height: 35px;
  font-size: 17px;
}
.re-lines {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: white;
  overflow-x: auto;
  min-height: 500px;
}
.re-grid {
  grid-template-columns: var(--re-cols);
  min-width: 1580px;
}
.re-entry .pe-head {
  height: 44px;
  font-size: 14px;
}
.re-entry .pe-head .pe-item > span {
  font-size: 14px;
  color: inherit;
}
.re-entry .pe-head > .pe-amount {
  font-size: 14px;
}
.re-entry .pe-order {
  margin-left: 12px;
  gap: 5px;
}
.re-entry .pe-order > button {
  font-size: 12px;
}
.re-entry .pe-order input {
  border: 0 !important;
}
.re-entry .re-search-row {
  padding: 0;
  min-width: 1580px;
  height: 44px;
  background:
    linear-gradient(
      to left,
      #dadcec 125px,
      #d8edff 125px);
}
.re-entry .re-search-row .pe-item-search {
  width: 780px;
  max-width: none;
}
.re-entry .re-search-row input {
  border: 0;
  border-bottom: 1px solid #456f98;
  border-radius: 0;
  height: 37px;
  padding: 5px 0;
  background: none;
  font-size: 14px;
  max-width: none;
}
.re-entry .pe-row {
  min-height: 43px;
  font-size: 14px;
}
.re-entry .pe-item-name {
  font-size: 14px !important;
  max-width: 260px;
}
.re-entry .pe-row > .pe-item {
  align-items: center;
  padding-top: 6px;
}
.re-entry .pe-delete {
  margin-right: 5px;
}
.re-entry .pe-delete .pe-icon {
  width: 15px;
  height: 17px;
}
.re-entry .pe-info {
  margin-left: 7px;
  font-size: 15px;
}
.re-entry .pe-row > .pe-amount {
  font-size: 17px;
}
.re-entry .re-capacity {
  font-size: 10px;
  line-height: 15px;
  color: #718299;
}
.re-entry .re-pack {
  justify-content: flex-start;
  font-size: 13px;
}
.re-entry [data-edit] {
  cursor: pointer;
}
.re-entry .pe-stage-row input {
  height: 32px;
  padding: 2px;
  text-align: right;
}
.re-entry .pe-stage-row input:disabled {
  color: #6e7d8b;
  border-color: #b6c9da;
  cursor: not-allowed;
}
.re-entry .re-stage-details {
  min-width: 1580px;
  gap: 22px;
  font-size: 12px;
}
.re-entry .re-stage-details .pe-text {
  width: 65px;
  margin-left: 0;
  color: #607c99;
}
.re-entry .re-stage-details .pe-primary {
  height: 44px;
  width: 90px;
  margin-left: 0;
}
.re-entry .re-empty-fill {
  min-width: 1580px;
  min-height: 250px;
  background:
    linear-gradient(
      to left,
      var(--pe-amount) 125px,
      #fff 125px);
}
.re-entry .pe-footer {
  background:
    linear-gradient(
      to right,
      #e45566,
      #c84956);
  height: 48px;
  gap: 10px;
  flex-wrap: nowrap;
}
.re-entry .pe-footer [data-net] {
  min-width: 200px;
  height: 48px;
  padding: 0 20px 0 10px;
  color: white;
  gap: 16px;
}
.re-entry .pe-footer [data-net] b {
  font-size: 26px;
  margin-left: auto;
}
.re-entry .pe-footer [data-net] small {
  color: #ffffffa8;
}
.re-entry .pe-footer .re-notes {
  padding: 0 20px;
  font-size: 12px;
  flex: 1;
  text-align: left;
}
.re-entry .pe-footer .pe-totals {
  gap: 24px;
}
.re-entry .pe-footer .pe-totals > span {
  font-size: 13px;
}
.re-entry .pe-footer .pe-totals > span b {
  margin-right: 5px;
  font-size: 16px;
}
.re-entry input[aria-invalid=true] {
  border-bottom: 2px solid #d14a55;
  background: #fff1f1;
}
.re-entry .re-new-stage {
  min-width: 1580px;
}
.re-bulk {
  position: fixed;
  z-index: 55;
  width: 285px;
  background: #fff;
  box-shadow: 0 5px 24px #1f416b40;
  border: 1px solid #b9d8f0;
  border-radius: 3px;
  color: #234b74;
  padding: 12px;
}
.re-bulk header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.re-bulk header button {
  border: 0;
  background: transparent;
  color: #6687a7;
  font-size: 23px;
}
.re-bulk > div {
  display: flex;
  gap: 12px;
  align-items: center;
}
.re-bulk input {
  width: 100px !important;
  border-bottom: 1px solid #368ecc;
}
.re-bulk p {
  font-size: 12px;
  margin: 8px 0 0;
  color: #b34950;
}
.re-breakdown-sheet {
  width: 700px !important;
  max-width: calc(100vw - 24px) !important;
}
.re-breakdown-sheet .pe-sheet-body {
  padding: 16px;
}
.re-breakdown-sheet .re-breakdown {
  grid-template-columns: 1fr .9fr;
  gap: 26px;
}
.re-note-tabs {
  display: flex;
  border-bottom: 2px solid #5085b6;
  margin-bottom: 0;
}
.re-note-tabs button {
  flex: 1;
  padding: 9px 3px;
  border: 0;
  background: white;
  color: #9cacbd;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.re-note-tabs button[aria-selected=true] {
  color: #27517f;
}
.re-note-panel {
  display: block;
  position: relative;
  background: #fff9d9;
  height: 160px;
}
.re-note-panel[hidden] {
  display: none;
}
.re-note-panel textarea {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 14px !important;
  width: 100%;
  height: 135px;
  resize: none;
  color: #344d62;
  font:
    14px/22px Manrope,
    Arial,
    sans-serif;
}
.re-note-panel small {
  position: absolute;
  right: 10px;
  bottom: 4px;
  font-size: 11px;
  color: #8396aa;
}
.re-breakdown .pe-mrp-summary {
  margin-top: 12px;
}
.re-note-help {
  display: block;
  color: #7e8e9e;
  font-size: 10px;
  line-height: 15px;
  margin-top: 10px;
}
.re-breakdown .pe-breakdown-values p {
  min-height: 38px;
}
.re-breakdown .pe-breakdown-values .pe-rule {
  border-top: 3px solid #c8d4df;
  margin-top: 8px;
}
.re-breakdown .pe-breakdown-values .pe-breakdown-net {
  border-top: 3px solid #426a97 !important;
}
.re-breakdown .pe-breakdown-net b {
  font-size: 24px;
}
.re-entry .re-grid {
  grid-template-columns: var(--re-compact-cols);
  min-width: 1320px;
}
.re-entry .re-search-row,
.re-entry .re-stage-details,
.re-entry .re-empty-fill,
.re-entry .re-new-stage {
  min-width: 1320px;
}
.re-entry .pe-party-field input[readonly] {
  color: #234b74;
}
.re-entry .re-search-row .sugg {
  width: 850px;
  max-width: calc(100vw - 70px);
}
.re-entry .re-search-row .sugg > div {
  display: grid;
  grid-template-columns: 1fr 140px 90px;
  gap: 12px;
}
.re-entry .pms-stock {
  display: none;
}
.re-entry .re-batch-list [data-batch] {
  min-width: 120px;
  text-align: left;
}

/* Unlinked return, verified in the eVital challan editor: the picker opens
   below the Batch input, not in a separate sheet. It can escape grid scroll. */
.re-unlinked .re-search-row .pe-item-search{width:min(744px,calc(100vw - 68px))}
.re-unlinked .re-batch-cell,.re-unlinked .re-expiry-fields{min-width:0}
.re-unlinked .pe-stage-row :is([data-return-batch],[data-return-expiry],[data-field]){
  min-width:0;border:0;border-bottom:2px solid #044c9d66;border-radius:0;height:36px;
  background:transparent;color:#111;font:500 14px/20px Manrope,Arial,sans-serif;
  box-shadow:none;padding:2px 4px;max-width:100%;
}
.re-unlinked .pe-stage-row :is([data-return-batch],[data-return-expiry],[data-field]):focus{
  border-bottom-color:#044c9d;outline:none;background:#f2f8ff;
}
.re-unlinked .pe-stage-row [data-return-batch]{width:100%;text-align:left}
.re-unlinked .re-expiry-fields{display:flex;align-items:center;gap:3px}
.re-unlinked .re-expiry-fields input{width:min(31px,45%);padding-inline:0!important;text-align:center}
.re-unlinked .re-expiry-fields span{color:#7387a3;font-size:13px}
.re-unlinked .pe-stage-row :is(input,button):disabled{opacity:.58;cursor:not-allowed}
@media(min-width:1280px){
  .re-entry.re-unlinked .pe-top{min-height:66px}
  .re-entry.re-unlinked .re-tools{min-height:30px;padding-bottom:3px}
  .re-entry.re-unlinked .pe-party-strip{padding-block:3px 10px;min-height:68px}
  .re-entry.re-unlinked .re-grid{
    min-width:1190px;
    grid-template-columns:306fr 98fr 107fr 82fr 82fr 66fr 115fr 57fr 57fr 90fr 98fr 66fr 150px;
  }
  .re-entry.re-unlinked .pe-stage-row>div{padding-block:8px 1px}
}
.re-batch-popover[hidden],.re-batch-empty[hidden]{display:none}
.re-batch-popover{
  position:fixed;z-index:100;width:min(750px,calc(100vw - 16px));max-height:min(340px,46dvh);
  overflow:auto;background:#fff;box-shadow:0 3px 7px #0003,0 1px 10px #0002;
  border-radius:0 0 3px 3px;font:500 14px/20px Manrope,Arial,sans-serif;color:#111;
}
.re-batch-columns{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center;text-align:left}
.re-batch-head{
  position:sticky;top:0;z-index:1;height:39px;padding:0 16px;color:#044c9d;background:white;
  font-size:12px;border-bottom:1px solid #d9e1ea;
}
.re-batch-zero{display:flex;align-items:center;gap:7px;min-height:45px;padding:0 16px;margin:0;border-bottom:1px solid #e4e7ed;color:#111}
.re-batch-zero input{height:16px;width:16px;margin:0;accent-color:#0ca1f6}
.re-batch-option{
  width:100%;min-height:41px;border:0;border-bottom:1px solid #e5e9ef;border-radius:0;
  padding:6px 16px;color:#111;background:#fff;font:500 14px/20px Manrope,Arial,sans-serif;cursor:pointer;
}
.re-batch-option span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:7px}
.re-batch-option span:nth-child(3),.re-batch-option span:nth-child(4),.re-batch-option span:last-child{color:#0ca1f6}
.re-batch-option span:nth-child(5){color:#044c9d}
.re-batch-option[aria-selected=true],.re-batch-option:not([aria-disabled=true]):hover{background:#e5f2fc}
.re-batch-option[aria-disabled=true],.re-batch-option[aria-disabled=true] span{color:#687d92;cursor:not-allowed}
.re-batch-empty{padding:10px 16px;margin:0;color:#62768b}
@media(max-width:620px){
  .re-batch-head,.re-batch-option{padding-inline:9px;font-size:11px}
  .re-batch-option{font-size:12px}.re-batch-option span{padding-right:3px}
}
@media (max-width: 1500px) {
  .re-tax-notice {
    display: none;
  }
  .re-entry .pe-actions {
    gap: 12px;
  }
  .re-entry .pe-crumb {
    font-size: 15px;
  }
}
@media (max-width: 1000px) {
  .re-entry .pe-top {
    flex-wrap: wrap;
  }
  .re-entry .pe-actions {
    margin-left: 0;
    flex-wrap: wrap;
  }
  .re-entry .pe-party-strip {
    grid-template-columns: 70px minmax(230px, 1fr) 180px;
    gap: 20px;
  }
  .re-tools {
    flex-wrap: wrap;
  }
  .re-tools .pl-source-status {
    margin-left: 0;
  }
  .re-entry .pe-footer .pe-totals {
    gap: 12px;
  }
  .re-entry .pe-footer .re-notes {
    max-width: 200px;
  }
  .re-entry .pe-footer [data-net] {
    min-width: 150px;
  }
}
@media (max-width: 640px) {
  .re-entry .pe-party-strip {
    grid-template-columns: 65px 1fr;
  }
  .re-entry .pe-party-strip .pe-date {
    grid-column: 2;
  }
  .re-entry .pe-footer {
    overflow-x: auto;
  }
  .re-entry .pe-footer .re-notes {
    display: none;
  }
  .re-entry .pe-footer .pe-totals {
    margin-left: 0;
    padding-left: 12px;
  }
  .re-breakdown-sheet .re-breakdown {
    grid-template-columns: 1fr;
  }
  .re-note-panel {
    height: 130px;
  }
  .re-note-panel textarea {
    height: 105px;
  }
  .re-breakdown-sheet {
    max-height: 90vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .re-entry .pe-order i:after {
    transition: none;
  }
}
