.supplier-management-page {
  background: #edf2f7;
}

.supplier-page-header {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.supplier-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-button {
  background: #fff;
  border: 1px solid #ef9a9a;
  border-radius: 6px;
  color: #b42318;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 14px;
}

.danger-button:disabled,
.ghost-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.supplier-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
}

.supplier-summary article {
  background: #fff;
  border: 1px solid #d5e0ea;
  border-radius: 8px;
  min-height: 82px;
  padding: 14px 16px;
}

.supplier-summary span,
.supplier-summary strong {
  display: block;
}

.supplier-summary span {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}

.supplier-summary strong {
  color: #10243e;
  font-size: 26px;
}

.supplier-workbench-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(420px, .8fr) minmax(640px, 1.2fr);
}

.supplier-editor-panel,
.supplier-list-panel,
.supplier-audit-panel {
  margin: 0;
  min-width: 0;
}

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

.supplier-form label,
.supplier-search {
  display: grid;
  gap: 6px;
}

.supplier-form label > span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.supplier-form input,
.supplier-form select,
.supplier-form textarea,
.supplier-search input {
  background: #fff;
  border: 1px solid #cbd8e6;
  border-radius: 6px;
  color: #142033;
  font: inherit;
  min-height: 40px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.supplier-form textarea {
  min-height: 66px;
  resize: vertical;
}

.supplier-form input:focus,
.supplier-form select:focus,
.supplier-form textarea:focus,
.supplier-search input:focus {
  border-color: #0f766e;
  outline: 2px solid rgba(15, 118, 110, .14);
}

.supplier-form input[readonly] {
  background: #f3f6f9;
  color: #53657a;
}

.supplier-form-wide {
  grid-column: 1 / -1;
}

.supplier-form-section {
  border-top: 1px solid #dce5ee;
  margin-top: 4px;
  padding-top: 12px;
}

.supplier-form-section strong,
.supplier-form-section small {
  display: block;
}

.supplier-form-section small {
  color: #64748b;
  line-height: 1.55;
  margin-top: 3px;
}

.status-pill {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 999px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.supplier-boundary-note {
  background: #ecfdf5;
  border-left: 3px solid #0f766e;
  border-radius: 6px;
  color: #14532d;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 14px;
  padding: 10px 12px;
}

.supplier-list-head {
  align-items: center;
}

.supplier-search {
  width: min(340px, 100%);
}

.supplier-table-wrap {
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  max-height: 560px;
  overflow: auto;
}

.supplier-table {
  border-collapse: collapse;
  min-width: 940px;
  width: 100%;
}

.supplier-table th,
.supplier-table td {
  border-bottom: 1px solid #e3eaf1;
  font-size: 12px;
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.supplier-table th {
  background: #f3f6fa;
  color: #405169;
  position: sticky;
  top: 0;
  z-index: 1;
}

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

.supplier-table tbody tr:hover,
.supplier-table tbody tr.is-selected {
  background: #ecfdf8;
}

.supplier-table .empty-row {
  color: #64748b;
  padding: 34px 12px;
  text-align: center;
}

.supplier-table-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.supplier-table-status.is-active {
  background: #dcfce7;
  color: #166534;
}

.supplier-table-status.is-stopped {
  background: #fee2e2;
  color: #991b1b;
}

.supplier-table-status.is-pending {
  background: #fff7ed;
  color: #9a3412;
}

.supplier-pagination {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 12px;
  gap: 12px;
  justify-content: space-between;
  padding-top: 12px;
}

.supplier-pagination > div {
  display: flex;
  gap: 6px;
}

.supplier-audit-panel {
  margin-top: 14px;
}

.supplier-audit-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.supplier-audit-item {
  background: #f7f9fc;
  border: 1px solid #dce5ee;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: 145px minmax(140px, .7fr) minmax(220px, 1.3fr) 180px;
  padding: 9px 10px;
}

.supplier-audit-item span {
  color: #52647b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .supplier-workbench-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .supplier-management-page .app-shell {
    display: block;
  }

  .supplier-management-page .sidebar {
    display: none;
  }

  .supplier-management-page .main-panel {
    min-width: 0;
    padding: 12px;
  }

  .supplier-page-header {
    flex-direction: column;
  }

  .supplier-header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

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

  .supplier-form {
    grid-template-columns: 1fr;
  }

  .supplier-form-wide {
    grid-column: auto;
  }

  .supplier-list-head,
  .supplier-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .supplier-search {
    width: 100%;
  }

  .supplier-audit-item {
    grid-template-columns: 1fr;
  }
}
