.saf-crp-spa {
  display: grid;
  gap: 16px;
}

.saf-crp-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--saf-dash-border, #d8d2c4);
  border-radius: 8px;
}
.saf-crp-toolbar input[type="search"],
.saf-crp-toolbar select {
  padding: 6px 10px;
  font-size: 0.9375rem;
}
.saf-crp-count {
  margin-left: auto;
  color: var(--saf-dash-ink-muted, #5c5644);
  font-size: 0.875rem;
}

.saf-crp-btn {
  display: inline-block;
  padding: 6px 14px;
  background: var(--saf-brand, #962432);
  color: #fff;
  border: 1px solid var(--saf-brand, #962432);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
}
.saf-crp-btn:hover {
  background: #7a1d28;
}
.saf-crp-btn--ghost {
  background: transparent;
  color: var(--saf-dash-ink, #2a2620);
  border-color: var(--saf-dash-border, #d8d2c4);
}
.saf-crp-btn--ghost:hover {
  background: var(--saf-dash-surface-alt, #f1ebd9);
}
.saf-crp-btn--danger {
  background: transparent;
  color: var(--saf-danger, #9a3c2c);
  border-color: var(--saf-danger, #9a3c2c);
}
.saf-crp-btn--danger:hover {
  background: var(--saf-danger, #9a3c2c);
  color: #fff;
}

.saf-crp-msg {
  padding: 10px 12px;
  border-radius: 6px;
}
.saf-crp-msg--err {
  background: #fbe8e3;
  color: var(--saf-danger, #9a3c2c);
}
.saf-crp-msg--ok {
  background: #e3f1e6;
  color: #16652b;
}

.saf-crp-empty {
  padding: 24px;
  text-align: center;
  color: var(--saf-dash-ink-muted, #5c5644);
  background: #fff;
  border: 1px dashed var(--saf-dash-border, #d8d2c4);
  border-radius: 8px;
}

.saf-crp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--saf-dash-border, #d8d2c4);
  border-radius: 8px;
  overflow: hidden;
}
.saf-crp-table th,
.saf-crp-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--saf-dash-border, #d8d2c4);
  font-size: 0.9375rem;
  vertical-align: top;
}
.saf-crp-table th {
  background: var(--saf-dash-surface-alt, #f1ebd9);
  font-weight: 600;
}
.saf-crp-table tr:last-child td {
  border-bottom: 0;
}

.saf-crp-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.saf-crp-badge--pending {
  background: #ffe8d6;
  color: #8a4a00;
}
.saf-crp-badge--contacted {
  background: #e0e7ff;
  color: #1d3a8a;
}
.saf-crp-badge--partnered {
  background: #e3f1e6;
  color: #16652b;
}
.saf-crp-badge--declined {
  background: #f2e2e2;
  color: #6a2424;
}

.saf-crp-pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

.saf-crp-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  background: #fff;
  border-left: 1px solid var(--saf-dash-border, #d8d2c4);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 1000;
}
.saf-crp-drawer[hidden] {
  display: none;
}
.saf-crp-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--saf-dash-border, #d8d2c4);
  background: var(--saf-dash-surface-alt, #f1ebd9);
}
.saf-crp-drawer__head h3 {
  margin: 0;
  font-size: 1.125rem;
}
.saf-crp-drawer__close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.saf-crp-drawer__body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  gap: 12px;
}
.saf-crp-drawer__foot {
  padding: 14px 18px;
  border-top: 1px solid var(--saf-dash-border, #d8d2c4);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.saf-crp-form__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: start;
}
.saf-crp-form__row label {
  font-weight: 600;
  padding-top: 6px;
  font-size: 0.875rem;
}
.saf-crp-form__row input,
.saf-crp-form__row textarea,
.saf-crp-form__row select {
  padding: 6px 10px;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  border: 1px solid var(--saf-dash-border, #d8d2c4);
  border-radius: 6px;
}

@media (max-width: 720px) {
  .saf-crp-form__row {
    grid-template-columns: 1fr;
  }
}
