/* Shared visual language for the authenticated ERP. Keep module-specific
   layouts focused on their workflows and centralize common page chrome here. */
.erp-app {
  --erp-surface: #fff;
  --erp-surface-subtle: #f7f8fa;
  --erp-page-bg: #f3f4f7;
  --erp-border: #dfe3e8;
  --erp-border-strong: #cfd5dc;
  --erp-text: #2f3542;
  --erp-muted: #69707d;
  --erp-primary: var(--cui-primary, #5856d6);
  --erp-radius-sm: 0.375rem;
  --erp-radius: 0.625rem;
  --erp-shadow: 0 1px 2px rgba(44, 56, 74, 0.04);
  --erp-shadow-raised: 0 0.5rem 1.5rem rgba(44, 56, 74, 0.08);

  color: var(--erp-text);
  background: var(--erp-page-bg);
  font-size: 0.9375rem;
}

.erp-app .wrapper {
  background: var(--erp-page-bg) !important;
}

.erp-app .sidebar {
  --cui-sidebar-nav-link-padding-x: 0.875rem;
  --cui-sidebar-nav-link-padding-y: 0.65rem;
  --cui-sidebar-nav-link-icon-width: 1.25rem;
  --cui-sidebar-nav-link-icon-height: 1.25rem;
  --cui-sidebar-nav-link-icon-font-size: 1rem;
  --cui-sidebar-nav-link-icon-margin: 0.75rem;
}

.erp-app .sidebar-header {
  align-items: center;
  display: flex !important;
  font-size: 1rem;
  font-weight: 600;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  text-align: center;
  width: 100%;
  overflow-wrap: anywhere;
}

.erp-app .sidebar-nav {
  padding: 0.5rem;
}

.erp-app .sidebar-nav .nav-link {
  align-items: center;
  border-radius: 0.5rem;
  display: flex;
  font-size: 1rem;
  line-height: 1.25rem;
  margin-block: 0.125rem;
}

.erp-app .sidebar-nav .nav-link > .nav-icon {
  flex: 0 0 var(--cui-sidebar-nav-link-icon-width);
  height: var(--cui-sidebar-nav-link-icon-height);
  margin-inline-end: var(--cui-sidebar-nav-link-icon-margin);
  text-align: center;
  width: var(--cui-sidebar-nav-link-icon-width);
}

.erp-app .sidebar-nav .nav-group-items {
  padding-block: 0.125rem 0.375rem;
}

.erp-app .sidebar-nav .nav-group-items .nav-link {
  align-items: center;
  display: flex;
  font-size: 0.9375rem;
  padding-inline-end: var(--cui-sidebar-nav-link-padding-x);
  padding-inline-start: calc(
    var(--cui-sidebar-nav-link-padding-x) +
    var(--cui-sidebar-nav-link-icon-width) +
    var(--cui-sidebar-nav-link-icon-margin)
  );
}

.erp-app .sidebar-nav .nav-group-items .sidebar-resource-icon {
  flex: 0 0 var(--cui-sidebar-nav-link-icon-width);
  font-size: 0.875rem;
  height: var(--cui-sidebar-nav-link-icon-height);
  margin-inline-end: var(--cui-sidebar-nav-link-icon-margin);
  margin-inline-start: calc(
    -1 * (
      var(--cui-sidebar-nav-link-icon-width) +
      var(--cui-sidebar-nav-link-icon-margin)
    )
  );
  opacity: 0.72;
  text-align: center;
  width: var(--cui-sidebar-nav-link-icon-width);
}

.erp-app .sidebar-nav .nav-group-items .nav-link:hover .sidebar-resource-icon,
.erp-app .sidebar-nav .nav-group-items .nav-link.active .sidebar-resource-icon {
  opacity: 1;
}

.erp-app .sidebar-nav .sidebar-resource-label {
  flex: 1 1 auto;
  line-height: 1.25rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-app .sidebar-nav .nav-link.active {
  font-weight: 600;
}

@media (min-width: 768px) {
  .erp-app .sidebar.sidebar-narrow .sidebar-nav .nav-link > .nav-icon,
  .erp-app .sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .nav-link > .nav-icon {
    flex-basis: calc(
      var(--cui-sidebar-narrow-width) -
      (var(--cui-sidebar-nav-padding-x) * 2) -
      (var(--cui-sidebar-nav-link-padding-x) * 2)
    );
    margin: 0;
  }
}

.erp-app .header {
  border-bottom-color: var(--erp-border);
  box-shadow: 0 1px 2px rgba(44, 56, 74, 0.04);
}

.erp-app .header > .container-fluid:first-child {
  min-height: 3.5rem;
  padding-inline: 1rem !important;
}

.erp-app .header .header-toggler {
  align-items: center;
  border-radius: var(--erp-radius-sm);
  display: inline-flex;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.erp-app .header .header-toggler:hover {
  background: var(--erp-surface-subtle);
}

.erp-app .header .header-nav > .nav-item > .nav-link {
  align-items: center;
  display: flex;
  font-size: 1rem;
  justify-content: center;
  min-height: 2.5rem;
  min-width: 2.5rem;
}

.erp-app .header .header-action-icon {
  font-size: 1.0625rem;
  line-height: 1;
  text-align: center;
  width: 1.25rem;
}

.erp-app .header-divider {
  border-top-color: var(--erp-border);
}

.erp-app .header > .container-fluid:last-child {
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
}

.erp-app .breadcrumb {
  align-items: center;
  color: var(--erp-muted);
  font-size: 1rem;
  min-height: 2.75rem;
}

.erp-app .breadcrumb-item + .breadcrumb-item::before {
  color: #9da5b1;
}

.erp-app:not(.page-conversations) #ui-view {
  padding-block: 1rem !important;
}

.erp-app:not(.page-conversations) #ui-view > .row {
  margin-bottom: 0;
}

.erp-app .page-header {
  padding: 1rem 0 0;
}

.erp-app .page-header h1 {
  color: var(--erp-text);
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.3;
  margin: 0;
}

.erp-app #ui-view .card {
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow);
  margin-bottom: 1rem;
  min-width: 0;
  overflow: visible;
}

.erp-app #ui-view .card-header {
  align-items: center;
  background: var(--erp-surface);
  border-bottom: 1px solid var(--erp-border);
  border-radius: var(--erp-radius) var(--erp-radius) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
}

.erp-app #ui-view .card-header > strong:first-child {
  color: var(--erp-text);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.35;
}

.erp-app #ui-view .card-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  float: none !important;
  gap: 0.375rem;
  line-height: normal;
  margin-left: auto;
}

.erp-app #ui-view .card-header-actions > .dropdown {
  line-height: normal;
}

.erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn) {
  align-items: center;
  background: var(--erp-surface);
  border: 1px solid var(--erp-primary);
  border-radius: var(--erp-radius-sm);
  color: var(--erp-primary);
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  gap: 0.5rem;
  justify-content: center;
  line-height: 1.25;
  min-height: 2.375rem;
  padding: 0.4375rem 0.75rem;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn)::before {
  content: "\f142";
  font-family: "Font Awesome 7 Free";
  font-size: 0.875rem;
  font-weight: 900;
}

.erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn)::after {
  margin-left: 0.125rem;
}

.erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn):hover,
.erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn):focus,
.erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn)[aria-expanded="true"] {
  background: var(--erp-primary);
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 0.2rem rgba(88, 86, 214, 0.16);
  color: #fff;
  outline: 0;
}

.erp-app #ui-view .card-header-actions > .dropdown > .dropdown-menu {
  inset-inline-end: 0;
  inset-inline-start: auto;
  margin-top: 0.375rem !important;
  min-width: 13.5rem;
}

.erp-app #ui-view .card-header-actions > .dropdown > .dropdown-menu .dropdown-item {
  align-items: center;
  display: flex;
  min-height: 2.375rem;
  white-space: normal;
}

.erp-app #ui-view .card-body {
  min-width: 0;
  padding: 1rem;
}

.erp-app #ui-view .card-footer {
  background: var(--erp-surface);
  border-top: 1px solid var(--erp-border);
  border-radius: 0 0 var(--erp-radius) var(--erp-radius);
  padding: 0.75rem 1rem;
}

.erp-app #ui-view .card-footer:not(.text-center) {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1rem;
  justify-content: space-between;
}

.erp-app #ui-view .card-footer:not(.text-center) > .clearfix {
  min-width: 0;
}

.erp-app #ui-view .btn {
  align-items: center;
  border-radius: var(--erp-radius-sm);
  display: inline-flex;
  font-weight: 500;
  gap: 0.35rem;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
}

.erp-app #ui-view .btn-sm {
  min-height: 1.875rem;
  padding: 0.25rem 0.55rem;
}

.erp-app #ui-view .email-thread-summary {
  display: block;
  justify-content: flex-start;
  text-align: left !important;
}

.erp-app #ui-view .email-thread-summary > .d-flex {
  justify-content: flex-start;
  width: 100%;
}

.erp-app #ui-view .btn-group:not(.btn-group-vertical) > .btn {
  border-radius: 0;
  margin-left: -1px;
  position: relative;
}

.erp-app #ui-view .line-item-date-input {
  flex-wrap: nowrap;
  width: 100%;
}

.erp-app #ui-view .line-item-date-input > .form-control {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.erp-app #ui-view .line-item-date-input .input-group-copy-button {
  align-items: center;
  background: var(--erp-surface);
  border: 1px solid var(--erp-border-strong);
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  color: var(--erp-muted);
  flex: 0 0 2.625rem;
  justify-content: center;
  margin-left: -1px;
  min-height: 2.375rem;
  padding: 0.375rem 0.625rem;
}

.erp-app #ui-view .line-item-date-input .input-group-copy-button:hover,
.erp-app #ui-view .line-item-date-input .input-group-copy-button:focus-visible {
  background: var(--erp-surface-subtle);
  border-color: var(--erp-border-strong);
  color: var(--erp-primary);
  outline: 0;
}

.erp-app #ui-view .line-item-date-input .input-group-copy-button .fa {
  line-height: 1;
  margin: 0;
}

.erp-app #ui-view .shipping-document-section {
  border-top: 1px solid var(--erp-border);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.erp-app #ui-view .shipping-document-section-title {
  align-items: center;
  color: #343a46;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.erp-app #ui-view .shipping-document-section-title > .fa-solid {
  color: var(--erp-primary);
  width: 1.25rem;
}

.erp-app #ui-view .shipping-document-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 2fr) minmax(14rem, 0.75fr);
}

.erp-app #ui-view .shipping-invoice-grid {
  grid-template-columns: minmax(20rem, 28rem);
  max-width: 28rem;
  width: 100%;
}

.erp-app #ui-view .shipping-packing-grid {
  align-items: start;
  gap: 0.75rem;
  grid-template-columns: minmax(32rem, 40rem) minmax(13rem, 15rem);
  justify-content: start;
}

.erp-app #ui-view .shipping-packing-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 40rem;
  min-width: 0;
  width: 100%;
}

.erp-app #ui-view .shipping-packing-card-list:empty {
  display: none;
}

.erp-app #ui-view .shipping-summary-card {
  border-color: var(--erp-border);
  border-radius: var(--erp-radius-md);
  box-shadow: 0 1px 2px rgba(44, 56, 74, 0.04);
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.erp-app #ui-view .shipping-summary-card > .card-header {
  background: var(--erp-surface);
}

.erp-app #ui-view .shipping-summary-card > .card-body {
  padding: 0;
}

.erp-app #ui-view .shipping-summary-card > .shipping-summary-header {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  min-height: 2.875rem;
  padding: 0.5rem 0.75rem;
}

.erp-app #ui-view .shipping-summary-title,
.erp-app #ui-view .shipping-summary-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.erp-app #ui-view .shipping-summary-title > strong {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
}

.erp-app #ui-view .shipping-summary-title > .fa-solid {
  color: var(--erp-primary);
  font-size: 1rem;
}

.erp-app #ui-view .shipping-summary-metrics {
  align-items: stretch;
  background: var(--erp-border);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.erp-app #ui-view .shipping-summary-metrics-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.erp-app #ui-view .shipping-summary-metric {
  align-items: flex-start;
  background: var(--erp-surface-subtle);
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  justify-content: flex-start;
  min-height: 3.25rem;
  min-width: 0;
  padding: 0.5rem 0.625rem;
}

.erp-app #ui-view .shipping-summary-label {
  color: var(--erp-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
}

.erp-app #ui-view .shipping-summary-value {
  align-items: center;
  display: flex;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  justify-content: flex-start;
  line-height: 1.25;
  max-width: 100%;
  min-height: 1.25rem;
  min-width: 0;
  white-space: nowrap;
}

.erp-app #ui-view .shipping-summary-actions {
  align-items: center;
  background: var(--erp-surface);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.erp-app #ui-view .shipping-create-card-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 15rem;
  width: 100%;
}

.erp-app #ui-view .shipping-create-card {
  align-items: center;
  background: rgba(88, 86, 214, 0.035);
  border: 1px dashed rgba(88, 86, 214, 0.45);
  border-radius: var(--erp-radius-md);
  color: var(--erp-primary);
  display: flex;
  font-weight: 600;
  gap: 0.625rem;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.erp-app #ui-view .shipping-create-card:hover,
.erp-app #ui-view .shipping-create-card:focus {
  background: rgba(88, 86, 214, 0.09);
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 0.2rem rgba(88, 86, 214, 0.12);
  color: var(--erp-primary);
  outline: 0;
}

.erp-app #ui-view .shipping-document-toolbar {
  align-items: center;
  border-top: 1px solid var(--erp-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.erp-app #ui-view .shipping-document-toolbar .shipping-document-section-title {
  flex: 0 0 100%;
  margin-bottom: 0.25rem;
}

.erp-app #ui-view .shipping-document-link {
  min-height: 2.25rem;
}

.erp-app #ui-view .shipping-document-link.disabled {
  background: var(--erp-surface-subtle);
  color: var(--erp-muted);
  opacity: 1;
}

.erp-app #ui-view .shipping-file-upload-section {
  border-top: 1px solid var(--erp-border);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.erp-app #ui-view .shipping-file-upload-title {
  align-items: center;
  color: var(--erp-text);
  display: flex;
  font-size: 1rem;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.erp-app #ui-view .shipping-file-upload-title > .fa-solid {
  color: var(--erp-primary);
  width: 1.25rem;
}

.erp-app #ui-view .shipping-file-upload-content {
  max-width: 48rem;
}

.erp-app #ui-view .attachment-current-file {
  align-items: center;
  background: var(--erp-surface-subtle);
  border: 1px solid var(--erp-border);
  border-bottom: 0;
  border-radius: var(--erp-radius-sm) var(--erp-radius-sm) 0 0;
  display: flex;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.75rem;
}

.erp-app #ui-view .attachment-current-file-icon {
  color: var(--erp-primary);
  flex: 0 0 1.25rem;
  font-size: 1.125rem;
  text-align: center;
}

.erp-app #ui-view .attachment-current-file-details {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.erp-app #ui-view .attachment-current-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-app #ui-view .attachment-current-file-details small {
  color: var(--erp-muted);
}

.erp-app #ui-view .attachment-current-file-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.375rem;
}

.erp-app #ui-view .attachment-current-file + input[type="hidden"] + .attachment-upload {
  margin-top: 0;
}

.erp-app #ui-view .attachment-current-file + input[type="hidden"] + .attachment-upload .attachment-upload-dropzone {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.erp-app #ui-view .btn-group:not(.btn-group-vertical) > .btn:first-child {
  border-bottom-left-radius: var(--erp-radius-sm);
  border-top-left-radius: var(--erp-radius-sm);
  margin-left: 0;
}

.erp-app #ui-view .btn-group:not(.btn-group-vertical) > .btn:last-child {
  border-bottom-right-radius: var(--erp-radius-sm);
  border-top-right-radius: var(--erp-radius-sm);
}

.erp-app #ui-view .btn-group:not(.btn-group-vertical) > .btn:focus,
.erp-app #ui-view .btn-group:not(.btn-group-vertical) > .btn:hover {
  z-index: 1;
}

.erp-app #ui-view .card-header-actions .btn-link {
  background: var(--erp-surface-subtle);
  border: 1px solid var(--erp-border);
  color: var(--erp-primary);
  text-decoration: none;
}

.erp-app #ui-view .card-header-actions .btn-link:hover,
.erp-app #ui-view .card-header-actions .btn-link:focus {
  background: #eef0f5;
  border-color: var(--erp-border-strong);
  color: var(--erp-primary);
}

.erp-app #ui-view .dropdown-menu {
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow-raised);
  padding: 0.375rem;
}

.erp-app #ui-view .dropdown-item {
  border-radius: var(--erp-radius-sm);
  padding: 0.5rem 0.75rem;
}

.erp-app #ui-view .collapse[id$="Form"].show,
.erp-app #ui-view .collapse#searchForm.show {
  background: var(--erp-surface-subtle);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  margin-bottom: 1rem;
  padding: 1rem;
}

.erp-app #ui-view label:not(.form-check-label),
.erp-app #ui-view .form-label {
  color: #454b57;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.erp-app #ui-view .rich-text-field-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.5rem;
}

.erp-app #ui-view .rich-text-field {
  margin-bottom: 1rem;
}

.erp-app #ui-view .rich-text-field--special-terms {
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

.erp-app #ui-view .rich-text-field--note {
  margin-bottom: 0;
}

.erp-app #ui-view .rich-text-field-header > .col-form-label {
  font-size: 1rem;
  margin: 0;
  padding: 0;
}

.erp-app #ui-view .rich-text-field-editor {
  padding-top: 0.5rem;
}

.erp-app #ui-view .rich-text-field-hint {
  color: var(--erp-muted);
  font-size: 0.875rem;
}

.erp-app #ui-view .rich-text-toggle {
  align-items: center;
  background: rgba(88, 86, 214, 0.08);
  border: 1px solid rgba(88, 86, 214, 0.22);
  border-radius: var(--erp-radius-sm);
  color: var(--erp-primary);
  display: inline-flex;
  font-size: 0.9375rem;
  font-weight: 600;
  gap: 0.375rem;
  line-height: 1.25;
  min-height: 2rem;
  padding: 0.3125rem 0.625rem;
  text-decoration: none;
}

.erp-app #ui-view .rich-text-toggle:hover,
.erp-app #ui-view .rich-text-toggle:focus,
.erp-app #ui-view .rich-text-toggle[aria-expanded="true"] {
  background: rgba(88, 86, 214, 0.14);
  border-color: rgba(88, 86, 214, 0.4);
  color: var(--erp-primary);
}

.erp-app #ui-view .rich-text-toggle .fa {
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.erp-app #ui-view .rich-text-toggle-collapse {
  display: none;
}

.erp-app #ui-view .rich-text-toggle[aria-expanded="true"] .rich-text-toggle-expand {
  display: none;
}

.erp-app #ui-view .rich-text-toggle[aria-expanded="true"] .rich-text-toggle-collapse {
  display: inline;
}

.erp-app #ui-view .rich-text-toggle[aria-expanded="true"] .fa {
  transform: rotate(180deg);
}

.erp-app #ui-view .attachment-upload {
  margin-block: 0.5rem 1rem;
  width: 100%;
}

.erp-app #ui-view .attachment-upload-dropzone {
  align-items: center;
  background: var(--erp-surface-subtle);
  border: 2px dashed var(--erp-border-strong);
  border-radius: var(--erp-radius-sm);
  cursor: pointer;
  display: flex;
  gap: 1rem;
  min-height: 7rem;
  padding: 1rem 1.25rem;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.erp-app #ui-view .attachment-upload-dropzone:hover,
.erp-app #ui-view .attachment-upload-dropzone:focus,
.erp-app #ui-view .attachment-upload-dropzone.is-dragging {
  background: rgba(88, 86, 214, 0.06);
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 0.2rem rgba(88, 86, 214, 0.12);
  outline: 0;
}

.erp-app #ui-view .attachment-upload-dropzone.is-dragging {
  border-style: solid;
}

.erp-app #ui-view .attachment-upload-icon {
  align-items: center;
  background: rgba(88, 86, 214, 0.12);
  color: var(--erp-primary);
  display: inline-flex;
  flex: 0 0 3rem;
  font-size: 1.25rem;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.erp-app #ui-view .attachment-upload-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.erp-app #ui-view .attachment-upload-copy strong {
  color: var(--erp-text);
  font-size: 1rem;
  font-weight: 650;
}

.erp-app #ui-view .attachment-upload-copy span,
.erp-app #ui-view .attachment-upload-copy small {
  color: var(--erp-muted);
}

.erp-app #ui-view .attachment-upload-button {
  flex: 0 0 auto;
}

.erp-app #ui-view .attachment-upload-selection {
  border: 1px solid var(--erp-border);
  border-top: 0;
}

.erp-app #ui-view .attachment-upload-selection-header {
  align-items: center;
  background: var(--erp-surface-subtle);
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  font-weight: 600;
  justify-content: space-between;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
}

.erp-app #ui-view .attachment-upload-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.erp-app #ui-view .attachment-upload-file {
  align-items: center;
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.625rem 0.75rem;
}

.erp-app #ui-view .attachment-upload-file:last-child {
  border-bottom: 0;
}

.erp-app #ui-view .attachment-upload-file-icon {
  color: var(--erp-muted);
  flex: 0 0 1rem;
}

.erp-app #ui-view .attachment-upload-file-details {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.erp-app #ui-view .attachment-upload-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-app #ui-view .attachment-upload-file-size {
  color: var(--erp-muted);
}

.erp-app #ui-view .attachment-upload-remove {
  color: var(--erp-muted);
  flex: 0 0 auto;
}

.erp-app #ui-view .attachment-upload-remove:hover,
.erp-app #ui-view .attachment-upload-remove:focus {
  background: rgba(229, 83, 83, 0.1);
  color: var(--cui-danger, #e55353);
}

.erp-app #ui-view .form-control,
.erp-app #ui-view .form-select,
.erp-app #ui-view .input-group-text,
.erp-app #ui-view .select2-container .select2-selection {
  border-color: var(--erp-border-strong);
  border-radius: var(--erp-radius-sm);
  min-height: 2.375rem;
}

.erp-app #ui-view .form-control:focus,
.erp-app #ui-view .form-select:focus,
.erp-app #ui-view .select2-container--focus .select2-selection {
  border-color: rgba(88, 86, 214, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(88, 86, 214, 0.12);
}

.erp-app #ui-view .form-control:disabled,
.erp-app #ui-view .form-control[readonly],
.erp-app #ui-view .form-select:disabled {
  background-color: #f1f3f5;
  color: #5f6672;
}

.erp-app #ui-view [data-controller~="dropdown-field"] .input-group > .dropdown-input {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.erp-app #ui-view [data-controller~="dropdown-field"] .dropdown-field-actions {
  display: flex;
  margin-left: -1px;
}

.erp-app #ui-view [data-controller~="dropdown-field"] .dropdown-field-actions > .btn {
  background: var(--erp-surface);
  border-color: var(--erp-border-strong);
  border-radius: 0;
  color: var(--erp-muted);
  margin-left: -1px;
  min-width: 2.75rem;
}

.erp-app #ui-view [data-controller~="dropdown-field"] .dropdown-field-actions > .btn:hover,
.erp-app #ui-view [data-controller~="dropdown-field"] .dropdown-field-actions > .btn:focus {
  background: var(--erp-surface-subtle);
  border-color: var(--erp-border-strong);
  color: var(--erp-text);
}

.erp-app #ui-view [data-controller~="dropdown-field"] .dropdown-field-actions > .btn:first-child {
  margin-left: 0;
}

.erp-app #ui-view [data-controller~="dropdown-field"] .dropdown-field-actions > .btn:last-child {
  border-bottom-right-radius: var(--erp-radius-sm);
  border-top-right-radius: var(--erp-radius-sm);
}

.erp-app #ui-view [data-controller~="dropdown-field"] .dropdown-input:focus {
  position: relative;
  z-index: 3;
}

.erp-app #ui-view .form-check-input {
  border-color: var(--erp-border-strong);
  height: 1.125rem;
  width: 1.125rem;
}

.erp-app #ui-view .table-responsive {
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  scrollbar-color: #b7bec8 transparent;
}

.erp-app #ui-view .table-responsive.table-attached {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.erp-app #ui-view .line-items-heading {
  align-items: center;
  background: var(--erp-surface-subtle);
  border: 0;
  border-bottom: 1px solid var(--erp-border);
  border-left: 3px solid var(--erp-primary);
  border-radius: 0;
  display: flex;
  gap: 0.625rem;
  left: 0;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  position: sticky;
  width: 100%;
  z-index: 4;
}

.erp-app #ui-view .line-items-heading strong {
  color: var(--erp-text);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.erp-app #ui-view .line-items-table {
  --line-item-amount-width: 7.5rem;
  --line-item-cell-inline-padding: 1.25rem;
  --line-item-date-copy-width: 11.5rem;
  --line-item-date-width: 7.75rem;
  border-radius: 0;
  width: 100%;
}

.erp-app #ui-view .line-items-table > table.table {
  width: 100%;
}

.erp-app #ui-view .line-items-table table:has(tbody > .empty-table-row) thead {
  display: none;
}

.erp-app #ui-view .line-items-table .empty-table-row td {
  height: 6rem;
  text-align: center;
}

.erp-app #ui-view .order-line-items-table {
  background: var(--erp-surface);
}

.erp-app #ui-view .order-line-items-table table,
.erp-app #ui-view .pre-order-line-items-table table {
  table-layout: auto;
  width: 100%;
}

.erp-app #ui-view .order-line-items-table table {
  min-width: 88rem;
}

.erp-app #ui-view .pre-order-line-items-table table {
  min-width: 108rem;
}

.erp-app #ui-view .order-line-items-table .line-item-actions-column {
  width: 0.1%;
}

.erp-app #ui-view .order-line-items-table .line-item-product-column {
  width: 0.1%;
}

.erp-app #ui-view .order-line-items-table .line-item-quantity-column {
  width: 10rem;
}

.erp-app #ui-view .order-line-items-table .line-item-price-column {
  width: 13.25rem;
}

.erp-app #ui-view .order-line-items-table .line-item-amount-column {
  width: var(--line-item-amount-width);
}

.erp-app #ui-view .order-line-items-table .line-item-date-column {
  width: calc(var(--line-item-date-width) + var(--line-item-cell-inline-padding));
}

.erp-app #ui-view .order-line-items-table .line-item-reference-column {
  width: calc(20ch + var(--line-item-cell-inline-padding));
}

.erp-app #ui-view .order-line-items-table .line-item-status-column {
  width: 8rem;
}

.erp-app #ui-view .pre-order-line-items-table .line-item-actions-column {
  width: 0.1%;
}

.erp-app #ui-view .pre-order-line-items-table .line-item-product-column {
  width: 0.1%;
}

.erp-app #ui-view .pre-order-line-items-table .line-item-quantity-column {
  width: 10rem;
}

.erp-app #ui-view .pre-order-line-items-table .line-item-price-column {
  width: 10.25rem;
}

.erp-app #ui-view .pre-order-line-items-table .line-item-amount-column {
  width: var(--line-item-amount-width);
}

.erp-app #ui-view .pre-order-line-items-table .line-item-requested-date-column {
  width: calc(var(--line-item-date-copy-width) + var(--line-item-cell-inline-padding));
}

.erp-app #ui-view .pre-order-line-items-table .line-item-confirmed-date-column {
  width: calc(var(--line-item-date-width) + var(--line-item-cell-inline-padding));
}

.erp-app #ui-view .pre-order-line-items-table .line-item-reference-column {
  width: calc(20ch + var(--line-item-cell-inline-padding));
}

.erp-app #ui-view .pre-order-line-items-table .line-item-status-column {
  width: 7rem;
}

.erp-app #ui-view .quotation-line-items-table table {
  min-width: 82rem;
  table-layout: auto;
  width: 100%;
}

.erp-app #ui-view .quotation-line-items-table .line-item-actions-column {
  width: 0.1%;
}

.erp-app #ui-view .quotation-line-items-table .line-item-product-column {
  width: 0.1%;
}

.erp-app #ui-view .quotation-line-items-table .line-item-material-column {
  width: 8rem;
}

.erp-app #ui-view .quotation-line-items-table .line-item-quantity-column {
  width: 10rem;
}

.erp-app #ui-view .quotation-line-items-table .line-item-price-column {
  width: 13rem;
}

.erp-app #ui-view .quotation-line-items-table .line-item-lead-time-column {
  width: 6rem;
}

.erp-app #ui-view .quotation-line-items-table .line-item-amount-column {
  width: var(--line-item-amount-width);
}

.erp-app #ui-view .quotation-line-items-table .line-item-note-column {
  width: 10rem;
}

.erp-app #ui-view .quotation-line-items-table .line-item-note-col {
  max-width: 10rem;
  overflow-wrap: anywhere;
  width: 10rem;
}

.erp-app #ui-view .order-line-items-table .table > :not(caption) > * > *,
.erp-app #ui-view .pre-order-line-items-table .table > :not(caption) > * > *,
.erp-app #ui-view .quotation-line-items-table .table > :not(caption) > * > * {
  padding: 0.625rem;
}

.erp-app #ui-view .order-line-items-table thead th,
.erp-app #ui-view .pre-order-line-items-table thead th,
.erp-app #ui-view .quotation-line-items-table thead th {
  height: 2.75rem;
  padding-block: 0.625rem;
  white-space: nowrap;
}

.erp-app #ui-view .order-line-items-table .line-item-row > td,
.erp-app #ui-view .pre-order-line-items-table .line-item-row > td,
.erp-app #ui-view .quotation-line-items-table .line-item-row > td {
  background: var(--erp-surface);
  vertical-align: top;
}

.erp-app #ui-view .order-line-items-table .line-item-row:hover > td,
.erp-app #ui-view .pre-order-line-items-table .line-item-row:hover > td,
.erp-app #ui-view .quotation-line-items-table .line-item-row:hover > td {
  background: #fafaff;
}

.erp-app #ui-view .line-item-action-toolbar,
.erp-app #ui-view .line-item-product-main,
.erp-app #ui-view .line-item-product-name,
.erp-app #ui-view .line-item-number-with-unit,
.erp-app #ui-view .line-item-price-editor,
.erp-app #ui-view .line-item-price-reference {
  align-items: center;
  display: flex;
}

.erp-app #ui-view .line-item-action-col {
  overflow: visible;
  vertical-align: middle !important;
}

.erp-app #ui-view .line-items-table td.action-col {
  min-width: 0;
  white-space: nowrap;
  width: 0.1%;
  vertical-align: middle;
}

.erp-app #ui-view .line-item-action-toolbar {
  --line-item-action-button-size: 2.75rem;
  background: var(--erp-surface-subtle);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-sm);
  display: inline-flex;
  flex: 0 0 auto;
  overflow: visible;
  width: max-content;
}

.erp-app #ui-view .line-item-more-dropdown {
  display: flex;
  position: relative;
}

.erp-app #ui-view .line-item-more-dropdown > .line-item-action-button {
  border-inline-end: 0;
}

.erp-app #ui-view .line-item-more-menu {
  min-width: 10rem;
  padding-block: 0.375rem;
  z-index: 2000;
}

.erp-app #ui-view .line-item-more-action {
  align-items: center;
  display: flex;
  gap: 0.625rem;
  min-height: 2.25rem;
}

.erp-app #ui-view .line-item-more-action > i {
  color: var(--erp-muted);
  text-align: center;
  width: 1rem;
}

/* Keep an opened row menu above the following table rows and outside the
   horizontal scroll clipping boundary. */
.erp-app #ui-view .line-items-table:has(.line-item-more-menu.show) {
  overflow: visible;
}

.erp-app #ui-view .line-items-table tbody > tr:has(.line-item-more-menu.show) {
  position: relative;
  z-index: 1090;
}

.erp-app #ui-view .line-items-table tbody > tr:has(.line-item-more-menu.show) > .line-item-action-col,
.erp-app #ui-view .line-items-table tbody > tr:has(.line-item-more-menu.show) > .action-col {
  position: relative;
  z-index: 1091;
}

.erp-app #ui-view .line-items-table td.action-col .line-item-action-toolbar {
  max-width: none;
  min-width: 0;
}

.erp-app #ui-view .line-item-action-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-inline-end: 1px solid var(--erp-border);
  color: var(--erp-muted);
  display: inline-flex;
  font-size: 0.9375rem;
  flex: 0 0 var(--line-item-action-button-size);
  height: var(--line-item-action-button-size);
  justify-content: center;
  min-width: var(--line-item-action-button-size);
  padding: 0 !important;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
  width: var(--line-item-action-button-size);
}

.erp-app #ui-view .line-item-action-button:last-child {
  border-inline-end: 0;
}

.erp-app #ui-view .line-item-action-button:hover,
.erp-app #ui-view .line-item-action-button:focus-visible {
  background: var(--erp-surface);
  color: var(--erp-primary);
  outline: 0;
}

.erp-app #ui-view .line-item-sort-button {
  cursor: grab;
}

.erp-app #ui-view .line-item-sort-button:active {
  cursor: grabbing;
}

.erp-app #ui-view .line-item-remove-button:hover,
.erp-app #ui-view .line-item-remove-button:focus-visible {
  background: rgba(229, 83, 83, 0.08);
  color: var(--cui-danger, #e55353);
}

.erp-app #ui-view .line-item-state {
  align-items: center;
  color: var(--erp-muted);
  display: inline-flex;
  font-size: 0.8125rem;
  gap: 0.25rem;
  line-height: 1.25rem;
}

.erp-app #ui-view .line-item-product-main,
.erp-app #ui-view .line-item-product-name {
  flex-wrap: wrap;
  gap: 0.375rem;
  min-width: 0;
}

.erp-app #ui-view .line-item-product-main {
  font-weight: 650;
}

.erp-app #ui-view .line-item-product-summary {
  max-width: 31rem;
  min-width: 0;
  text-align: left;
  width: auto;
}

.erp-app #ui-view .line-items-table:not(.order-line-items-table):not(.pre-order-line-items-table):not(.quotation-line-items-table) td.line-item-product-col {
  max-width: 31rem;
  min-width: 0;
  width: 0.1%;
}

.erp-app #ui-view .line-item-product-alerts,
.erp-app #ui-view .line-item-product-parent {
  align-items: center;
  color: var(--erp-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.erp-app #ui-view .order-line-items-table .line-item-product-col {
  max-width: 31rem;
  width: 0.1%;
  text-align: left;
}

.erp-app #ui-view .pre-order-line-items-table .line-item-product-col,
.erp-app #ui-view .quotation-line-items-table .line-item-product-col {
  max-width: 31rem;
  width: 0.1%;
}

.erp-app #ui-view td.line-item-product-col {
  text-align: left;
  white-space: nowrap;
}

.erp-app #ui-view td.line-item-product-name-col {
  max-width: 14rem;
  min-width: 10rem;
  text-align: left;
  white-space: normal;
}

.erp-app #ui-view .line-item-product-code {
  align-items: center;
  display: flex;
  gap: 0.25rem;
  min-width: 0;
  text-align: left;
  max-width: 100%;
  width: fit-content;
}

.erp-app #ui-view .line-item-product-code > span {
  align-items: flex-start;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.25rem;
  max-width: 100%;
  min-width: 0;
}

.erp-app #ui-view .line-item-product-code > span > a {
  display: block !important;
  flex: 0 0 auto;
  line-height: 1.35rem !important;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0 !important;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-app #ui-view .line-item-product-code > span > i {
  flex: 0 0 auto;
  margin-top: 0.125rem;
}

.erp-app #ui-view .line-item-product-code > .fa-circle-info {
  color: var(--erp-muted);
  cursor: pointer;
  flex: 0 0 auto;
}

.erp-app #ui-view .line-item-product-name {
  color: var(--erp-muted);
  flex-wrap: nowrap;
  margin-top: 0.25rem;
  max-width: 100%;
  width: fit-content;
  white-space: nowrap;
}

.erp-app #ui-view .line-item-product-name > span {
  align-items: center;
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
}

.erp-app #ui-view .line-item-product-name > span > a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-app #ui-view .line-item-product-name > .fa-image {
  flex: 0 0 auto;
}

.erp-app #ui-view .line-item-product-main > span > a,
.erp-app #ui-view .line-item-product-name > span > a {
  display: inline !important;
  line-height: 1.35 !important;
  padding: 0 !important;
}

.erp-app #ui-view .line-item-inline-check,
.erp-app #ui-view .line-item-status-check {
  align-items: center;
  color: var(--erp-muted);
  display: inline-flex;
  font-size: 0.8125rem;
  gap: 0.375rem;
  margin: 0;
  min-height: 1.25rem;
  padding-inline-start: 0;
}

.erp-app #ui-view .line-item-inline-check .form-check-input,
.erp-app #ui-view .line-item-status-check .form-check-input {
  margin: 0;
}

.erp-app #ui-view .line-item-number-with-unit {
  gap: 0.375rem;
}

.erp-app #ui-view .line-item-quantity-col {
  max-width: 9.5rem;
  min-width: 9.5rem;
  width: 9.5rem;
}

.erp-app #ui-view .line-item-number-with-unit .form-control {
  flex: 0 1 7.5rem;
  max-width: 7.5rem;
  min-width: 0;
  width: 100%;
}

.erp-app #ui-view .line-item-lead-time-col .line-item-number-with-unit {
  justify-content: center;
}

.erp-app #ui-view .line-item-lead-time-field {
  flex: 0 0 3.75rem !important;
  max-width: 3.75rem !important;
  text-align: center;
  width: 3.75rem !important;
}

.erp-app #ui-view .line-item-unit {
  color: var(--erp-muted);
  flex: 0 0 auto;
  font-size: 0.875rem;
}

.erp-app #ui-view .line-item-lookup-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 2.5rem;
  height: 2.5rem;
  justify-content: center;
  padding: 0.5rem !important;
}

.erp-app #ui-view .line-item-price-editor {
  gap: 0.375rem;
  width: 100%;
}

.erp-app #ui-view .line-item-price-col {
  max-width: 17rem;
  min-width: 17rem;
  width: 17rem;
}

.erp-app #ui-view .order-line-items-table .line-item-price-col {
  max-width: 13.25rem;
  min-width: 13.25rem;
  width: 13.25rem;
}

.erp-app #ui-view .pre-order-line-items-table .line-item-price-col {
  max-width: 10.25rem;
  min-width: 10.25rem;
  width: 10.25rem;
}

.erp-app #ui-view .quotation-line-items-table .line-item-price-col {
  max-width: 13rem;
  min-width: 13rem;
  width: 13rem;
}

.erp-app #ui-view .line-item-price-editor .form-control {
  flex: 1 1 auto;
  max-width: none;
  min-width: 0;
  width: 1%;
}

.erp-app #ui-view .line-item-price-picker {
  flex: 0 0 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
}

.erp-app #ui-view .line-item-price-references {
  border-top: 1px dashed var(--erp-border);
  display: flex;
  margin-top: 0.375rem;
  padding-top: 0.25rem;
  width: 100%;
}

.erp-app #ui-view .line-item-price-reference {
  align-items: center;
  color: var(--erp-muted);
  display: flex;
  flex: 1 1 50%;
  font-size: 0.75rem;
  gap: 0.25rem;
  min-width: 0;
  padding-inline: 0.375rem;
}

.erp-app #ui-view .line-item-price-reference:first-child {
  padding-inline-start: 0;
}

.erp-app #ui-view .line-item-price-reference + .line-item-price-reference {
  border-inline-start: 1px solid var(--erp-border);
}

.erp-app #ui-view .line-item-price-label {
  color: var(--erp-muted);
  font-size: 0.6875rem;
  line-height: 1rem;
  white-space: nowrap;
}

.erp-app #ui-view .line-item-price-value {
  align-items: center;
  display: flex;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  gap: 0.25rem;
  line-height: 1rem;
  min-width: 0;
}

.erp-app #ui-view .line-item-amount {
  display: inline-block;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  padding-top: 0.625rem;
}

.erp-app #ui-view .line-items-table .line-item-amount-col {
  max-width: var(--line-item-amount-width);
  min-width: var(--line-item-amount-width);
  width: var(--line-item-amount-width);
}

.erp-app #ui-view .line-item-margin {
  align-items: center;
  color: var(--erp-muted);
  display: flex;
  font-size: 0.75rem;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.erp-app #ui-view .order-line-items-table .line-item-margin,
.erp-app #ui-view .pre-order-line-items-table .line-item-margin,
.erp-app #ui-view .quotation-line-items-table .line-item-margin {
  justify-content: center;
}

.erp-app #ui-view .line-item-date-reference {
  align-items: center;
  border-top: 1px dashed var(--erp-border);
  color: var(--erp-muted);
  display: flex;
  font-size: 0.75rem;
  gap: 0.25rem;
  margin-top: 0.375rem;
  padding-top: 0.25rem;
  white-space: nowrap;
}

.erp-app #ui-view .order-line-items-table .form-control,
.erp-app #ui-view .pre-order-line-items-table .form-control {
  font-variant-numeric: tabular-nums;
  height: 2.5rem;
  padding-block: 0.4375rem;
}

.erp-app #ui-view .line-item-due-field,
.erp-app #ui-view .line-item-customer-order-field {
  width: 100%;
}

.erp-app #ui-view .line-item-date-col,
.erp-app #ui-view .line-item-date-heading {
  max-width: calc(var(--line-item-date-width) + var(--line-item-cell-inline-padding));
  min-width: calc(var(--line-item-date-width) + var(--line-item-cell-inline-padding));
  width: calc(var(--line-item-date-width) + var(--line-item-cell-inline-padding));
  white-space: nowrap;
}

.erp-app #ui-view .line-item-date-copy-col,
.erp-app #ui-view .line-item-date-copy-heading {
  max-width: calc(var(--line-item-date-copy-width) + var(--line-item-cell-inline-padding));
  min-width: calc(var(--line-item-date-copy-width) + var(--line-item-cell-inline-padding));
  width: calc(var(--line-item-date-copy-width) + var(--line-item-cell-inline-padding));
}

.erp-app #ui-view .line-items-table .line-item-date-col > .line-item-due-field {
  display: block;
  flex: 0 0 var(--line-item-date-width);
  max-width: var(--line-item-date-width);
  min-width: 0 !important;
  width: var(--line-item-date-width) !important;
}

.erp-app #ui-view .line-items-table .line-item-date-input {
  flex: 0 0 var(--line-item-date-copy-width);
  max-width: var(--line-item-date-copy-width);
  min-width: var(--line-item-date-copy-width);
  width: var(--line-item-date-copy-width) !important;
}

.erp-app #ui-view .line-items-table .line-item-date-input > .line-item-due-field {
  flex: 1 1 auto;
  min-width: 0 !important;
  width: 1% !important;
}

.erp-app #ui-view .line-item-customer-order-field {
  max-width: 20ch;
  min-width: 20ch !important;
  width: 20ch;
}

.erp-app #ui-view .order-line-items-table .line-item-reference-col,
.erp-app #ui-view .pre-order-line-items-table .line-item-reference-col {
  max-width: calc(20ch + var(--line-item-cell-inline-padding));
  min-width: calc(20ch + var(--line-item-cell-inline-padding));
  width: calc(20ch + var(--line-item-cell-inline-padding));
}

.erp-app #ui-view .line-item-status-col {
  text-align: left;
}

.erp-app #ui-view .line-item-status-list {
  display: grid;
  gap: 0.375rem;
}

.erp-app #ui-view .line-item-status-check {
  justify-content: flex-start;
}

.erp-app #ui-view .order-line-items-table th:first-child,
.erp-app #ui-view .order-line-items-table td:first-child,
.erp-app #ui-view .pre-order-line-items-table th:first-child,
.erp-app #ui-view .pre-order-line-items-table td:first-child {
  left: 0;
  position: sticky;
  z-index: 2;
}

.erp-app #ui-view .order-line-items-table th:first-child,
.erp-app #ui-view .pre-order-line-items-table th:first-child {
  background: var(--erp-surface-subtle);
  z-index: 3;
}

.erp-app #ui-view .import-actions {
  align-items: center;
  background: var(--erp-surface-subtle);
  border: 1px solid var(--erp-border);
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  min-height: 3.75rem;
  margin-bottom: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  width: 100%;
}

.erp-app #ui-view .import-actions::before {
  align-items: center;
  background: rgba(88, 86, 214, 0.12);
  color: var(--erp-primary);
  content: "\f56f";
  display: inline-flex;
  flex: 0 0 2.25rem;
  font-family: "Font Awesome 7 Free";
  font-size: 1rem;
  font-weight: 900;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.erp-app #ui-view .import-actions .import-action,
.erp-app #ui-view .import-actions .btn-link {
  align-items: center;
  background: var(--erp-surface);
  border: 1px solid var(--erp-primary);
  border-radius: var(--erp-radius-sm);
  color: var(--erp-primary);
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  text-decoration: none;
}

.erp-app #ui-view .import-actions .import-action:hover,
.erp-app #ui-view .import-actions .import-action:focus,
.erp-app #ui-view .import-actions .btn-link:hover,
.erp-app #ui-view .import-actions .btn-link:focus {
  background: var(--erp-primary);
  color: #fff;
}

.erp-app #ui-view .row > .table-responsive.line-items-table {
  margin-left: calc(var(--bs-gutter-x) * 0.5);
  margin-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: 0;
  padding-right: 0;
  width: calc(100% - var(--bs-gutter-x));
}

.erp-app #ui-view .table {
  border-color: var(--erp-border);
  margin-bottom: 0;
}

.erp-app #ui-view .table > :not(caption) > * > * {
  border-bottom-color: var(--erp-border);
  padding: 0.7rem 0.75rem;
}

.erp-app #ui-view .table thead th {
  background: var(--erp-surface-subtle);
  color: #454b57;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

.erp-app #ui-view .table tbody td {
  color: var(--erp-text);
}

.erp-app #ui-view .table-hover > tbody > tr:hover > * {
  background-color: rgba(88, 86, 214, 0.045);
}

.erp-app #ui-view .table tbody tr:last-child > td {
  border-bottom-width: 0;
}

.erp-app #ui-view .badge {
  border-radius: 0.375rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0.35em 0.55em;
}

.erp-app #ui-view .alert {
  border: 1px solid transparent;
  border-radius: var(--erp-radius);
  box-shadow: none;
}

.erp-app #ui-view .list-group {
  border-radius: var(--erp-radius);
}

.erp-app #ui-view .list-group-item {
  border-color: var(--erp-border);
  padding: 0.75rem 1rem;
}

.erp-app #ui-view .nav-tabs {
  border-bottom-color: var(--erp-border);
  gap: 0.25rem;
}

.erp-app #ui-view .nav-tabs .nav-link {
  border-radius: var(--erp-radius-sm) var(--erp-radius-sm) 0 0;
  color: var(--erp-muted);
  font-weight: 500;
  padding: 0.625rem 0.875rem;
}

.erp-app #ui-view .nav-tabs .nav-link.active {
  color: var(--erp-primary);
  font-weight: 600;
}

.erp-app #ui-view .pagination {
  flex-wrap: wrap;
  gap: 0.25rem;
}

.erp-app #ui-view .page-link {
  align-items: center;
  border-color: var(--erp-border);
  border-radius: var(--erp-radius-sm) !important;
  display: inline-flex;
  justify-content: center;
  min-height: 2.25rem;
  min-width: 2.25rem;
}

.erp-app #ui-view .workspace-page-heading {
  background:
    linear-gradient(135deg, rgba(88, 86, 214, 0.08), rgba(88, 86, 214, 0) 55%),
    var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow);
  padding: 1rem 1.25rem;
}

.erp-app #ui-view .workspace-page-heading-icon {
  align-items: center;
  background: rgba(88, 86, 214, 0.12);
  border-radius: var(--erp-radius-sm);
  color: var(--erp-primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

.erp-app #ui-view .workspace-page-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card > .card-header {
  background:
    linear-gradient(135deg, rgba(88, 86, 214, 0.08), rgba(88, 86, 214, 0) 55%),
    var(--erp-surface);
  min-height: 4.75rem;
  padding: 1rem 1.25rem;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card > .card-header::before {
  align-items: center;
  background: rgba(88, 86, 214, 0.12);
  border-radius: var(--erp-radius-sm);
  color: var(--erp-primary);
  content: var(--erp-list-icon, "\f03a");
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "Font Awesome 7 Free";
  font-size: 1.125rem;
  font-weight: 900;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card > .card-header > strong:first-of-type {
  color: var(--erp-text);
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.3;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card .list-browse-shell > .card-body {
  padding: 0;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card .card-body:has(> #searchForm + .table-responsive) {
  padding: 0;
}

.erp-list-page.erp-app #ui-view > .row > [class*="col-"] > .card .card-body > #searchForm.collapse,
.erp-list-page.erp-app #ui-view > .row > [class*="col-"] > .card .card-body > #searchForm.collapsing {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card .card-body > #searchForm > form {
  background: var(--erp-surface-subtle);
  border-bottom: 1px solid var(--erp-border);
  padding: 1rem;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card #searchForm > form > .row:last-child {
  margin-bottom: 0 !important;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card .card-body:has(> .table-responsive:only-child) {
  padding: 0;
}

.erp-list-page #ui-view > .row > [class*="col-"] > .card .card-body > .table-responsive {
  border: 0;
  border-radius: 0;
}

.erp-app #ui-view .sales-leads-list-card,
.erp-app #ui-view .sales-leads-list-card .list-browse,
.erp-app #ui-view .sales-leads-list-card .list-browse-shell,
.erp-app #ui-view .sales-leads-list-card .card-body {
  display: block;
  max-width: 100%;
  min-width: 0;
}

.erp-app #ui-view .sales-leads-list-card {
  overflow: hidden;
}

.erp-app #ui-view .sales-leads-status-filters {
  background: var(--erp-surface);
  border-bottom: 1px solid var(--erp-border);
  margin: 0;
  overflow-x: auto;
  padding: 0.75rem 1rem;
}

.erp-app #ui-view .sales-leads-list-card .table-responsive {
  max-width: 100%;
  overflow-x: auto;
}

.erp-app #ui-view .trade-cases-list-card {
  overflow: hidden;
}

.erp-app #ui-view .trade-cases-list-card .table-responsive {
  border: 0;
  border-radius: 0;
}

.erp-app #ui-view .trade-cases-tabs {
  border-bottom: 1px solid var(--erp-border);
  overflow-x: auto;
  padding: 0.5rem 1rem 0;
}

.erp-app #ui-view .trade-cases-tabs .nav-tabs {
  border-bottom: 0;
  flex-wrap: nowrap;
  margin: 0;
  min-width: max-content;
}

.erp-app #ui-view .trade-cases-bulk-actions {
  align-items: center;
  background: var(--erp-surface);
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
}

.erp-app #ui-view .document-detail-card {
  overflow: visible;
}

.erp-app #ui-view .document-detail-tabs-nav {
  background: var(--erp-surface-subtle);
  border-bottom: 1px solid var(--erp-border);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.erp-app #ui-view .document-detail-tabs-nav .nav-tabs {
  border: 0;
  margin: 0;
  min-width: max-content;
  padding: 0;
}

.erp-app #ui-view .document-detail-tabs-nav .nav-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--erp-muted);
  display: inline-flex;
  font-size: 0.9375rem;
  font-weight: 600;
  gap: 0.45rem;
  min-height: 3.5rem;
  padding: 0.75rem;
  white-space: nowrap;
}

.erp-app #ui-view .document-detail-tabs-nav .nav-link:hover,
.erp-app #ui-view .document-detail-tabs-nav .nav-link:focus {
  background: rgba(88, 86, 214, 0.06);
  color: var(--erp-primary);
}

.erp-app #ui-view .document-detail-tabs-nav .nav-link.active {
  background: var(--erp-surface);
  border-bottom-color: var(--erp-primary);
  color: var(--erp-primary);
}

.erp-app #ui-view .document-detail-tabs-nav .nav-link .badge {
  min-width: 1.5rem;
}

.erp-app #ui-view .document-detail-tabs > .tab-content {
  background: var(--erp-surface);
  min-height: 12rem;
}

.erp-app #ui-view .document-detail-pane > form {
  margin: 0;
}

.erp-app #ui-view .related-tab-pane {
  padding: 1rem;
}

.erp-app #ui-view .related-tab-pane > .accordion-item {
  border: 0;
  border-radius: 0;
}

.erp-app #ui-view .related-tab-pane > .accordion-item > .accordion-header {
  display: none;
}

.erp-app #ui-view .related-tab-pane > .accordion-item > .collapse {
  display: block !important;
  height: auto !important;
  visibility: visible !important;
}

.erp-app #ui-view .related-tab-pane > .accordion-item > .collapse.accordion-body,
.erp-app #ui-view .related-tab-pane > .accordion-item > .collapse > .accordion-body {
  padding: 0;
}

.erp-app #ui-view .related-tab-pane > .accordion-item > .collapse.card-body {
  padding: 0;
}

.erp-app #ui-view .related-tab-pane > .accordion-item > .collapse > .table-responsive,
.erp-app #ui-view .related-tab-pane > .accordion-item > .collapse > [class*="col-"].table-responsive {
  padding-left: 0;
  padding-right: 0;
}

.erp-app #ui-view .document-tab-empty {
  align-items: center;
  color: var(--erp-muted);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
  min-height: 10rem;
  padding: 2rem;
  text-align: center;
}

.erp-app #ui-view .document-tab-empty {
  min-height: 12rem;
  padding: 2rem 1.5rem;
}

.erp-app #ui-view .document-tab-empty-icon {
  align-items: center;
  background: color-mix(in srgb, var(--cui-primary, #5856d6) 12%, transparent);
  border-radius: 50%;
  color: var(--cui-primary, #5856d6);
  display: inline-flex;
  font-size: 1.25rem;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.erp-app #ui-view .document-tab-empty-title {
  color: var(--erp-text);
  font-size: 1.125rem;
  font-weight: 700;
}

.erp-app #ui-view .document-tab-empty-description {
  color: var(--erp-muted);
  font-size: 0.9375rem;
  max-width: 30rem;
}

.erp-app #ui-view .document-tab-empty .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 2.5rem;
  min-width: 7rem;
}

.erp-app #ui-view .task-tab-actions {
  align-items: center;
  background: var(--cui-tertiary-bg, #f6f7f9);
  border: 1px solid var(--erp-border);
  border-radius: 0 0 var(--erp-radius) var(--erp-radius);
  border-top: 0;
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
}

.erp-app #ui-view .task-tab-table {
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.erp-app #ui-view .resource-edit-tabs-card {
  overflow: visible;
}

.erp-app #ui-view .resource-edit-tab-content {
  border: 0;
  margin: 0;
}

.erp-app #ui-view .resource-edit-tab-content[hidden] {
  display: none !important;
}

.erp-app #ui-view .resource-edit-tab-content > .accordion-item {
  border: 0;
  border-radius: 0;
}

.erp-app #ui-view .resource-edit-tab-content > .accordion-item > .accordion-header {
  display: none;
}

.erp-app #ui-view .resource-edit-tab-content > .accordion-item > .collapse {
  display: block !important;
  height: auto !important;
  min-height: 12rem;
  visibility: visible !important;
}

.erp-app #ui-view .resource-edit-tab-content > .accordion-item > .collapse > .accordion-body,
.erp-app #ui-view .resource-edit-tab-content > .accordion-item > .collapse.accordion-body,
.erp-app #ui-view .resource-edit-tab-content > .accordion-item > .collapse.card-body {
  padding: 1rem;
}

.erp-app #ui-view .resource-edit-tab-content > .accordion-item .table-responsive[hidden] {
  display: none !important;
}

.erp-app #ui-view .pagy-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  width: 100%;
}

.erp-app #ui-view .pagy-summary {
  align-items: center;
  color: var(--erp-muted);
  display: flex;
  flex-wrap: wrap;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  gap: 0.75rem;
  line-height: 1.25;
  margin: 0;
  min-height: 2.5rem;
}

.erp-app #ui-view .pagy-info,
.erp-app #ui-view .pagy-items-selector {
  align-items: center;
  display: inline-flex;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
  min-height: 2.5rem;
  padding: 0;
}

.erp-app #ui-view .pagy-items-selector label {
  align-items: center;
  display: inline-flex;
  line-height: 1.25;
  margin: 0;
}

.erp-app #ui-view .pagy-info .pagy,
.erp-app #ui-view .pagy-items-selector .pagy,
.erp-app #ui-view .pagy-items-selector label,
.erp-app #ui-view .pagy-items-selector input {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.erp-app #ui-view .pagy-items-selector input[name="limit"] {
  background: var(--erp-surface);
  border: 1px solid var(--erp-border-strong);
  border-radius: var(--erp-radius-sm);
  color: var(--erp-text);
  font-size: 1rem !important;
  height: 2.5rem;
  line-height: 1.25 !important;
  margin-inline: 0.5rem;
  min-width: 3.5rem;
  padding: 0.375rem 0.5rem !important;
}

.erp-app #ui-view .pagy-pages {
  align-items: center;
  display: flex;
  min-height: 2.5rem;
}

.erp-app #ui-view .pagy-pages nav,
.erp-app #ui-view .pagy-pages .pagination {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  margin: 0;
  min-width: max-content;
}

.erp-app #ui-view .pagy-pages .page-item {
  flex: 0 0 auto;
}

.erp-app #ui-view .pagy-pages .page-link {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  height: 2.5rem;
  line-height: 1.25;
  min-height: 2.5rem;
  min-width: 2.5rem;
}

.erp-app #ui-view .empty-table-row td {
  background: var(--erp-surface);
}

.erp-app #ui-view .table-hover > tbody > .empty-table-row:hover > td {
  background: var(--erp-surface-subtle);
}

.erp-app #ui-view .sticky-search-bar {
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow);
  padding: 0.75rem;
  top: 6.75rem;
}

@media (max-width: 991.98px) {
  .erp-app .header > .container-fluid:first-child {
    padding-inline: 0.75rem !important;
  }

  .erp-app:not(.page-conversations) #ui-view {
    padding-block: 0.75rem !important;
  }

  .erp-app #ui-view .card-header-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .erp-app #ui-view .shipping-document-grid,
  .erp-app #ui-view .shipping-invoice-grid {
    grid-template-columns: 1fr;
  }

  .erp-app #ui-view .shipping-summary-metrics-wide {
    grid-template-columns: repeat(3, minmax(7rem, 1fr));
  }
}

@media (max-width: 767.98px) {
  .erp-app {
    font-size: 0.9rem;
  }

  .erp-app .header > .container-fluid:first-child {
    min-height: 3.25rem;
  }

  .erp-app .header > .container-fluid:last-child {
    min-height: 2.5rem;
    overflow-x: auto;
    padding-inline: 0.75rem;
  }

  .erp-app .breadcrumb {
    min-height: 2.5rem;
    white-space: nowrap;
  }

  .erp-app:not(.page-conversations) #ui-view {
    padding-block: 0.5rem !important;
  }

  .erp-app #ui-view .card {
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .erp-app #ui-view .card-header {
    align-items: center;
    min-height: auto;
    padding: 0.75rem;
  }

  .erp-app #ui-view .card-header > .badge {
    align-self: center;
  }

  .erp-app #ui-view .card-header > strong:first-child {
    font-size: 1rem;
    padding-block: 0.35rem;
  }

  .erp-app #ui-view .card-header-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .erp-app #ui-view .card-header-actions > .dropdown,
  .erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn),
  .erp-app #ui-view .card-header-actions > .dropdown > .dropdown-menu {
    width: 100%;
  }

  .erp-app #ui-view .card-header-actions > .dropdown > a.dropdown-toggle:not(.btn) {
    justify-content: space-between;
  }

  .erp-app #ui-view .card-body {
    padding: 0.75rem;
  }

  .erp-app #ui-view .rich-text-field-header > .col-form-label {
    order: 1;
  }

  .erp-app #ui-view .rich-text-field-header > .rich-text-toggle {
    margin-left: auto;
    order: 2;
  }

  .erp-app #ui-view .rich-text-field-header > .rich-text-field-hint {
    flex: 1 1 100%;
    order: 3;
  }

  .erp-app #ui-view .card-footer {
    padding: 0.75rem;
  }

  .erp-app #ui-view .card-footer:not(.text-center) {
    align-items: stretch;
    flex-direction: column;
  }

  .erp-app #ui-view .pagy-nav {
    align-items: stretch;
    gap: 0.625rem;
  }

  .erp-app #ui-view .pagy-summary,
  .erp-app #ui-view .pagy-pages {
    width: 100%;
  }

  .erp-app #ui-view .pagy-summary {
    gap: 0.375rem 0.75rem;
    min-height: 0;
  }

  .erp-app #ui-view .pagy-pages {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 0.25rem;
  }

  .erp-app #ui-view .pagy-pages nav,
  .erp-app #ui-view .pagy-pages .pagination {
    flex-wrap: nowrap !important;
    min-width: max-content;
  }

  .erp-app #ui-view .pagy-pages .page-link {
    height: 2.375rem;
    min-height: 2.375rem;
    min-width: 2.375rem;
    padding: 0.375rem 0.625rem;
  }

  .erp-app #ui-view .table-responsive .table th,
  .erp-app #ui-view .table-responsive .table td {
    padding: 0.625rem;
    white-space: nowrap;
  }

  .erp-app #ui-view .collapse[id$="Form"].show,
  .erp-app #ui-view .collapse#searchForm.show {
    padding: 0.75rem;
  }

  .erp-list-page #ui-view > .row > [class*="col-"] > .card .card-body > #searchForm.collapse,
  .erp-list-page #ui-view > .row > [class*="col-"] > .card .card-body > #searchForm.collapsing {
    padding: 0;
  }

  .erp-list-page #ui-view > .row > [class*="col-"] > .card .card-body > #searchForm > form {
    padding: 0.75rem;
  }

  .erp-app #ui-view .card-footer.text-center {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
  }

  .erp-app #ui-view .card-footer.text-center .btn {
    flex: 1 1 auto;
  }

  .erp-app #ui-view .document-detail-tabs-nav .nav-tabs {
    padding-inline: 0;
  }

  .erp-app #ui-view .document-detail-tabs-nav .nav-link {
    min-height: 3.125rem;
    padding: 0.625rem;
  }

  .erp-app #ui-view .related-tab-pane {
    padding: 0.75rem;
  }

  .erp-app #ui-view .attachment-upload-dropzone {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 1rem;
  }

  .erp-app #ui-view .attachment-upload-icon {
    flex-basis: 2.5rem;
    height: 2.5rem;
    width: 2.5rem;
  }

  .erp-app #ui-view .attachment-upload-button {
    width: 100%;
  }

  .erp-app #ui-view .attachment-current-file {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .erp-app #ui-view .attachment-current-file-details {
    flex-basis: calc(100% - 2rem);
  }

  .erp-app #ui-view .attachment-current-file-actions {
    flex: 1 1 100%;
  }

  .erp-app #ui-view .attachment-current-file-actions .btn {
    flex: 1 1 auto;
  }

  .erp-app #ui-view .import-actions .import-action,
  .erp-app #ui-view .import-actions .btn-link {
    flex: 1 1 calc(50% - 0.625rem);
  }

  .erp-app #ui-view .shipping-summary-metrics,
  .erp-app #ui-view .shipping-summary-metrics-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-app #ui-view .shipping-summary-actions {
    align-items: center;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-app #ui-view .shipping-summary-actions .btn {
    min-height: 2.25rem;
    width: 100%;
    margin-left: 0 !important;
  }

  .erp-app #ui-view .shipping-document-link {
    flex: 1 1 calc(50% - 0.625rem);
  }
}

@media (max-width: 575.98px) {
  .erp-app #ui-view .shipping-summary-metrics,
  .erp-app #ui-view .shipping-summary-metrics-wide {
    grid-template-columns: 1fr;
  }
}

.erp-app #ui-view .purchase-quotation-conversion-table {
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.erp-app #ui-view .purchase-quotation-conversion-panel {
  align-items: end;
  background: var(--cui-tertiary-bg, #f6f7f9);
  border: 1px solid var(--erp-border);
  border-radius: 0 0 var(--erp-radius) var(--erp-radius);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.erp-app #ui-view .purchase-quotation-conversion-fields {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.erp-app #ui-view .purchase-quotation-conversion-field {
  flex: 0 1 10rem;
  width: 10rem;
}

.erp-app #ui-view .purchase-quotation-decimal-field {
  flex-basis: 8rem;
  width: 8rem;
}

.erp-app #ui-view .purchase-quotation-conversion-field label {
  color: var(--cui-secondary-color, #6c757d);
  display: block;
  font-size: 0.8125rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}

.erp-app #ui-view .purchase-quotation-conversion-field .form-control {
  min-height: 2.5rem;
}

.erp-app #ui-view .purchase-quotation-conversion-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.erp-app #ui-view .purchase-quotation-conversion-actions .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 2.5rem;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .erp-app #ui-view .purchase-quotation-conversion-panel {
    align-items: stretch;
    flex-direction: column;
    padding: 0.875rem;
  }

  .erp-app #ui-view .purchase-quotation-conversion-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-app #ui-view .purchase-quotation-conversion-field,
  .erp-app #ui-view .purchase-quotation-decimal-field {
    width: 100%;
  }

  .erp-app #ui-view .purchase-quotation-conversion-actions .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 479.98px) {
  .erp-app #ui-view .purchase-quotation-conversion-fields {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .erp-app *,
  .erp-app *::before,
  .erp-app *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.erp-auth {
  --erp-auth-primary: var(--cui-primary, #5856d6);
  color: #2f3542;
}

.erp-auth-shell {
  background:
    radial-gradient(circle at 15% 10%, rgba(88, 86, 214, 0.12), transparent 32rem),
    linear-gradient(145deg, #f7f8fb 0%, #eef0f5 100%);
  padding-block: 2rem;
}

.erp-auth .card {
  border: 1px solid #dfe3e8;
  border-radius: 0.75rem;
  box-shadow: 0 1rem 3rem rgba(44, 56, 74, 0.12);
  margin-inline: auto;
  max-width: 30rem;
  overflow: hidden;
}

.erp-auth .card-body {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.erp-auth h1 {
  font-size: 1.75rem;
  font-weight: 650;
  margin-bottom: 1.5rem;
}

.erp-auth label:not(.form-check-label) {
  color: #454b57;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.erp-auth .form-control {
  border-color: #cfd5dc;
  border-radius: 0.375rem;
  min-height: 2.5rem;
}

.erp-auth .form-control:focus {
  border-color: rgba(88, 86, 214, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(88, 86, 214, 0.12);
}

.erp-auth .btn {
  border-radius: 0.375rem;
  font-weight: 600;
  min-height: 2.5rem;
}
