/* =========================================================
   ERP Modern Pass 13 | Consolidated image-review polish
   Scope:
   - all previously shared screenshots (invoice, report filter, auth, modals)
   - fix irrational margins / stacked-card shrinkage
   - sync dropdowns with inputs
   - correct floating labels in RTL/LTR
   - unify save/add/print/delete buttons with theme impression
   - keep checkboxes visible and labels static
   - reduce tab/data gap on invoice screens
   - dock report filter + search sheets in a calmer way
   ========================================================= */

body.erp-modern-v2 {
  --erp-pass13-gap-2xs: .08rem;
  --erp-pass13-gap-xs: .18rem;
  --erp-pass13-gap-sm: .32rem;
  --erp-pass13-gap-md: .5rem;
  --erp-pass13-surface: color-mix(in srgb, var(--erp-surface, #ffffff) 94%, var(--erp-primary, #4f7cff) 6%);
  --erp-pass13-surface-2: color-mix(in srgb, var(--erp-surface, #ffffff) 97%, var(--erp-primary, #4f7cff) 3%);
  --erp-pass13-border: color-mix(in srgb, var(--erp-primary, #4f7cff) 22%, rgba(15, 23, 42, .12));
  --erp-pass13-border-strong: color-mix(in srgb, var(--erp-primary, #4f7cff) 42%, rgba(15, 23, 42, .12));
  --erp-pass13-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  --erp-pass13-shadow-soft: 0 6px 16px rgba(15, 23, 42, .045);
  --erp-pass13-control-h: 40px;
  --erp-pass13-control-radius: 12px;
  --erp-pass13-modal-width: min(1080px, calc(100vw - 30px));
  --erp-pass13-search-sheet-w: min(38vw, 640px);
  --erp-pass13-report-sheet-w: min(430px, calc(100vw - 28px));
}

/* ---------- General spacing cleanup ---------- */
body.erp-modern-v2 .container-fluid,
body.erp-modern-v2 .content > .container-fluid,
body.erp-modern-v2 .content-wrapper .container-fluid {
  padding-inline: clamp(.35rem, 1vw, .8rem) !important;
}

body.erp-modern-v2 .card-body > .row,
body.erp-modern-v2 .card-header > .row,
body.erp-modern-v2 .tab-pane > .row,
body.erp-modern-v2 .modal-body > .row,
body.erp-modern-v2 .input-group > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.erp-modern-v2 .modal-content {
  overflow: hidden !important;
}

body.erp-modern-v2 .modal-dialog.modal-lg,
body.erp-modern-v2 .modal-dialog.modal-xl,
body.erp-modern-v2 .modal-dialog.erp-modal-lg {
  max-width: var(--erp-pass13-modal-width) !important;
}

body.erp-modern-v2 .modal-header,
body.erp-modern-v2 .modal-footer {
  padding-inline: 0 !important;
}

body.erp-modern-v2 .modal-body {
  padding: .55rem .7rem .7rem !important;
  overflow-x: hidden !important;
}

body.erp-modern-v2 .modal-body [class*='col-'] {
  padding-inline: .18rem !important;
}

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

/* ---------- Unified control shell ---------- */
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,
body.erp-modern-v2 .l-wrapper1,
body.erp-modern-v2 .input-group {
  position: relative !important;
  min-height: var(--erp-pass13-control-h) !important;
  border-radius: var(--erp-pass13-control-radius) !important;
  border: 1px solid var(--erp-pass13-border) !important;
  background: var(--erp-pass13-surface) !important;
  box-shadow: none !important;
}

body.erp-modern-v2 .erp-field-shell:hover,
body.erp-modern-v2 .invoice-box:hover,
body.erp-modern-v2 .form-control-wrapper:hover,
body.erp-modern-v2 .form-control-wrapper_grope:hover,
body.erp-modern-v2 .l-wrapper1:hover,
body.erp-modern-v2 .input-group:hover {
  border-color: var(--erp-pass13-border-strong) !important;
  box-shadow: var(--erp-pass13-shadow-soft) !important;
}

body.erp-modern-v2 .erp-field-shell:focus-within,
body.erp-modern-v2 .invoice-box:focus-within,
body.erp-modern-v2 .form-control-wrapper:focus-within,
body.erp-modern-v2 .form-control-wrapper_grope:focus-within,
body.erp-modern-v2 .l-wrapper1:focus-within,
body.erp-modern-v2 .input-group:focus-within {
  border-color: var(--erp-pass13-border-strong) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--erp-primary, #4f7cff) 14%, transparent) !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 .l-wrapper1 .form-control,
body.erp-modern-v2 .input-group .form-control,
body.erp-modern-v2 select.form-control,
body.erp-modern-v2 input.form-control:not([type='checkbox']):not([type='radio']) {
  min-height: var(--erp-pass13-control-h) !important;
  height: var(--erp-pass13-control-h) !important;
  padding-top: .92rem !important;
  padding-bottom: .18rem !important;
  padding-inline-start: .72rem !important;
  padding-inline-end: .72rem !important;
  border: 0 !important;
  border-radius: calc(var(--erp-pass13-control-radius) - 1px) !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 1.15 !important;
  font-size: .92rem !important;
  font-weight: 800 !important;
}

body.erp-modern-v2 textarea.form-control,
body.erp-modern-v2 .erp-field-shell > textarea,
body.erp-modern-v2 .invoice-box > textarea {
  min-height: 86px !important;
  height: auto !important;
}

/* ---------- Dropdown / Select2 parity ---------- */
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,
body.erp-modern-v2 .select2,
body.erp-modern-v2 .select2-selection {
  width: 100% !important;
  min-width: 0 !important;
}

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,
body.erp-modern-v2 .select2-results__option {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !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-pass13-control-h) !important;
  height: var(--erp-pass13-control-h) !important;
  display: flex !important;
  align-items: center !important;
  border: 0 !important;
  border-radius: calc(var(--erp-pass13-control-radius) - 1px) !important;
  background: transparent !important;
  box-shadow: none !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: calc(var(--erp-pass13-control-h) - 2px) !important;
  line-height: 1.12 !important;
  padding-top: .92rem !important;
  padding-bottom: .18rem !important;
  padding-inline-start: .72rem !important;
  padding-inline-end: 1.9rem !important;
  display: block !important;
}

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

body.erp-modern-v2 .select2-container--default .select2-dropdown,
body.erp-modern-v2 .select2-dropdown {
  border: 1px solid var(--erp-pass13-border) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .12) !important;
}

/* ---------- Floating labels ---------- */
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,
body.erp-modern-v2 .form-label_print {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  top: .3rem !important;
  max-width: calc(100% - 1.2rem) !important;
  font-size: .62rem !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  color: color-mix(in srgb, var(--erp-text, #162033) 66%, transparent) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.erp-modern-v2 .form-label::before,
body.erp-modern-v2 .form-label::after,
body.erp-modern-v2 .form-label_print::before,
body.erp-modern-v2 .form-label_print::after {
  display: none !important;
  content: none !important;
}

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

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

body.erp-modern-v2 .erp-field-shell--with-arrows > input:not([type='hidden']):not([type='checkbox']):not([type='radio']),
body.erp-modern-v2 .erp-field-shell--with-arrows > select,
body.erp-modern-v2 .erp-field-shell--with-arrows > textarea,
body.erp-modern-v2 .invoice-box.erp-field-shell--with-arrows > input:not([type='hidden']):not([type='checkbox']):not([type='radio']),
body.erp-modern-v2 .invoice-box.erp-field-shell--with-arrows > select,
body.erp-modern-v2 .invoice-box.erp-field-shell--with-arrows > textarea {
  padding-inline-start: 1.65rem !important;
  padding-inline-end: 1.65rem !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 {
  right: 1.62rem !important;
  left: auto !important;
  inset-inline-end: 1.62rem !important;
  inset-inline-start: auto !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 {
  left: 1.62rem !important;
  right: auto !important;
  inset-inline-start: 1.62rem !important;
  inset-inline-end: auto !important;
}

/* ---------- Checkbox / radio visibility ---------- */
body.erp-modern-v2 input[type='checkbox'],
body.erp-modern-v2 input[type='radio'],
body.erp-modern-v2 .custom-control-input {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  clip: auto !important;
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  accent-color: var(--erp-primary, #1677ff) !important;
}

body.erp-modern-v2 .custom-control,
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: .45rem !important;
  padding: 0 !important;
  min-height: 18px !important;
  background: transparent !important;
}

body.erp-modern-v2 .custom-control-label,
body.erp-modern-v2 .form-check-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;
}

body.erp-modern-v2 input[type='checkbox'] + .form-label,
body.erp-modern-v2 input[type='radio'] + .form-label,
body.erp-modern-v2 input[type='checkbox'] + .form-label_print,
body.erp-modern-v2 input[type='radio'] + .form-label_print {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  max-width: none !important;
  margin-inline-start: .45rem !important;
  background: transparent !important;
  font-size: .92rem !important;
  line-height: 1.3 !important;
}

/* ---------- Buttons ---------- */
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 [id='oprFilter_Refresh_data'],
body.erp-modern-v2 [id='oprFilter_btnPrint'],
body.erp-modern-v2 [id='oprFilter_btnPrintPos'],
body.erp-modern-v2 [id='oprFilter_btnSyana'],
body.erp-modern-v2 #OprItems_AddEditModel,
body.erp-modern-v2 #OprAccounts_AddEditModel,
body.erp-modern-v2 .filter-btn,
body.erp-modern-v2 .filter-btn_center,
body.erp-modern-v2 .filter-btn_center_print,
body.erp-modern-v2 .filter-btn_center_InvoiceEdafat {
  min-height: 42px !important;
  height: 42px !important;
  padding-inline: 16px !important;
  border-radius: 14px !important;
  font-size: .92rem !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

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 .erp-icon-btn--compact {
  min-width: 42px !important;
  width: 42px !important;
  padding-inline: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.erp-modern-v2 .btn i,
body.erp-modern-v2 .btn .fa,
body.erp-modern-v2 .btn .fas,
body.erp-modern-v2 .btn .far,
body.erp-modern-v2 .btn .fab,
body.erp-modern-v2 .btn .material-icons {
  font-size: .92rem !important;
}

body.erp-modern-v2 .btn-success {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--erp-accent, #22c55e) 84%, white 16%),
    color-mix(in srgb, var(--erp-accent, #22c55e) 64%, var(--erp-primary, #4f7cff) 36%)) !important;
  border-color: transparent !important;
}

body.erp-modern-v2 .btn-info,
body.erp-modern-v2 .btn-primary {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--erp-primary, #4f7cff) 88%, white 12%),
    color-mix(in srgb, var(--erp-primary, #4f7cff) 62%, var(--erp-accent, #22c55e) 38%)) !important;
  border-color: transparent !important;
}

body.erp-modern-v2 .btn-danger {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--erp-danger, #ef4444) 86%, white 14%),
    color-mix(in srgb, var(--erp-danger, #ef4444) 70%, var(--erp-primary, #4f7cff) 30%)) !important;
  border-color: transparent !important;
}

body.erp-modern-v2 .btn:disabled,
body.erp-modern-v2 .btn.disabled {
  opacity: .48 !important;
  filter: grayscale(.08) !important;
}

/* ---------- Invoice screen ---------- */
body.erp-modern-v2.erp-screen-invoice .erp-opr-panel,
body.erp-modern-v2.erp-screen-invoice .erp-opr-content,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout,
body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card,
body.erp-modern-v2.erp-screen-invoice .erp-opr-detail-region,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell {
  margin: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-panel > .row,
body.erp-modern-v2.erp-screen-invoice .erp-opr-panel > .row > [class*='col-'],
body.erp-modern-v2.erp-screen-invoice .erp-opr-content > .card,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout > .card-body,
body.erp-modern-v2.erp-screen-invoice #divOpr > .row,
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: 0 !important;
  margin: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .card.card-primary.card-outline.card-tabs.erp-opr-layout {
  border-radius: 22px !important;
  overflow: hidden !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-layout > .card-header {
  padding: .22rem .38rem .08rem !important;
  border-bottom: 0 !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: 0 !important;
}

body.erp-modern-v2.erp-screen-invoice .tab-content,
body.erp-modern-v2.erp-screen-invoice .tab-content > .active,
body.erp-modern-v2.erp-screen-invoice .tab-content > .tab-pane.active,
body.erp-modern-v2.erp-screen-invoice .erp-opr-layout__tabs {
  margin-top: 0 !important;
  padding-top: 0 !important;
  gap: .12rem !important;
}

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

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

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card {
  border-radius: 16px !important;
  border: 1px solid color-mix(in srgb, var(--erp-primary, #4f7cff) 12%, rgba(15, 23, 42, .08)) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .03) !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,
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 {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-primary-card .row,
body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell .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-shell [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-shell .form-group,
body.erp-modern-v2.erp-screen-invoice .erp-opr-detail-region .form-group {
  margin-bottom: .08rem !important;
}

body.erp-modern-v2.erp-screen-invoice .arrow-area {
  width: 26px !important;
  min-width: 26px !important;
  height: auto !important;
  border-radius: 10px !important;
  color: color-mix(in srgb, var(--erp-text, #162033) 72%, transparent) !important;
}

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

body.erp-modern-v2.erp-screen-invoice .erp-entry-table-wrap,
body.erp-modern-v2.erp-screen-invoice #divAddOprDetail > .table-responsive {
  border-radius: 14px !important;
  border: 1px solid color-mix(in srgb, var(--erp-primary, #4f7cff) 14%, rgba(15, 23, 42, .08)) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.96)) !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: .73rem !important;
  font-weight: 900 !important;
  white-space: nowrap !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 #tblOprDetail2020 tbody td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return tbody td,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail tbody td,
body.erp-modern-v2.erp-screen-invoice #OprAccounts_tblOprDetail tbody td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail tfoot td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail2020 tfoot td,
body.erp-modern-v2.erp-screen-invoice #tblOprDetail_return tfoot td,
body.erp-modern-v2.erp-screen-invoice #Entag_tblOprDetail tfoot td,
body.erp-modern-v2.erp-screen-invoice #OprAccounts_tblOprDetail tfoot td {
  padding: .22rem .24rem !important;
}

body.erp-modern-v2.erp-screen-invoice .erp-opr-totals-shell {
  padding: .2rem .28rem .14rem !important;
  border-radius: 16px !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;
}

/* ---------- Search sheets / side modals ---------- */
body.erp-modern-v2 .erp-search-modal.sidebar_search,
body.erp-modern-v2 [id$='BigModal_Search_items'],
body.erp-modern-v2 [id$='BigModal_Search_items_return'] {
  width: var(--erp-pass13-search-sheet-w) !important;
  max-width: var(--erp-pass13-search-sheet-w) !important;
}

html[dir='rtl'] body.erp-modern-v2 .erp-search-modal.sidebar_search,
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 .erp-search-modal.sidebar_search,
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 .erp-search-modal .modal-dialog,
body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-dialog,
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-dialog {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100% !important;
}

body.erp-modern-v2 .erp-search-modal .modal-content,
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;
  border-radius: 0 !important;
}

body.erp-modern-v2 .erp-search-modal .modal-header,
body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-header,
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-header {
  padding: .75rem .8rem !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: .65rem !important;
  align-items: start !important;
}

body.erp-modern-v2 .erp-search-modal .modal-header .row,
body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-header .row,
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-header .row {
  margin: 0 !important;
}

body.erp-modern-v2 .erp-search-modal .modal-header [class*='col-'],
body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-header [class*='col-'],
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-header [class*='col-'] {
  padding-inline: .16rem !important;
}

body.erp-modern-v2 .erp-search-modal .modal-title,
body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-title,
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-title {
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  margin: 0 !important;
}

body.erp-modern-v2 .erp-search-modal .modal-body,
body.erp-modern-v2 [id$='BigModal_Search_items'] .modal-body,
body.erp-modern-v2 [id$='BigModal_Search_items_return'] .modal-body {
  padding: 0 !important;
  overflow: auto !important;
}

/* ---------- Report filter panel ---------- */
body.erp-modern-v2 .filter-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, .32) !important;
  backdrop-filter: blur(3px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity .22s ease, visibility .22s ease !important;
  z-index: 1046 !important;
}

body.erp-modern-v2 .filter-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
}

body.erp-modern-v2 .erp-filter-panel {
  position: fixed !important;
  top: 86px !important;
  bottom: 14px !important;
  width: var(--erp-pass13-report-sheet-w) !important;
  max-height: none !important;
  z-index: 1047 !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 24px !important;
  box-shadow: 0 26px 56px rgba(15, 23, 42, .18) !important;
  transform: translateX(110%) !important;
  opacity: 0 !important;
  transition: transform .22s ease, opacity .22s ease !important;
}

html[dir='rtl'] body.erp-modern-v2 .erp-filter-panel {
  left: 14px !important;
  right: auto !important;
  transform: translateX(-110%) !important;
}

html[dir='ltr'] body.erp-modern-v2 .erp-filter-panel {
  right: 14px !important;
  left: auto !important;
  transform: translateX(110%) !important;
}

body.erp-modern-v2 .erp-filter-panel.open {
  transform: translateX(0) !important;
  opacity: 1 !important;
}

body.erp-modern-v2 .erp-filter-panel__header {
  min-height: 56px !important;
}

body.erp-modern-v2 .erp-filter-panel .filter-body {
  padding: 12px 12px 10px !important;
  overflow: auto !important;
}

body.erp-modern-v2 .erp-filter-panel .filter-footer {
  padding: 10px 12px 12px !important;
}

/* ---------- Auth screens ---------- */
body.erp-modern-v2.blank-login-body .hero.erp-auth-layout {
  gap: clamp(16px, 1.7vw, 24px) !important;
}

body.erp-modern-v2.blank-login-body .erp-auth-main-box {
  max-width: 460px !important;
  min-height: auto !important;
}

body.erp-modern-v2.blank-login-body .erp-auth-main-box .form-box {
  gap: .72rem !important;
}

body.erp-modern-v2.blank-login-body .logo-box_main,
body.erp-modern-v2.blank-login-body .logo-box_old,
body.erp-modern-v2.blank-login-body .logo-frame,
body.erp-modern-v2.blank-login-body .erp-auth-header,
body.erp-modern-v2.blank-login-body .sp,
body.erp-modern-v2.blank-login-body .sp-t,
body.erp-modern-v2.blank-login-body .sp-r,
body.erp-modern-v2.blank-login-body .sp-b,
body.erp-modern-v2.blank-login-body .sp-l,
body.erp-modern-v2.config-login-body .sp,
body.erp-modern-v2.config-login-body .sp-t,
body.erp-modern-v2.config-login-body .sp-r,
body.erp-modern-v2.config-login-body .sp-b,
body.erp-modern-v2.config-login-body .sp-l {
  display: none !important;
}

body.erp-modern-v2.blank-login-body .erp-auth-panel,
body.erp-modern-v2.config-login-body #auth-form1,
body.erp-modern-v2.config-login-body #auth-form11 {
  margin: 0 !important;
}

body.erp-modern-v2.blank-login-body .erp-auth-panel .form-group,
body.erp-modern-v2.blank-login-body .erp-auth-panel .form-group111,
body.erp-modern-v2.config-login-body .form-group,
body.erp-modern-v2.config-login-body .form-group111 {
  margin-bottom: .16rem !important;
}

body.erp-modern-v2.blank-login-body .erp-auth-actions .btn,
body.erp-modern-v2.blank-login-body .erp-auth-action-row .btn,
body.erp-modern-v2.config-login-body .btn {
  min-height: 42px !important;
  border-radius: 14px !important;
}

/* ---------- Responsiveness ---------- */
@media (max-width: 1199.98px) {
  body.erp-modern-v2 {
    --erp-pass13-search-sheet-w: min(54vw, 700px);
  }
}

@media (max-width: 1024px) {
  body.erp-modern-v2 {
    --erp-pass13-search-sheet-w: min(84vw, 720px);
    --erp-pass13-report-sheet-w: min(92vw, calc(100vw - 18px));
  }

  body.erp-modern-v2 .erp-filter-panel {
    top: 76px !important;
    bottom: 10px !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;
  }
}

@media (max-width: 575.98px) {
  body.erp-modern-v2 .erp-filter-panel {
    width: calc(100vw - 18px) !important;
  }
}
