/* =========================================================
   ERP Modern Pass 12 | Invoice image-based UX refinements
   Goals:
   - fix illogical margins / padding on invoice screens
   - flatten stacked general cards that shrink the usable area
   - align dropdowns with inputs and prevent wrapping
   - enforce correct RTL/LTR floating label placement
   - unify primary action buttons
   - make checkboxes visible and predictable
   - reduce the gap between tabs and invoice data
   - remove label background strip inside inputs
   - dock item search side sheet to the left in RTL for easier follow-up
   ========================================================= */

body.erp-modern-v2 {
  --erp-pass12-gap-xxs: .12rem;
  --erp-pass12-gap-xs: .24rem;
  --erp-pass12-gap-sm: .38rem;
  --erp-pass12-action-min: 132px;
  --erp-pass12-sheet-w: min(42vw, 720px);
  --erp-pass12-field-radius: 12px;
}

/* Tighten legacy negative rows that still create useless overflow */
body.erp-modern-v2 .card-body .row,
body.erp-modern-v2 .card-header .row,
body.erp-modern-v2 .modal-body .row,
body.erp-modern-v2 .tab-pane .row,
body.erp-modern-v2 #auth-form1 > .row,
body.erp-modern-v2 #auth-form11 > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Make all field shells behave as a single compact control surface */
body.erp-modern-v2 .erp-field-shell,
body.erp-modern-v2 .invoice-box,
body.erp-modern-v2 .form-control-wrapper,
body.erp-modern-v2 .form-control-wrapper_grope {
  display: flex !important;
  align-items: stretch !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  overflow: visible !important;
}

body.erp-modern-v2 .erp-field-shell > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.erp-modern-v2 .erp-field-shell > select,
body.erp-modern-v2 .erp-field-shell > textarea,
body.erp-modern-v2 .invoice-box > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.erp-modern-v2 .invoice-box > select,
body.erp-modern-v2 .invoice-box > textarea,
body.erp-modern-v2 .erp-field-shell .form-control,
body.erp-modern-v2 .invoice-box .form-control,
body.erp-modern-v2 .form-control-wrapper .form-control,
body.erp-modern-v2 .form-control-wrapper_grope .form-control,
body.erp-modern-v2 .erp-field-shell .select2,
body.erp-modern-v2 .invoice-box .select2,
body.erp-modern-v2 .erp-field-shell .select2-container,
body.erp-modern-v2 .invoice-box .select2-container {
  flex: 1 1 auto;
  min-width: 0 !important;
}

/* Keep selects visually identical to inputs and never let the text drop to a new line */
body.erp-modern-v2 .erp-field-shell > select,
body.erp-modern-v2 .invoice-box > select,
body.erp-modern-v2 select.form-control,
body.erp-modern-v2 .select2-container--default .select2-selection--single .select2-selection__rendered,
body.erp-modern-v2 .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.erp-modern-v2 .erp-field-shell > select,
body.erp-modern-v2 .invoice-box > select,
body.erp-modern-v2 select.form-control {
  display: block !important;
  width: 100% !important;
  line-height: 1.2 !important;
}

body.erp-modern-v2 .select2-container,
body.erp-modern-v2 .select2,
body.erp-modern-v2 .select2-selection {
  width: 100% !important;
  min-width: 0 !important;
}

body.erp-modern-v2 .select2-container--default .select2-selection--single,
body.erp-modern-v2 .select2-container--default .select2-selection--multiple {
  min-height: var(--erp-form-control-h, 40px) !important;
  height: auto !important;
  border-radius: var(--erp-pass12-field-radius) !important;
}

body.erp-modern-v2 .select2-container--default .select2-selection--single .select2-selection__rendered,
body.erp-modern-v2 .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  min-height: var(--erp-form-control-h, 40px) !important;
  line-height: 1.2 !important;
  padding-top: .9rem !important;
  padding-bottom: .18rem !important;
  padding-inline-start: .72rem !important;
  padding-inline-end: 1.9rem !important;
}

body.erp-modern-v2 .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
}

/* Floating label cleanup: remove the white strip and force correct RTL/LTR placement */
body.erp-modern-v2 .form-label,
body.erp-modern-v2 .erp-field-shell .form-label,
body.erp-modern-v2 .invoice-box .form-label,
body.erp-modern-v2 .form-control-wrapper .form-label,
body.erp-modern-v2 .form-control-wrapper_grope .form-label {
  background: transparent !important;
  box-shadow: none !important;
  padding-inline: 0 !important;
  max-width: calc(100% - 1.2rem) !important;
}

html[dir='rtl'] body.erp-modern-v2 .form-label,
html[dir='rtl'] body.erp-modern-v2 .erp-field-shell .form-label,
html[dir='rtl'] body.erp-modern-v2 .invoice-box .form-label,
html[dir='rtl'] body.erp-modern-v2 .form-control-wrapper .form-label,
html[dir='rtl'] body.erp-modern-v2 .form-control-wrapper_grope .form-label {
  left: auto !important;
  right: .72rem !important;
  inset-inline-start: auto !important;
  inset-inline-end: .72rem !important;
  text-align: right !important;
}

html[dir='rtl'] body.erp-modern-v2 .erp-field-shell--with-arrows .form-label,
html[dir='rtl'] body.erp-modern-v2 .invoice-box.erp-field-shell--with-arrows .form-label {
  left: auto !important;
  right: 1.62rem !important;
  inset-inline-start: auto !important;
  inset-inline-end: 1.62rem !important;
  max-width: calc(100% - 3.1rem) !important;
}

html[dir='ltr'] body.erp-modern-v2 .form-label,
html[dir='ltr'] body.erp-modern-v2 .erp-field-shell .form-label,
html[dir='ltr'] body.erp-modern-v2 .invoice-box .form-label,
html[dir='ltr'] body.erp-modern-v2 .form-control-wrapper .form-label,
html[dir='ltr'] body.erp-modern-v2 .form-control-wrapper_grope .form-label {
  right: auto !important;
  left: .72rem !important;
  inset-inline-start: .72rem !important;
  inset-inline-end: auto !important;
  text-align: left !important;
}

html[dir='ltr'] body.erp-modern-v2 .erp-field-shell--with-arrows .form-label,
html[dir='ltr'] body.erp-modern-v2 .invoice-box.erp-field-shell--with-arrows .form-label {
  right: auto !important;
  left: 1.62rem !important;
  inset-inline-start: 1.62rem !important;
  inset-inline-end: auto !important;
  max-width: calc(100% - 3.1rem) !important;
}

body.erp-modern-v2.blank-login-body .form-label,
body.erp-modern-v2.config-login-body .form-label {
  background: transparent !important;
}

/* Make native and bootstrap checkboxes visible and predictable */
body.erp-modern-v2 input.form-control[type="checkbox"],
body.erp-modern-v2 input.form-control[type="radio"] {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-block !important;
}

body.erp-modern-v2 .custom-control {
  display: inline-flex !important;
  align-items: center !important;
  gap: .42rem !important;
  min-height: 18px !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

body.erp-modern-v2 .custom-control-input {
  position: static !important;
  opacity: 1 !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  clip: auto !important;
  z-index: auto !important;
}

body.erp-modern-v2 .custom-control-label {
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.erp-modern-v2 .custom-control-label::before,
body.erp-modern-v2 .custom-control-label::after {
  display: none !important;
}

/* Primary invoice screen declutter */
body.erp-modern-v2.erp-screen-invoice .erp-page-shell {
  gap: .26rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-layout > .card-header {
  padding: .18rem .34rem .08rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-layout > .card-body,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout__body {
  padding: .1rem .34rem .22rem !important;
}

body.erp-modern-v2.erp-screen-invoice #tabContent,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout__tabs {
  gap: .16rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-layout .nav-tabs {
  margin-bottom: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-layout .nav-tabs .nav-link {
  min-height: 34px !important;
  padding: .34rem .68rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card {
  margin-bottom: .14rem !important;
  border-radius: 16px !important;
  border-color: rgba(148, 163, 184, .14) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .035) !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card > .card-header {
  padding: .16rem .3rem !important;
  background: transparent !important;
  border-bottom: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card > .card-body {
  padding: .26rem .32rem !important;
}

/* Remove stacked card noise inside invoice shells */
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .card,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .card-body .card,
body.erp-modern-v2.erp-screen-invoice .erp-opr-detail-region > .card,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell .card {
  margin: 0 0 .08rem !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .card-header,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .card-body,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .card-footer {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .row,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .row {
  row-gap: .08rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card [class*="col-"],
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row [class*="col-"] {
  padding-inline: 1px !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .form-group,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .form-group {
  margin-bottom: .08rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .erp-field-shell,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .invoice-box {
  border-radius: var(--erp-pass12-field-radius) !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell > select,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell > textarea,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell .form-control,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box > select,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box > textarea,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box .form-control,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .erp-field-shell > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .erp-field-shell > select,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .erp-field-shell > textarea,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .erp-field-shell .form-control {
  min-height: 36px !important;
  padding-top: .82rem !important;
  padding-bottom: .16rem !important;
  padding-inline-start: .62rem !important;
  padding-inline-end: .62rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell--with-arrows > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell--with-arrows > select,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .erp-field-shell--with-arrows > textarea,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box.erp-field-shell--with-arrows > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box.erp-field-shell--with-arrows > select,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .invoice-box.erp-field-shell--with-arrows > textarea {
  padding-inline-start: 1.62rem !important;
  padding-inline-end: 1.62rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .form-label,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row .form-label {
  top: .26rem !important;
  font-size: .58rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-detail-region,
body.erp-modern-v2.erp-screen-invoice #divAddOprDetail {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-detail-shell,
body.erp-modern-v2.erp-screen-invoice #divAddOprDetail > .table-responsive {
  margin-bottom: .1rem !important;
  border-radius: 14px !important;
}

body.erp-modern-v2.erp-screen-invoice table.erp-entry-table thead th,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail thead th,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail2020 thead th,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return thead th,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail thead th,
body.erp-modern-v2.erp-screen-invoice #OprAccounts_tblOprDetail thead th {
  padding: .42rem .28rem !important;
  font-size: .74rem !important;
}

body.erp-modern-v2.erp-screen-invoice table.erp-entry-table tbody td,
body.erp-modern-v2.erp-screen-invoice table.erp-entry-table tfoot td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail tbody td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail tfoot td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail2020 tbody td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail2020 tfoot td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return tbody td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return tfoot td,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail tbody td,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail tfoot td,
body.erp-modern-v2.erp-screen-invoice #OprAccounts_tblOprDetail tbody td,
body.erp-modern-v2.erp-screen-invoice #OprAccounts_tblOprDetail tfoot td {
  padding: .22rem .26rem !important;
}

body.erp-modern-v2.erp-screen-invoice #tblOprDetail .pos-cell,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail2020 .pos-cell,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return .pos-cell,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail .pos-cell,
body.erp-modern-v2.erp-screen-invoice #OprAccounts_tblOprDetail .pos-cell,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail tfoot .form-control,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail2020 tfoot .form-control,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return tfoot .form-control,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail tfoot .form-control,
body.erp-modern-v2.erp-screen-invoice #OprAccounts_tblOprDetail tfoot .form-control {
  min-height: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
}

body.erp-modern-v2.erp-screen-invoice #tblOprDetail .dynamic-cell_name,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail2020 .dynamic-cell_name,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return .dynamic-cell_name,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail .dynamic-cell_name {
  min-width: 210px !important;
  width: 210px !important;
  max-width: 340px !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-row {
  padding-top: .08rem !important;
  margin-top: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell {
  padding: .3rem .36rem .18rem !important;
  border-radius: 16px !important;
}

/* Normalize action buttons and keep them on one visual system */
body.erp-modern-v2 [id='btnSave'],
body.erp-modern-v2 [id='btnUpdate'],
body.erp-modern-v2 [id='btnNew'],
body.erp-modern-v2 [id='btnDelete'],
body.erp-modern-v2 [id='btnNew_Return'],
body.erp-modern-v2 [id='btnPrint'],
body.erp-modern-v2 [id='btnPrintPos'],
body.erp-modern-v2 [id='btnPrint_exel'],
body.erp-modern-v2 [id='btnPrint_wathsapp'],
body.erp-modern-v2 #OprItems_AddEditModel,
body.erp-modern-v2 #OprAccounts_AddEditModel,
body.erp-modern-v2 .filter-btn_center_InvoiceEdafat {
  min-width: var(--erp-pass12-action-min) !important;
  min-height: 40px !important;
  height: 40px !important;
  padding-inline: 16px !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
}

body.erp-modern-v2 [id='btnPrint_wathsapp'],
body.erp-modern-v2 [id='btnPrint_exel'],
body.erp-modern-v2 #OprItems_AddEditModel,
body.erp-modern-v2 #OprAccounts_AddEditModel {
  min-width: 42px !important;
  width: auto !important;
  padding-inline: 12px !important;
}

body.erp-modern-v2 [id='btnSave'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnUpdate'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnNew'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnDelete'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnNew_Return'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnPrint'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnPrintPos'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnPrint_exel'].erp-icon-btn--compact,
body.erp-modern-v2 [id='btnPrint_wathsapp'].erp-icon-btn--compact {
  width: auto !important;
  min-width: var(--erp-pass12-action-min) !important;
  height: 40px !important;
  padding-inline: 16px !important;
  border-radius: 14px !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell .row.text-center > .col-sm-12,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell .row.text-center > .col-lg-12,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell .align-content-center {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: .42rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell .btn,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell button {
  flex: 0 0 auto !important;
}

/* Dock the items side sheet to the left in RTL so invoice names stay readable */
body.erp-modern-v2 #BigModal_Search_items.sidebar_search,
body.erp-modern-v2 #BigModal_Search_items_return.sidebar_search,
body.erp-modern-v2 #OprAccounts_BigModal_Search_items {
  width: var(--erp-pass12-sheet-w) !important;
  max-width: var(--erp-pass12-sheet-w) !important;
}

html[dir='rtl'] body.erp-modern-v2 #BigModal_Search_items.sidebar_search,
html[dir='rtl'] body.erp-modern-v2 #BigModal_Search_items_return.sidebar_search,
html[dir='rtl'] body.erp-modern-v2 #OprAccounts_BigModal_Search_items {
  left: 0 !important;
  right: auto !important;
}

body.erp-modern-v2 #BigModal_Search_items .modal-dialog,
body.erp-modern-v2 #BigModal_Search_items_return .modal-dialog,
body.erp-modern-v2 #OprAccounts_BigModal_Search_items .modal-dialog {
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  min-height: 100% !important;
}

body.erp-modern-v2 #BigModal_Search_items .modal-content,
body.erp-modern-v2 #BigModal_Search_items_return .modal-content,
body.erp-modern-v2 #OprAccounts_BigModal_Search_items .modal-content {
  min-height: 100vh !important;
}

html[dir='rtl'] body.erp-modern-v2 #BigModal_Search_items .modal-content,
html[dir='rtl'] body.erp-modern-v2 #BigModal_Search_items_return .modal-content,
html[dir='rtl'] body.erp-modern-v2 #OprAccounts_BigModal_Search_items .modal-content {
  border-radius: 0 18px 18px 0 !important;
}

html[dir='ltr'] body.erp-modern-v2 #BigModal_Search_items .modal-content,
html[dir='ltr'] body.erp-modern-v2 #BigModal_Search_items_return .modal-content,
html[dir='ltr'] body.erp-modern-v2 #OprAccounts_BigModal_Search_items .modal-content {
  border-radius: 18px 0 0 18px !important;
}

/* Keep modal form surfaces compact and aligned */
body.erp-modern-v2 .modal-body {
  overflow-x: hidden !important;
}

body.erp-modern-v2 .modal-body .form-group,
body.erp-modern-v2 .modal-body .form-group111 {
  margin-bottom: .16rem !important;
}

@media (max-width: 1199.98px) {
  body.erp-modern-v2 #BigModal_Search_items.sidebar_search,
  body.erp-modern-v2 #BigModal_Search_items_return.sidebar_search,
  body.erp-modern-v2 #OprAccounts_BigModal_Search_items {
    width: min(56vw, 760px) !important;
    max-width: min(56vw, 760px) !important;
  }
}

@media (max-width: 1024px) {
  body.erp-modern-v2 #BigModal_Search_items.sidebar_search,
  body.erp-modern-v2 #BigModal_Search_items_return.sidebar_search,
  body.erp-modern-v2 #OprAccounts_BigModal_Search_items {
    width: min(86vw, 700px) !important;
    max-width: min(86vw, 700px) !important;
  }

  body.erp-modern-v2 [id='btnSave'],
  body.erp-modern-v2 [id='btnUpdate'],
  body.erp-modern-v2 [id='btnNew'],
  body.erp-modern-v2 [id='btnDelete'],
  body.erp-modern-v2 [id='btnNew_Return'],
  body.erp-modern-v2 [id='btnPrint'],
  body.erp-modern-v2 [id='btnPrintPos'] {
    min-width: 116px !important;
  }
}


/* Pass 12 hardening: generic search sheets, active tabs, and tighter legacy wrappers */
body.erp-modern-v2 .tab-content > .active,
body.erp-modern-v2 .tab-content > .tab-pane.active {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .card.card-primary.card-outline.card-tabs.erp-opr-layout {
  margin-bottom: .12rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-layout > .card-header,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout > .card-body,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout .card-body > .row,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout .card-body > .container-fluid {
  margin-bottom: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-layout .container-fluid,
body.erp-modern-v2.erp-screen-invoice #divOpr > .container-fluid,
body.erp-modern-v2.erp-screen-invoice #divOtherInfo > .container-fluid,
body.erp-modern-v2.erp-screen-invoice #divOpr_print > .container-fluid {
  padding-inline: .12rem !important;
}

body.erp-modern-v2 [id$='BigModal_Search_items'],
body.erp-modern-v2 [id$='BigModal_Search_items_return'] {
  width: var(--erp-pass12-sheet-w) !important;
  max-width: var(--erp-pass12-sheet-w) !important;
}

html[dir='rtl'] body.erp-modern-v2 [id$='BigModal_Search_items'],
html[dir='rtl'] body.erp-modern-v2 [id$='BigModal_Search_items_return'] {
  left: 0 !important;
  right: auto !important;
}

html[dir='ltr'] body.erp-modern-v2 [id$='BigModal_Search_items'],
html[dir='ltr'] body.erp-modern-v2 [id$='BigModal_Search_items_return'] {
  right: 0 !important;
  left: auto !important;
}

body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-dialog,
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-dialog {
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  min-height: 100% !important;
}

body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-content,
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-content {
  min-height: 100vh !important;
}

body.erp-modern-v2 .checkbox,
body.erp-modern-v2 .checkbox-inline,
body.erp-modern-v2 .form-check,
body.erp-modern-v2 .custom-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: .42rem !important;
}

body.erp-modern-v2 input[type='checkbox'],
body.erp-modern-v2 input[type='radio'] {
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 1199.98px) {
  body.erp-modern-v2 [id$='BigModal_Search_items'],
  body.erp-modern-v2 [id$='BigModal_Search_items_return'] {
    width: min(56vw, 760px) !important;
    max-width: min(56vw, 760px) !important;
  }
}

@media (max-width: 1024px) {
  body.erp-modern-v2 [id$='BigModal_Search_items'],
  body.erp-modern-v2 [id$='BigModal_Search_items_return'] {
    width: min(86vw, 700px) !important;
    max-width: min(86vw, 700px) !important;
  }
}
