.rp-org-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  gap: 0.25rem;
  border-bottom: 1px solid var(--rp-border, rgba(255, 255, 255, 0.12));
  margin-bottom: 1.25rem;
}

.rp-org-tabs .nav-link {
  white-space: nowrap;
  color: var(--rp-text-muted, #6d7890);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.rp-org-tabs .nav-link:hover {
  color: var(--rp-text, #fff);
  background: rgba(var(--rp-brand-rgb, 255, 107, 0), 0.06);
}

.rp-org-tabs .nav-link.active {
  color: var(--rp-brand, #ff6b00);
  border-bottom-color: var(--rp-brand, #ff6b00);
  background: rgba(var(--rp-brand-rgb, 255, 107, 0), 0.08);
}

.rp-org-tabs .nav-link .badge {
  font-weight: 700;
}

.rp-org-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--rp-border, rgba(255, 255, 255, 0.12));
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--rp-brand, #ff6b00) 6%, var(--rp-surface, #171717));
}

.rp-org-context-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.rp-org-context-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--rp-text, #fff);
}

.rp-org-context-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.rp-org-subtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 0.65rem;
  border: 1px solid var(--rp-border, rgba(255, 255, 255, 0.12));
  background: rgba(0, 0, 0, 0.15);
}

.rp-org-subtabs .btn {
  border-radius: 0.45rem;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
}

.rp-org-module-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.15rem;
  border-radius: 0.9rem;
  border: 1px solid var(--rp-border, rgba(255, 255, 255, 0.12));
  background: var(--rp-surface, #171717);
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.rp-org-module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--rp-brand-rgb, 255, 107, 0), 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  color: inherit;
}

.rp-org-module-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--rp-brand-rgb, 255, 107, 0), 0.14);
  color: var(--rp-brand, #ff6b00);
  font-size: 1.1rem;
}

.rp-org-form .form-label,
[data-rp-organizations] .form-label,
[data-rp-org-staff] .form-label,
[data-rp-school] .form-label {
  font-weight: 600;
  font-size: 0.84rem;
  margin-bottom: 0.3rem;
}

.rp-org-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rp-text-muted, #6d7890);
  margin-bottom: 0.75rem;
}

@media (max-width: 575.98px) {
  .rp-org-tabs {
    flex-wrap: nowrap;
  }
  .rp-org-context-bar {
    padding: 0.75rem 0.85rem;
  }
  .rp-org-context-actions {
    width: 100%;
  }
}
