.schweigepflicht-admin-module,
.schweigepflicht-admin-module * {
  box-sizing: border-box;
}

.sp-shell {
  display: grid;
  gap: 20px;
}

.sp-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.sp-topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}

.sp-topbar p {
  margin: 4px 0 0;
  color: #5b6472;
  font-weight: 600;
}

.sp-card {
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.sp-card h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
}

.sp-card h3 {
  margin: 16px 0 10px;
  font-size: 1rem;
  font-weight: 800;
}

.sp-create-form {
  display: grid;
  gap: 14px;
}

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

.sp-field-wide {
  grid-column: 1 / -1;
}

.sp-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #334155;
}

.sp-field input,
.sp-field textarea {
  width: 100%;
  border: 1.5px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  font: inherit;
  color: inherit;
}

.sp-field textarea {
  min-height: 94px;
  resize: vertical;
}

.sp-field input:focus,
.sp-field textarea:focus {
  outline: none;
  border-color: #2f5f87;
  box-shadow: 0 0 0 3px rgba(47, 95, 135, 0.12);
}

.sp-field p,
.sp-created-link small,
.sp-muted {
  color: #64748b;
  font-size: 0.84rem;
}

.sp-field p {
  margin: 6px 0 0;
}

.sp-submit {
  display: flex;
  align-items: end;
}

.sp-created-link {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  display: grid;
  gap: 6px;
}

.sp-created-url {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid #d6e0ea;
  border-radius: 6px;
  background: #f8fafc;
  color: #1f2937;
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  padding: 5px 8px;
  cursor: pointer;
  text-align: left;
  word-break: break-all;
}

.sp-created-url:hover {
  background: #eef5fb;
  border-color: #2f5f87;
}

.sp-recipient-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.sp-recipient-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
}

.sp-recipient-row input {
  width: 100%;
  border: 1.5px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  font: inherit;
  color: inherit;
}

.sp-row-remove {
  min-width: 38px;
  padding: 7px 10px;
}

.sp-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.sp-table th,
.sp-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.sp-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sp-table tr:hover td {
  background: #fbfdff;
}

.sp-row-inactive td {
  color: #64748b;
  text-decoration: line-through;
}

.sp-row-inactive .sp-muted {
  text-decoration: inherit;
}

.sp-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.sp-badge-open {
  background: #fff7ed;
  color: #9a3412;
}

.sp-badge-active {
  background: #dcfce7;
  color: #166534;
}

.sp-badge-warn {
  background: #fef3c7;
  color: #92400e;
}

.sp-badge-muted {
  background: #e2e8f0;
  color: #475569;
}

.sp-badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.sp-error-text {
  margin-top: 6px;
  color: #b91c1c;
  font-size: 0.82rem;
}

.sp-check-field label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.sp-table code {
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  color: #334155;
}

.sp-alert-dot {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.sp-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.sp-detail-actions {
  margin-top: 14px;
}

.sp-btn-pdf {
  background: #2f5f87;
  border-color: #2f5f87;
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
}

.sp-btn-pdf:hover {
  background: #254f72;
}

.sp-btn-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
  padding: 5px 10px;
  font-size: 12px;
}

.sp-btn-danger:hover {
  background: #fecaca;
}

.sp-empty,
.sp-loading,
.sp-inline-error {
  color: #64748b;
  text-align: center;
  padding: 30px 18px;
}

.sp-inline-error {
  color: #b91c1c;
}

.sp-add-form {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 1100px) {
  .sp-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sp-form-grid {
    grid-template-columns: 1fr;
  }

  .sp-recipient-row {
    grid-template-columns: 1fr;
  }

  .sp-row-remove {
    justify-self: start;
  }

  .sp-topbar {
    display: grid;
  }
}
