
/* Edit mode toggle */
.btn-active,
.btn-active:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-sm {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
}

.pur-edit-col[hidden] {
  display: none;
}

.manual-assign-wrap {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.assign-suggestions {
  position: static;
  z-index: 15;
  display: none;
  width: 100%;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  margin-top: 0;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.20);
}

.purchase-match-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.purchase-match-actions .btn,
.manual-assign-wrap .btn,
.manual-assign-wrap .manual-assign-input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
}

.assign-suggestion {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 10px 12px;
  color: #0f172a;
  cursor: pointer;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-suggestion:last-child {
  border-bottom: 0;
}

.assign-suggestion:hover {
  background: #f1f5f9;
}

.purchase-editor-row[hidden] {
  display: none;
}

.purchase-editor-row td {
  padding: 0;
  border-bottom: none;
  background: transparent;
}

.purchase-editor {
  margin: 0 16px 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

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

.purchase-editor-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.purchase-editor-current {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.purchase-editor-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.purchase-editor-search input {
  flex: 1 1 auto;
}

.purchase-pdf-search-status {
  min-height: 18px;
  margin-bottom: 10px;
}

.purchase-pdf-candidates {
  display: grid;
  gap: 10px;
}

.purchase-pdf-candidate {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.purchase-pdf-candidate:hover {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.purchase-pdf-candidate.is-selected {
  border-color: rgba(37, 99, 235, 0.90);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
  background: rgba(239, 246, 255, 0.96);
}

.purchase-pdf-candidate-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.purchase-pdf-candidate-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.purchase-pdf-candidate-meta,
.purchase-pdf-candidate-data,
.purchase-pdf-candidate-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.purchase-pdf-candidate-meta,
.purchase-pdf-candidate-data {
  font-size: 12px;
  color: var(--muted);
}

.purchase-pdf-candidate-data strong {
  color: var(--text);
  font-weight: 700;
}

.purchase-editor-empty {
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.44);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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