html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.btn {
  border-radius: 0.85rem;
}

.form-control,
.form-select,
.input-group-text {
  border-radius: 0.8rem;
}

.erp-lookup-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.erp-lookup-select {
  position: relative;
  width: 100%;
}

.erp-lookup-select-in-group {
  flex: 1 1 auto;
  min-width: 0;
}

.erp-lookup-control {
  display: flex;
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.8rem;
  background: #fff;
  color: #1d3748;
  text-align: left;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.erp-lookup-select-in-group .erp-lookup-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.erp-lookup-select-sm .erp-lookup-control {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.65rem;
}

.erp-lookup-control:focus,
.erp-lookup-select.is-open .erp-lookup-control {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(37, 140, 251, 0.25);
}

.erp-lookup-native.is-invalid + .erp-lookup-select .erp-lookup-control,
.was-validated .erp-lookup-native:invalid + .erp-lookup-select .erp-lookup-control {
  border-color: #dc3545;
}

.erp-lookup-control.disabled,
.erp-lookup-control:disabled {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 1;
}

.erp-lookup-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-lookup-value.is-placeholder {
  color: #6c757d;
}

.erp-lookup-chevron {
  flex: 0 0 auto;
  color: #516879;
  font-size: 0.85rem;
  transition: transform 0.15s ease;
}

.erp-lookup-select.is-open .erp-lookup-chevron {
  transform: rotate(180deg);
}

.erp-lookup-panel {
  display: none;
  position: absolute;
  z-index: 1080;
  inset: calc(100% + 0.25rem) 0 auto 0;
  min-width: 18rem;
  padding: 0.55rem;
  border: 1px solid rgba(167, 198, 219, 0.75);
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 43, 77, 0.16);
}

.erp-lookup-select.is-open .erp-lookup-panel {
  display: block;
}

.erp-lookup-search {
  margin-bottom: 0.5rem;
}

.erp-lookup-options {
  max-height: 7.95rem;
  overflow-y: auto;
  border: 1px solid rgba(167, 198, 219, 0.45);
  border-radius: 0.75rem;
}

.erp-lookup-option {
  display: block;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-bottom: 1px solid rgba(167, 198, 219, 0.35);
  background: #fff;
  color: #173d54;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-lookup-option:last-child {
  border-bottom: 0;
}

.erp-lookup-option:hover,
.erp-lookup-option:focus,
.erp-lookup-option[aria-selected="true"] {
  background: rgba(28, 150, 188, 0.08);
  outline: 0;
}

.erp-lookup-empty {
  padding: 0.75rem 0.65rem;
  color: #6c7d89;
  font-size: 0.9rem;
}

.erp-lookup-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.55rem;
  margin-top: 0.55rem;
  border-top: 1px solid rgba(167, 198, 219, 0.45);
}

.erp-lookup-full-modal .modal-content {
  border: 1px solid rgba(167, 198, 219, 0.72);
  border-radius: 1rem;
  box-shadow: 0 26px 80px rgba(15, 43, 77, 0.22);
}

.erp-lookup-full-table-wrap {
  border: 1px solid rgba(167, 198, 219, 0.45);
}

.erp-lookup-full-modal tbody td {
  vertical-align: middle;
}

.erp-article-inline-drilldown {
  position: absolute;
  z-index: 1080;
  width: 420px;
  max-width: calc(100vw - 2rem);
}

.card-soft .card-header {
  border-bottom: 1px solid rgba(28, 150, 188, 0.10);
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.04) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.card-soft .card-body {
  position: relative;
}

.table thead.table-light th {
  border-bottom-color: rgba(28, 150, 188, 0.14);
}

.alert {
  border-radius: 1rem;
}

.table-responsive {
  border-radius: 1rem;
}

.form-label {
  font-weight: 700;
  color: #24485d;
}

.form-text {
  color: #657b8b;
}

.erp-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.erp-page-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.35rem;
  font-weight: 800;
  color: var(--erp-ink);
  letter-spacing: -0.02em;
}

.erp-page-title-icon {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.14) 0%, rgba(28, 150, 188, 0.08) 100%);
  color: var(--erp-primary);
  box-shadow: inset 0 0 0 1px rgba(28, 150, 188, 0.12);
}

.erp-page-subtitle {
  max-width: 44rem;
  color: #61748b;
}

.erp-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.approval-conditions-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.approval-condition-row {
  padding: 0.95rem 1rem !important;
  border-color: rgba(28, 150, 188, 0.16) !important;
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.04) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.approval-condition-row .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.79rem;
}

.approval-condition-remove-col {
  display: flex;
  align-items: flex-end;
}

.approval-condition-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 7rem;
  min-height: 2.35rem;
  white-space: nowrap;
}

.approval-process-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.approval-process-chip {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(28, 150, 188, 0.18);
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.05) 0%, rgba(255, 255, 255, 0.98) 100%);
  color: #24485d;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.approval-process-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 150, 188, 0.34);
  box-shadow: 0 10px 28px rgba(36, 72, 93, 0.08);
  color: #16384d;
}

.approval-process-chip.is-active {
  border-color: rgba(20, 125, 165, 0.55);
  box-shadow: 0 14px 34px rgba(19, 127, 168, 0.12);
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.10) 0%, rgba(255, 255, 255, 1) 100%);
}

.approval-process-chip-title {
  font-weight: 800;
  font-size: 1rem;
}

.approval-process-chip-meta {
  font-size: 0.86rem;
  color: #5b7182;
  min-height: 2.4em;
}

.approval-process-chip-state {
  display: flex;
  align-items: center;
}

.approval-flow-stat-card {
  height: 100%;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(28, 150, 188, 0.14);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(36, 72, 93, 0.05);
}

.approval-flow-stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a8191;
  margin-bottom: 0.3rem;
}

.approval-flow-stat-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: #183e54;
}

.approval-flow-config-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(28, 150, 188, 0.12);
}

.approval-flow-config-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1c96bc;
  margin-bottom: 0.35rem;
}

.approval-flow-config-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #173d54;
}

.approval-flow-config-text {
  max-width: 760px;
  color: #5e7484;
}

.approval-flow-config-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.erp-action-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.erp-action-row > form {
  margin: 0;
}

.erp-actions-dropdown .dropdown-menu {
  min-width: 15.5rem;
}

.erp-actions-dropdown .dropdown-menu form {
  margin: 0;
}

.erp-actions-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.1rem;
}

.erp-document-sections {
    display: block;
    margin-bottom: 1rem;
}

.erp-document-section {
    margin-bottom: 1rem;
    padding: 0;
}

.erp-document-section-title {
    display: none;
}

.erp-document-field-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.erp-document-field-grid > div {
    min-width: 0;
    padding: 0.7rem 0.85rem 0.8rem;
    border: 1px solid rgba(167, 198, 219, 0.72);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 251, 255, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.erp-document-field--wide {
    grid-column: 1 / -1;
}

.erp-document-label {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b8292;
    letter-spacing: 0.01em;
}

.erp-document-value {
    display: block;
    color: #173d54;
    font-weight: 400;
    line-height: 1.45;
    word-break: break-word;
    font-size: 0.97rem;
}

.erp-document-value.is-success {
  color: #0c8d57;
}

.erp-document-value.is-warning {
  color: #d48a00;
}

.erp-document-value.is-danger {
  color: #cf4a40;
}

.erp-document-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
}

.erp-document-table {
  min-width: 1120px;
}

.erp-document-table.erp-document-table-wide {
  min-width: 1380px;
}

.erp-document-table th,
.erp-document-table td {
  white-space: nowrap;
}

.erp-document-table .erp-cell-wrap {
  min-width: 220px;
  white-space: normal;
}

.erp-document-table .erp-cell-wrap-sm {
  min-width: 160px;
  white-space: normal;
}

.erp-sales-lines-table .erp-lines-col-warehouse {
  min-width: 15rem;
}

.erp-sales-lines-table .erp-lines-col-unit {
  min-width: 11rem;
}

.erp-sales-lines-table .erp-lines-col-factor {
  min-width: 10.5rem;
}

.erp-sales-lines-table .erp-lines-col-price-source {
  min-width: 15rem;
}

.erp-sales-lines-table .erp-lines-col-warehouse .form-select,
.erp-sales-lines-table .erp-lines-col-unit .form-select,
.erp-sales-lines-table .erp-lines-col-factor .form-control,
.erp-sales-lines-table .erp-lines-col-price-source .form-select {
  min-width: 100%;
}

.erp-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.erp-summary-column {
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.erp-summary-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.28rem;
    align-items: start;
    min-width: 0;
    padding: 0.7rem 0.85rem 0.8rem;
    border: 1px solid rgba(167, 198, 219, 0.72);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 251, 255, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.erp-summary-item.is-wide {
  grid-column: 1 / -1;
}

.erp-summary-key {
    color: #6b8292;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.erp-summary-val {
    color: #173d54;
    font-weight: 400;
    line-height: 1.45;
    min-width: 0;
    word-break: break-word;
    font-size: 0.97rem;
}

.erp-summary-val.is-success {
  color: #0c8d57;
}

.erp-summary-val.is-warning {
  color: #d48a00;
}

.erp-summary-val.is-danger {
  color: #cf4a40;
}

.erp-summary-note {
    margin-top: 0.95rem;
    padding: 0.8rem 0.95rem 0.9rem;
    border: 1px solid rgba(167, 198, 219, 0.65);
    border-radius: 0.95rem;
    background: rgba(250, 252, 255, 0.96);
}

.erp-summary-note .erp-summary-key {
  display: block;
  margin-bottom: 0.35rem;
}

.erp-summary-note .erp-summary-val {
  display: block;
}

@media (max-width: 767.98px) {
  .erp-document-field-grid {
      grid-template-columns: minmax(0, 1fr);
  }

  .erp-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-order-totals-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-summary-item {
      gap: 0.2rem;
    }

  .erp-summary-key {
    white-space: normal;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .erp-document-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-order-totals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.erp-action-row .btn {
  margin: 0;
  white-space: nowrap;
}

.erp-action-cell {
  white-space: nowrap;
}

.erp-action-cell > form,
.erp-action-cell > a,
.erp-action-cell > button {
  display: inline-flex;
  vertical-align: middle;
  margin: 0;
}

.erp-action-cell > form {
  margin-bottom: 0;
}

.erp-document-lines-table {
  min-width: 1120px;
}

.erp-document-lines-table-wide {
  min-width: 1380px;
}

.erp-lines-dropdown-host {
  overflow-y: visible;
}

.erp-lines-dropdown-host .position-relative {
  overflow: visible;
}

.erp-document-lines-table thead th {
  white-space: nowrap;
  font-weight: 700;
}

.erp-document-lines-table td {
  vertical-align: middle;
}

.erp-document-lines-table .form-control-sm,
.erp-document-lines-table .form-select-sm {
  min-width: 7rem;
}

.erp-line-entry-grid {
  align-items: start;
}

.erp-line-entry-grid .form-text {
  min-height: 2.5em;
}

.erp-order-totals-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.erp-order-total-item {
  min-width: 0;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(167, 198, 219, 0.72);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 251, 255, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.erp-order-total-item.is-total {
  border-color: rgba(25, 135, 84, 0.24);
  background: linear-gradient(180deg, rgba(242, 255, 248, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.erp-line-add-btn {
  min-width: 11rem;
}

.erp-series-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(28, 150, 188, 0.14);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.03) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 10px 24px rgba(15, 43, 77, 0.04);
}

.erp-series-summary-icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.9rem;
  font-size: 1rem;
  flex: 0 0 auto;
}

.erp-series-summary-icon.internal {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.erp-series-summary-icon.fiscal {
  background: rgba(255, 193, 7, 0.18);
  color: #8a6800;
}

.erp-series-summary-icon.neutral {
  background: rgba(108, 117, 125, 0.12);
  color: #53616f;
}

.erp-series-summary-icon.success {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.erp-series-summary-value {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--erp-ink);
}

.erp-series-summary-label {
  margin-top: 0.2rem;
  font-weight: 700;
  color: #24485d;
}

.erp-series-summary-help {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #6a7d8f;
}

.erp-series-legend {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(28, 150, 188, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
}

.erp-series-legend-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #5f7286;
  font-size: 0.92rem;
}

.erp-series-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  height: 100%;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(28, 150, 188, 0.14);
  background: #fff;
}

.erp-series-mode-card.internal {
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
}

.erp-series-mode-card.fiscal {
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.07) 0%, rgba(255, 255, 255, 1) 100%);
}

.erp-series-mode-icon {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  background: rgba(28, 150, 188, 0.12);
  color: var(--erp-primary);
  flex: 0 0 auto;
}

.erp-series-current-help {
  padding: 0.95rem 1rem;
  border: 1px dashed rgba(28, 150, 188, 0.22);
  border-radius: 1rem;
  background: rgba(28, 150, 188, 0.03);
}

.erp-series-inline-warning {
  font-weight: 600;
}

.erp-subnav-shell {
  margin-bottom: 1rem;
}

.erp-subnav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-start;
}

.erp-subnav-group {
  position: relative;
}

.erp-subnav-group > summary {
  list-style: none;
  cursor: pointer;
}

.erp-subnav-group > summary::-webkit-details-marker {
  display: none;
}

.erp-subnav-btn,
.erp-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.68rem 1rem;
  border: 1px solid rgba(28, 150, 188, 0.22);
  border-radius: 0.9rem;
  background: #fff;
  color: var(--erp-primary-deep);
  text-decoration: none;
  transition: all 0.18s ease;
}

.erp-subnav-btn {
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 43, 77, 0.04);
}

.erp-subnav-link {
  justify-content: flex-start;
  width: 100%;
  font-weight: 500;
  color: var(--erp-secondary);
  white-space: normal;
  text-align: left;
}

.erp-subnav-btn:hover,
.erp-subnav-btn.active,
.erp-subnav-group[open] > .erp-subnav-btn,
.erp-subnav-link:hover,
.erp-subnav-link.active {
  color: var(--erp-primary-deep);
  border-color: rgba(28, 150, 188, 0.34);
  background: rgba(28, 150, 188, 0.1);
}

.erp-subnav-btn i,
.erp-subnav-link i {
  color: var(--erp-primary);
}

.erp-subnav-group > .erp-subnav-btn::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 0.2rem;
  font-size: 0.8rem;
}

.erp-subnav-group[open] > .erp-subnav-btn::after {
  content: "\f077";
}

.erp-subnav-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: 18rem;
  max-width: min(32rem, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.6rem;
  padding: 0.95rem;
  border: 1px solid rgba(28, 150, 188, 0.16);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 40px rgba(12, 37, 63, 0.12);
  z-index: 1400;
}

@media (max-width: 991.98px) {
  .approval-condition-remove {
    width: 100%;
    min-width: 100%;
  }

  .erp-subnav-group {
    width: 100%;
  }

  .erp-subnav-btn {
    width: 100%;
    justify-content: flex-start;
  }

  .erp-subnav-menu {
    position: static;
    min-width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
    grid-template-columns: 1fr;
  }
}

.erp-flow-card {
  border: 1px solid rgba(28, 150, 188, 0.16);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 28px rgba(12, 37, 63, 0.06);
}

.erp-flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.erp-flow-title {
  font-weight: 700;
  color: var(--erp-primary-deep);
}

.erp-flow-subtitle {
  color: #61748b;
  font-size: 0.92rem;
}

.erp-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.85rem;
}

.erp-flow-step {
  position: relative;
  min-height: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(28, 150, 188, 0.14);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.05) 0%, rgba(255,255,255,0.96) 100%);
}

.erp-flow-step::before {
  content: attr(data-step);
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(15, 43, 77, 0.35);
}

.erp-flow-step-title {
  font-weight: 700;
  color: var(--erp-primary-deep);
  margin-bottom: 0.3rem;
  padding-right: 2rem;
}

.erp-flow-step-text {
  color: #61748b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.erp-flow-step-state {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.erp-flow-step-state.pending {
  background: rgba(245, 158, 11, 0.14);
  color: #a16207;
}

.erp-flow-step-state.active {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.erp-flow-step-state.done {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.erp-flow-step-state.blocked {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.master-photo-frame {
  width: 168px;
  height: 168px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 150, 188, 0.08), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(28, 150, 188, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.master-photo-frame-sm {
  width: 128px;
  height: 128px;
}

.master-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.master-photo-placeholder {
  color: #6c7a89;
  font-size: 2rem;
}

.erp-table-action-cell {
  min-width: 13rem;
}

.erp-table-action-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
}

.erp-table-action-stack > a,
.erp-table-action-stack > form {
  margin: 0;
}

.erp-table-action-stack > a {
  grid-column: 1 / -1;
}

.erp-table-action-stack .btn {
  width: 100%;
  white-space: nowrap;
  border-radius: 0.85rem;
}

.erp-action-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.erp-action-icon-btn i {
  margin: 0 !important;
  font-size: 0.95rem;
}

.articles-index-table {
  table-layout: fixed;
}

.articles-index-table td,
.articles-index-table th {
  vertical-align: middle;
}

.articles-index-text {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.articles-index-abc-badge {
  min-width: 2rem;
  text-align: center;
}

.btn.erp-action-type-view {
  color: #5f6b7a;
  background-color: #fff;
  border-color: #b8c3d1;
}

.btn.erp-action-type-view:hover,
.btn.erp-action-type-view:focus,
.btn.erp-action-type-view:active {
  color: #fff;
  background-color: #5f6b7a;
  border-color: #5f6b7a;
  box-shadow: none;
}

.btn.erp-action-type-edit {
  color: #2563eb;
  background-color: #fff;
  border-color: #60a5fa;
}

.btn.erp-action-type-edit:hover,
.btn.erp-action-type-edit:focus,
.btn.erp-action-type-edit:active {
  color: #fff;
  background-color: #2563eb;
  border-color: #2563eb;
  box-shadow: none;
}

.btn.erp-action-type-delete {
  color: #dc2626;
  background-color: #fff;
  border-color: #f87171;
}

.btn.erp-action-type-delete:hover,
.btn.erp-action-type-delete:focus,
.btn.erp-action-type-delete:active {
  color: #fff;
  background-color: #dc2626;
  border-color: #dc2626;
  box-shadow: none;
}

.btn.erp-action-type-block {
  color: #b45309;
  background-color: #fff;
  border-color: #fbbf24;
}

.btn.erp-action-type-block:hover,
.btn.erp-action-type-block:focus,
.btn.erp-action-type-block:active {
  color: #fff;
  background-color: #b45309;
  border-color: #b45309;
  box-shadow: none;
}

.erp-summary-list-table .erp-list-secondary-hidden {
  display: none !important;
}
.erp-general-table-search {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 .85rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(28, 150, 188, .12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 12px 28px rgba(15, 43, 77, .06);
}

.erp-general-table-search-field {
    flex: 1 1 28rem;
}

.erp-general-table-search .input-group-text {
    background: #fff;
}

.erp-general-table-search-count {
    white-space: nowrap;
    padding-bottom: .45rem;
}

@media (max-width: 768px) {
    .erp-general-table-search {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-general-table-search-count {
        padding-bottom: 0;
    }
}
