:root {
  --erp-ink: #172033;
  --erp-muted: #5f6f85;
  --erp-line: #dce4ee;
  --erp-surface: #ffffff;
  --erp-ground: #f3f6fa;
  --erp-blue: #2463c5;
  --erp-blue-dark: #184a97;
  --erp-blue-soft: #eaf2ff;
  --erp-green: #19704b;
  --erp-green-soft: #e8f7ef;
  --erp-amber: #9a6500;
  --erp-amber-soft: #fff6dd;
  --erp-red: #b42318;
  --erp-red-soft: #fff0ef;
  --erp-shadow: 0 10px 28px rgba(24, 42, 70, 0.08);
}

body.erp-admin-page {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--erp-ground);
  color: var(--erp-ink);
}

.erp-admin-page *,
.erp-admin-page *::before,
.erp-admin-page *::after {
  box-sizing: border-box;
}

.erp-admin-page button,
.erp-admin-page input,
.erp-admin-page select,
.erp-admin-page textarea {
  font: inherit;
}

.erp-admin-page button,
.erp-admin-page a {
  -webkit-tap-highlight-color: transparent;
}

.erp-admin-page .content-wrapper {
  padding: 30px;
  background: var(--erp-ground);
}

.erp-page {
  width: 100%;
  max-width: 1380px;
  min-width: 0;
  margin: 0 auto;
  padding-top: 0;
}

.erp-page h1,
.erp-page h2,
.erp-page h3,
.erp-page p {
  overflow-wrap: anywhere;
}

.erp-skip-link {
  position: fixed;
  z-index: 3000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--erp-blue-dark);
  transform: translateY(-180%);
}

.erp-skip-link:focus {
  transform: translateY(0);
}

.erp-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(120deg, #183d70, #255ca5);
  box-shadow: var(--erp-shadow);
}

.erp-hero-copy {
  min-width: 0;
}

.erp-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #cfe0fb;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.erp-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  letter-spacing: -0.045em;
}

.erp-hero p {
  max-width: 780px;
  margin: 0;
  color: #e2ecff;
  line-height: 1.65;
}

.erp-hero-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.erp-button,
.erp-link-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.erp-button:disabled,
.erp-link-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.erp-button.primary,
.erp-link-button.primary {
  color: #fff;
  background: var(--erp-blue);
}

.erp-button.primary:hover,
.erp-link-button.primary:hover {
  background: var(--erp-blue-dark);
}

.erp-hero .erp-button.primary,
.erp-hero .erp-link-button.primary {
  color: #163e72;
  background: #fff;
}

.erp-button.secondary,
.erp-link-button.secondary {
  color: #174c99;
  border-color: #c9dcfa;
  background: var(--erp-blue-soft);
}

.erp-button.soft,
.erp-link-button.soft {
  color: #3c506c;
  border-color: #cbd6e3;
  background: #fff;
}

.erp-button.danger,
.erp-link-button.danger {
  color: var(--erp-red);
  border-color: #fec9c4;
  background: var(--erp-red-soft);
}

.erp-text-button {
  min-height: 40px;
  padding: 8px;
  border: 0;
  color: var(--erp-blue);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.erp-section {
  margin-top: 28px;
}

.erp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}

.erp-section-head h2 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.025em;
}

.erp-section-head p {
  margin: 5px 0 0;
  color: var(--erp-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.erp-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--erp-line);
  border-radius: 16px;
  background: var(--erp-surface);
  box-shadow: 0 4px 16px rgba(29, 49, 78, 0.04);
}

.erp-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #d8e2ed;
  border-left: 4px solid #91a6bd;
  border-radius: 10px;
  color: #405169;
  background: #f4f7fb;
  font-size: 0.92rem;
  line-height: 1.55;
}

.erp-notice + .erp-notice {
  margin-top: 10px;
}

.erp-notice.warn {
  color: #74510b;
  border-color: #f0d28a;
  border-left-color: #e2a626;
  background: var(--erp-amber-soft);
}

.erp-notice.success {
  color: #175f3f;
  border-color: #a9dbbf;
  border-left-color: #2e9d67;
  background: var(--erp-green-soft);
}

.erp-notice.error {
  color: #9c221b;
  border-color: #fec9c4;
  border-left-color: #db5b50;
  background: var(--erp-red-soft);
}

.erp-notice strong {
  color: inherit;
}

.erp-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.erp-metric {
  min-width: 0;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--erp-line);
  border-radius: 14px;
  background: var(--erp-surface);
}

.erp-metric .metric-label {
  color: var(--erp-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.erp-metric .metric-value {
  margin: 7px 0 3px;
  color: var(--erp-ink);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 850;
  letter-spacing: -0.045em;
}

.erp-metric .metric-hint {
  color: var(--erp-muted);
  font-size: 0.81rem;
  line-height: 1.4;
}

.erp-metric.warn {
  border-color: #f0d28a;
  background: #fffdfa;
}

.erp-metric.warn .metric-value {
  color: var(--erp-amber);
}

.erp-metric.ok {
  border-color: #b9e6cb;
  background: #fbfefc;
}

.erp-metric.ok .metric-value {
  color: var(--erp-green);
}

.erp-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.erp-action-card {
  display: flex;
  min-width: 0;
  min-height: 118px;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--erp-line);
  border-radius: 14px;
  color: var(--erp-ink);
  background: #fff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.erp-action-card:hover,
.erp-action-card:focus-visible,
.erp-action-card.selected {
  border-color: #78a7eb;
  background: #fbfdff;
  box-shadow: 0 8px 22px rgba(36, 99, 197, 0.12);
}

.erp-action-card .action-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
  border-radius: 9px;
  color: var(--erp-blue);
  background: var(--erp-blue-soft);
}

.erp-action-card strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

.erp-action-card small {
  color: var(--erp-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.erp-search-card {
  padding: 18px;
}

.erp-search-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.erp-search-grid.compact {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.erp-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.erp-field label,
.erp-field .field-label {
  color: var(--erp-ink);
  font-size: 0.87rem;
  font-weight: 800;
}

.erp-field input,
.erp-field select,
.erp-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd6e3;
  border-radius: 9px;
  color: var(--erp-ink);
  background: #fff;
}

.erp-field textarea {
  min-height: 92px;
  resize: vertical;
}

.erp-field input:focus,
.erp-field select:focus,
.erp-field textarea:focus {
  border-color: #5e94de;
  outline: 3px solid #dceaff;
}

.erp-field input[readonly] {
  color: #4d5f76;
  background: #f3f6fa;
}

.erp-field-help {
  color: var(--erp-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.erp-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  color: var(--erp-muted);
  font-size: 0.86rem;
}

.erp-result-line strong {
  color: var(--erp-ink);
}

.erp-browser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.erp-list-panel,
.erp-detail-panel {
  min-width: 0;
}

.erp-detail-panel {
  position: sticky;
  top: 20px;
}

.erp-table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
}

.erp-table th,
.erp-table td {
  padding: 13px 11px;
  border-bottom: 1px solid #e7edf4;
  text-align: left;
  vertical-align: middle;
}

.erp-table th {
  color: #607086;
  background: #f6f8fb;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.erp-table td {
  font-size: 0.91rem;
}

.erp-table tbody tr {
  cursor: pointer;
}

.erp-table tbody tr:hover,
.erp-table tbody tr.selected {
  background: #f4f8ff;
}

.erp-table tbody tr.selected {
  box-shadow: inset 4px 0 0 var(--erp-blue);
}

.erp-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.erp-table .table-action {
  text-align: right;
}

.erp-item-name {
  display: -webkit-box;
  height: 2.7em;
  min-height: 2.7em;
  overflow: hidden;
  color: var(--erp-ink);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.erp-item-sub {
  display: block;
  margin-top: 4px;
  color: var(--erp-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.erp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #d4deea;
  border-radius: 999px;
  color: #465970;
  background: #f4f7fb;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.erp-badge.ok {
  color: var(--erp-green);
  border-color: #b9e6cb;
  background: var(--erp-green-soft);
}

.erp-badge.warn {
  color: var(--erp-amber);
  border-color: #efd38d;
  background: var(--erp-amber-soft);
}

.erp-badge.error {
  color: var(--erp-red);
  border-color: #fec9c4;
  background: var(--erp-red-soft);
}

.erp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 18px;
}

.erp-pagination span {
  min-width: 82px;
  color: var(--erp-muted);
  text-align: center;
  font-size: 0.86rem;
  font-weight: 800;
}

.erp-mobile-list {
  display: none;
}

.erp-mobile-card {
  padding: 15px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: #fff;
}

.erp-mobile-card + .erp-mobile-card {
  margin-top: 9px;
}

.erp-mobile-card.selected {
  border-color: #78a7eb;
  box-shadow: inset 4px 0 0 var(--erp-blue);
}

.erp-mobile-card button.card-select {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.erp-mobile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.erp-mobile-stat {
  min-width: 0;
  color: var(--erp-muted);
  font-size: 0.74rem;
}

.erp-mobile-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--erp-ink);
  font-size: 0.9rem;
}

.erp-empty,
.erp-loading {
  padding: 26px 18px;
  border-radius: 11px;
  color: var(--erp-muted);
  background: #f8fafc;
  text-align: center;
  line-height: 1.55;
}

.erp-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--erp-ink);
}

.erp-empty .erp-button,
.erp-empty .erp-link-button {
  margin-top: 13px;
}

.erp-detail-empty {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.erp-item-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.erp-item-photo {
  display: flex;
  width: 112px;
  height: 112px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--erp-line);
  border-radius: 13px;
  color: #8190a3;
  background: #f4f7fb;
}

.erp-item-photo img {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}

.erp-item-photo i {
  font-size: 2rem;
}

.erp-detail-title {
  min-width: 0;
}

.erp-detail-title h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.erp-detail-title p {
  margin: 0;
  color: var(--erp-muted);
  line-height: 1.45;
}

.erp-detail-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.erp-quantity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.erp-quantity-card {
  padding: 13px;
  border: 1px solid var(--erp-line);
  border-radius: 11px;
  background: #fbfcfe;
}

.erp-quantity-card .quantity-label {
  color: var(--erp-muted);
  font-size: 0.78rem;
}

.erp-quantity-card .quantity-value {
  margin-top: 5px;
  font-size: 1.18rem;
  font-weight: 850;
}

.erp-subsection {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid #e8edf3;
}

.erp-subsection h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.erp-location-list,
.erp-history-list,
.erp-candidate-list,
.erp-draft-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.erp-location-row,
.erp-history-row,
.erp-draft-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #e3eaf2;
  border-radius: 10px;
  background: #fff;
}

.erp-location-row strong,
.erp-history-row strong {
  display: block;
}

.erp-location-row small,
.erp-history-row small,
.erp-draft-row small {
  display: block;
  margin-top: 3px;
  color: var(--erp-muted);
  line-height: 1.4;
}

.erp-history-row .history-value {
  color: var(--erp-ink);
  font-weight: 850;
  white-space: nowrap;
}

.erp-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.erp-spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.erp-spec-list li {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.88rem;
}

.erp-spec-list li:last-child {
  border-bottom: 0;
}

.erp-spec-list b {
  color: var(--erp-muted);
}

.erp-workbench {
  margin-top: 18px;
  border: 2px solid #a7c7f4;
}

.erp-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.erp-workbench-head h2 {
  margin: 0 0 5px;
  font-size: 1.3rem;
}

.erp-workbench-head p {
  margin: 0;
  color: var(--erp-muted);
  line-height: 1.5;
}

.erp-steps {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.erp-step-chip {
  padding: 7px 10px;
  border-radius: 999px;
  color: #66768b;
  background: #edf2f8;
  font-size: 0.8rem;
  font-weight: 800;
}

.erp-step-chip.active {
  color: #184a97;
  background: #dceaff;
}

.erp-step-card {
  margin-top: 11px;
  padding: 18px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
}

.erp-step-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
  font-size: 1.02rem;
  font-weight: 850;
}

.erp-step-number {
  display: inline-flex;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #1958ae;
  background: #e3eefc;
  font-size: 0.84rem;
}

.erp-help {
  margin: 0;
  color: var(--erp-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.erp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.erp-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.erp-category-fieldset {
  display: block;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.erp-category-fieldset > legend {
  margin: 0 0 6px;
  padding: 0;
  color: var(--erp-ink);
  font-size: 0.87rem;
  font-weight: 800;
}

.erp-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.erp-category-fieldset > .erp-field-help {
  display: block;
  margin-top: 7px;
}

.erp-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--erp-line);
  border-radius: 10px;
  color: var(--erp-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.erp-candidate:hover,
.erp-candidate:focus-visible,
.erp-candidate.selected {
  border-color: #78a7eb;
  background: #f7faff;
}

.erp-candidate strong,
.erp-candidate small {
  display: block;
}

.erp-candidate small {
  margin-top: 4px;
  color: var(--erp-muted);
  line-height: 1.35;
}

.erp-master-similarity {
  display: block;
  min-height: 46px;
}

.erp-master-similarity > i {
  margin-right: 7px;
}

.erp-master-similarity > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.erp-master-match-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.erp-master-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(154, 101, 0, 0.25);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.erp-master-match strong,
.erp-master-match small {
  display: block;
}

.erp-master-match small {
  margin-top: 4px;
  color: #74510b;
  line-height: 1.4;
}

.erp-master-match .erp-master-conflict {
  color: var(--erp-red);
  font-weight: 800;
}

@media (max-width: 720px) {
  .erp-master-match {
    align-items: stretch;
    flex-direction: column;
  }

  .erp-master-match .erp-inline-actions {
    margin-top: 3px;
  }
}

.erp-review {
  padding: 15px;
  border: 1px solid #dbe5f1;
  border-radius: 11px;
  background: #f5f8fc;
  line-height: 1.65;
}

.erp-review-list {
  margin: 9px 0 0;
  padding-left: 19px;
}

.erp-review-list li + li {
  margin-top: 6px;
}

.erp-kv-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(0, 1.25fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.erp-kv-row input {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd6e3;
  border-radius: 9px;
}

.erp-detail-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 15px 0 0;
}

.erp-tab {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd6e3;
  border-radius: 9px;
  color: #405169;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.erp-tab[aria-selected="true"] {
  color: #174c99;
  border-color: #8db4ea;
  background: var(--erp-blue-soft);
}

.erp-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #3f526a;
  background: #edf2f7;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.erp-source-badge.ocr {
  color: #174c99;
  background: var(--erp-blue-soft);
}

.erp-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.erp-price-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e7edf4;
}

.erp-price-row:last-child {
  border-bottom: 0;
}

.erp-price-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.erp-price-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--erp-blue);
}

.erp-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
}

.erp-checkbox input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.erp-hidden {
  display: none !important;
}

.erp-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.erp-table tr[data-item-id]:focus-visible {
  outline: 3px solid rgba(36, 99, 197, 0.35);
  outline-offset: -3px;
}

.sidebar-toggle-btn .menu-label {
  font-size: 0.85rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .erp-action-grid,
  .erp-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .erp-detail-panel {
    position: static;
  }
}

@media (max-width: 992px) {
  .erp-admin-page .content-wrapper {
    padding: 18px;
  }

  .erp-hero {
    padding: 24px 74px 24px 22px;
  }

  .sidebar-toggle-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    border-radius: 9px;
  }
}

@media (max-width: 720px) {
  .erp-admin-page .content-wrapper {
    padding: 12px;
  }

  .erp-hero {
    display: block;
    padding: 22px 104px 22px 18px;
    border-radius: 14px;
  }

  .erp-hero-actions {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .erp-hero-actions .erp-button,
  .erp-hero-actions .erp-link-button {
    width: 100%;
  }

  .erp-section {
    margin-top: 22px;
  }

  .erp-section-head {
    display: block;
  }

  .erp-section-head > .erp-text-button,
  .erp-section-head > .erp-button,
  .erp-section-head > .erp-link-button {
    width: 100%;
    margin-top: 9px;
  }

  .erp-metric-grid,
  .erp-action-grid,
  .erp-search-grid,
  .erp-search-grid.compact,
  .erp-form-grid,
  .erp-form-grid.three,
  .erp-category-grid,
  .erp-price-grid,
  .erp-quantity-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-action-card {
    min-height: 106px;
  }

  .erp-card {
    padding: 16px;
  }

  .erp-table-wrap.desktop-only {
    display: none;
  }

  .erp-mobile-list {
    display: block;
  }

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

  .erp-item-hero {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .erp-item-photo {
    width: 82px;
    height: 82px;
  }

  .erp-location-row,
  .erp-history-row,
  .erp-draft-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-history-row .history-value {
    white-space: normal;
  }

  .erp-form-grid .erp-field,
  .erp-field.full {
    grid-column: auto;
  }

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

  .erp-workbench-head {
    display: block;
  }

  .erp-workbench-head .erp-text-button {
    width: 100%;
    margin-top: 8px;
  }

  .erp-button,
  .erp-link-button,
  .erp-field input,
  .erp-field select,
  .erp-field textarea,
  .erp-kv-row input {
    min-height: 48px;
  }

  .erp-inline-actions .erp-button,
  .erp-inline-actions .erp-link-button {
    flex: 1 1 150px;
  }

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

  .erp-price-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .sidebar-toggle-btn {
    top: 12px;
    right: 12px;
    min-height: 44px;
    padding: 10px 12px;
  }
}

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

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

}
.erp-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:12px}.erp-image-card{border:1px solid var(--erp-line,#dbe5f1);border-radius:12px;padding:10px;background:#fff}.erp-image-card img{display:block;width:100%;height:120px;object-fit:contain;background:#f6f8fb;border-radius:8px;margin-bottom:8px}.erp-inline-input{min-height:40px;border:1px solid #cbd6e3;border-radius:8px;padding:8px;max-width:130px}.erp-image-card .erp-inline-actions{margin-top:8px}
.selection-column{width:42px;text-align:center!important}.selection-column input{width:18px;height:18px;accent-color:var(--erp-blue)}
.erp-mobile-merge-select{display:flex;align-items:center;gap:8px;margin:0 0 8px;color:var(--erp-muted);font-size:.82rem;font-weight:700}.erp-mobile-merge-select input{width:18px;height:18px;accent-color:var(--erp-blue)}
.erp-merge-groups{display:grid;gap:14px;margin:14px 0}.erp-merge-group{border:1px solid #dbe5f1;border-radius:12px;overflow:hidden;background:#fff}.erp-merge-group-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:14px;background:#f6f8fb}.erp-merge-group-head strong{display:block;font-size:1rem}.erp-merge-group-head small,.erp-merge-item small{display:block;margin-top:5px;color:var(--erp-muted);line-height:1.5}.erp-merge-representative{min-width:235px}.erp-merge-representative span{display:block;margin-bottom:5px;font-size:.78rem;font-weight:800;color:var(--erp-muted)}.erp-merge-representative select{width:100%;min-height:40px;border:1px solid #cbd6e3;border-radius:8px;background:#fff;padding:7px}.erp-merge-item-list{padding:0 14px}.erp-merge-item{display:flex;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid #edf2f7}.erp-merge-item:last-child{border-bottom:0}.erp-merge-item strong{font-size:.9rem}.erp-merge-policy{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end;color:var(--erp-muted);font-size:.78rem}.erp-merge-policy label{display:inline-flex;align-items:center;gap:4px;color:#3c506c;font-weight:700}.erp-merge-policy input{accent-color:var(--erp-blue)}
.erp-inventory-item-primary{display:flex;align-items:center;gap:10px;min-width:0}.erp-inventory-item-primary>div{min-width:0}.erp-inventory-item-image{display:block;width:38px;height:38px;flex:0 0 38px;object-fit:contain;border:1px solid var(--erp-line,#dbe5f1);border-radius:8px;background:#f6f8fb}
@media(max-width:640px){.erp-merge-group-head,.erp-merge-item{display:block}.erp-merge-representative{min-width:0;margin-top:12px}.erp-merge-policy{justify-content:flex-start;margin-top:10px}.erp-merge-policy span{width:100%}.erp-inline-actions#inventorySelectionActions{display:block}.erp-inline-actions#inventorySelectionActions .erp-field-help{display:block;margin-bottom:8px}}
