.rk-sm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.rk-sm-toolbar-left h2 {
  margin: 0;
  font-size: 20px;
}

.rk-sm-toolbar-left p {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--rk-muted);
}

.rk-sm-actions {
  display: flex;
  gap: 8px;
}

.rk-sm-search {
  width: 280px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--rk-border);
  border-radius: 9px;
  background: white;
  color: var(--rk-text);
}

.rk-sm-table-card {
  background: white;
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  box-shadow: var(--rk-shadow);
  overflow: hidden;
}

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

.rk-sm-table th {
  padding: 11px 13px;
  background: #f8faf9;
  border-bottom: 1px solid var(--rk-border);
  color: var(--rk-muted);
  text-align: left;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .45px;
}

.rk-sm-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #edf2ef;
  font-size: 11px;
  vertical-align: middle;
}

.rk-sm-table tr:last-child td {
  border-bottom: 0;
}

.rk-sm-code {
  font-weight: 800;
  color: var(--rk-green-800);
}

.rk-sm-person strong {
  display: block;
  font-size: 11px;
}

.rk-sm-person span {
  display: block;
  margin-top: 3px;
  color: var(--rk-muted);
  font-size: 9px;
}

.rk-sm-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
}

.rk-sm-badge.active {
  background: var(--rk-green-100);
  color: var(--rk-green-700);
}

.rk-sm-badge.inactive {
  background: #eff2f0;
  color: #6f7c75;
}

.rk-sm-badge.suspended {
  background: var(--rk-red-bg);
  color: var(--rk-red);
}

.rk-sm-badge.linked {
  background: #eef6ff;
  color: #315e87;
}

.rk-sm-comp {
  font-size: 9px;
  line-height: 1.55;
}

.rk-sm-comp strong {
  color: var(--rk-text);
}

.rk-sm-row-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.rk-sm-mini-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--rk-border);
  border-radius: 7px;
  background: white;
  color: var(--rk-text);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.rk-sm-mini-button.primary {
  border-color: var(--rk-green-700);
  background: var(--rk-green-700);
  color: white;
}

.rk-sm-empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--rk-muted);
}

.rk-sm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(4, 25, 17, .54);
}

.rk-sm-modal-backdrop.open {
  display: flex;
}

.rk-sm-modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.22);
}

.rk-sm-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rk-border);
}

.rk-sm-modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.rk-sm-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--rk-muted);
}

.rk-sm-modal-body {
  padding: 20px;
}

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

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

.rk-sm-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--rk-muted);
}

.rk-sm-field input,
.rk-sm-field select,
.rk-sm-field textarea {
  width: 100%;
  min-height: 39px;
  padding: 9px 10px;
  border: 1px solid var(--rk-border);
  border-radius: 8px;
  background: white;
  color: var(--rk-text);
}

.rk-sm-field textarea {
  min-height: 80px;
  resize: vertical;
}

.rk-sm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--rk-border);
}

.rk-sm-message {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 10px;
}

.rk-sm-message.error {
  display: block;
  background: var(--rk-red-bg);
  color: var(--rk-red);
}

.rk-sm-message.success {
  display: block;
  background: var(--rk-green-100);
  color: var(--rk-green-700);
}

.rk-sm-history {
  margin-top: 20px;
  border-top: 1px solid var(--rk-border);
  padding-top: 18px;
}

.rk-sm-history h4 {
  margin: 0 0 10px;
  font-size: 12px;
}

.rk-sm-history-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2ef;
  font-size: 10px;
}

@media (max-width: 800px) {
  .rk-sm-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rk-sm-actions {
    flex-direction: column;
  }

  .rk-sm-search {
    width: 100%;
  }

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