.sd-admin-body {
  display: block;
  align-items: initial;
  justify-content: initial;
}

#sd-topbar {
  gap: 12px;
}

.sd-admin-badge {
  background: var(--sd-teal);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 20px;
}

.sd-admin-back {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--sd-navy);
  text-decoration: none;
}
.sd-admin-back:hover { color: var(--sd-teal); }

.sd-admin-main {
  max-width: 1000px;
  margin: 24px auto 60px;
  padding: 0 20px;
}

.sd-admin-section {
  background: #fff;
  border: 1px solid #22a08a33;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
}
.sd-admin-section h2 {
  font-size: 1.1rem;
  color: var(--sd-navy);
  margin: 0 0 16px;
}

.sd-section-logo {
  display: block;
  width: 110px;
  margin: 0 auto 18px;
  opacity: 0.9;
  pointer-events: none;
  user-select: none;
}

.sd-admin-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 12px;
}
.sd-admin-stat span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--sd-teal);
}
.sd-admin-stat label {
  font-size: 0.8rem;
  color: #4a4a5a;
}

.sd-admin-plans {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sd-admin-plan-pill {
  background: #f0faf8;
  border: 1px solid #22a08a33;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--sd-navy);
}

.sd-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: transparent;
}
.sd-admin-table th {
  text-align: left;
  color: #4a4a5a;
  font-weight: 600;
  border-bottom: 2px solid #22a08a33;
  padding: 8px 10px;
  background: transparent;
}
.sd-admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
}
.sd-admin-table select {
  font-size: 0.85rem;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #22a08a55;
}
.sd-backend-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  margin-right: 8px;
  white-space: nowrap;
}

.sd-team-add-form {
  display: flex;
  flex-direction: column;
  max-width: 480px;
}
.sd-team-add-form input,
.sd-team-add-form select {
  font-size: 0.9rem;
  padding: 7px 9px;
  border-radius: 5px;
  border: 1px solid #22a08a55;
  box-sizing: border-box;
}
.sd-team-add-form button[type="submit"] { align-self: flex-start; margin-top: 4px; }

.sd-team-row-clickable { cursor: pointer; }
.sd-team-row-clickable:hover { background: #f0faf8; }

.sd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.sd-modal-overlay:not([hidden]) { display: flex; }
.sd-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(26, 26, 46, 0.25);
}
.sd-modal h3 {
  margin: 0 0 16px;
  color: var(--sd-navy);
  font-size: 1.15rem;
}
.sd-modal-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.sd-modal-field[hidden] { display: none; }
.sd-modal-field label {
  flex: 0 0 140px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a4a5a;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.sd-modal-readonly {
  margin: 0;
  font-size: 0.9rem;
  color: var(--sd-navy);
  padding: 6px 0;
  flex: 1;
}
.sd-modal-field input {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  padding: 7px 9px;
  border-radius: 5px;
  border: 1px solid #22a08a55;
  box-sizing: border-box;
}
.sd-modal-name-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #22a08a22;
  padding-top: 12px;
  margin-top: 4px;
}
.sd-modal-required-note {
  font-size: 0.72rem;
  color: #888;
  margin: 4px 0 0;
}
.sd-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}
.sd-modal-danger-link {
  margin-left: auto;
  background: none;
  border: none;
  color: #d9534f;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
}
.sd-modal-danger-link:hover { color: #c9302c; }

.sd-modal-danger { border-top: 4px solid #d9534f; }
.sd-modal-danger h3 { color: #d9534f; }
.sd-btn-danger {
  background: #d9534f;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 0.9rem;
  cursor: pointer;
}
.sd-btn-danger:hover { background: #c9302c; }

/* Public request to change the primary org admin (#408): narrow single-column form, honeypot field out of sight. */
.sd-oar-main { max-width: 640px; }
.sd-oar-main form { display: flex; flex-direction: column; gap: 6px; }
.sd-oar-main label { margin-top: 8px; font-weight: 600; }
.sd-oar-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
