#teamsPage.team-admin-page {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#teamsPage.team-admin-page .page-desc {
  max-width: 720px;
}

#teamsPage.team-admin-page .team-admin__hero.card,
#teamsPage.team-admin-page .team-admin__panel.card {
  box-shadow: none !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

#teamsPage.team-admin-page .team-members-table tbody tr {
  background: transparent;
}

#teamsPage.team-admin-page .team-members-table tbody tr:hover {
  background: rgba(13, 110, 253, 0.03);
}

.team-member-cell__meta-line {
  display: none;
}

#teamMemberMenuPermModal.team-modal,
#teamSeatExpandModal {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.team-admin {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.team-admin__hero-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 16px 20px;
}

.team-admin__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.team-admin__monogram {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  font-weight: 700;
  font-size: 1.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-admin__team-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.team-admin__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.team-admin__plan {
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.75rem;
}

.team-admin__seat {
  flex: 1 1 240px;
  max-width: 360px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.team-admin__seat-label {
  display: flex;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.team-admin__seat-progress {
  flex: 1 1 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  min-width: 80px;
}

.team-admin__seat-progress .progress-bar {
  border-radius: 999px;
  background: #0d6efd;
}

.team-admin__seat #teamAdminSeatBtn {
  flex: 0 0 auto;
  font-size: 0.8125rem;
  padding: 4px 10px;
}

.team-admin__tabs--underline {
  gap: 4px 20px;
  flex-wrap: wrap;
  padding: 0 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.team-admin__tabs--underline .nav-link {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 2px 10px;
  margin-bottom: -1px;
  color: var(--bs-secondary-color);
  border-bottom: 2px solid transparent;
}

.team-admin__tabs--underline .nav-link:hover {
  color: var(--bs-body-color);
}

.team-admin__tabs--underline .nav-link.active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
  font-weight: 600;
}

.team-admin__tabs--underline .nav-link:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.35);
  outline-offset: 2px;
}

.team-admin__toolbar--filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}

.team-admin__search {
  flex: 1 1 200px;
  max-width: 280px;
}

.team-admin__role-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
}

.team-admin__role-filter .btn {
  border-radius: 999px;
  font-size: 0.8125rem;
  padding: 4px 12px;
}

.team-admin__count {
  flex: 0 0 auto;
  margin-left: auto;
}

.team-admin__table-wrap {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  max-width: 100%;
}

.team-members-table tbody tr {
  min-height: 72px;
}

.team-members-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.team-admin__panel .card-body {
  padding: 16px 20px;
}

.team-role-editor__layout {
  display: grid;
  grid-template-columns: minmax(160px, 190px) 1fr;
  gap: 16px 20px;
  align-items: start;
}

.team-role-editor__roles-col {
  position: sticky;
  top: 8px;
}

.team-role-editor__roles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-role-editor__role-btn {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.team-role-editor__role-btn.is-active {
  border-color: rgba(13, 110, 253, 0.4);
  background: rgba(13, 110, 253, 0.08);
  box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.1);
}

.team-role-editor__role-btn:not(.is-active):hover {
  border-color: rgba(13, 110, 253, 0.22);
  background: rgba(13, 110, 253, 0.03);
}

.team-role-editor__meta {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.team-role-editor__meta-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 4px;
}

.team-role-editor__meta-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bs-body-color);
}

.team-role-editor__meta-count {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.team-role-editor__meta-count strong,
.team-role-editor__meta-hint strong {
  color: #0d6efd;
  font-weight: 600;
}

.team-role-editor__meta-hint {
  line-height: 1.45;
}

.team-role-editor__role-title {
  font-weight: 600;
  margin-right: 8px;
}

.team-role-editor__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-role-editor__group {
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.team-role-editor__group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--bs-body-color);
}

.team-role-editor__group-head .text-muted {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.team-role-editor__menu-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-role-editor__menu-item {
  margin: 0;
}

.team-role-editor__menu-label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
}

.team-role-editor__menu-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.team-role-editor__footer {
  position: sticky;
  bottom: 0;
  margin-top: 16px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 50%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.team-role-editor__footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.team-menu-perm-follow {
  background: rgba(13, 110, 253, 0.04);
  border-radius: 8px;
  padding: 8px 10px;
}

@media (max-width: 900px) {
  .team-role-editor__layout {
    grid-template-columns: 1fr;
  }

  .team-role-editor__roles {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .team-role-editor__role-btn {
    min-width: 140px;
    flex: 0 0 auto;
  }

  .team-role-editor__groups {
    grid-template-columns: 1fr;
  }
}

.team-menu-perm-discard {
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(220, 53, 69, 0.04);
}

.team-menu-perm-discard__title {
  font-weight: 600;
  font-size: 1rem;
}

.team-menu-perm-discard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.team-menu-perm-mode {
  width: 100%;
}

.team-menu-perm-mode .btn {
  flex: 1 1 0;
}

.team-role-editor__state {
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--bs-secondary-color);
}

.team-role-editor__state.is-dirty {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.team-role-editor__state.is-saving {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.1);
}

@media (max-width: 768px) {
  body.jx-team-admin-open .main-body .main-row > .sidebar {
    position: fixed !important;
    left: -100% !important;
    flex: 0 0 0 !important;
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  body.jx-team-admin-open .main-body .main-row > .sidebar.show {
    left: 0 !important;
    flex: none !important;
    width: min(70vw, 280px) !important;
    max-width: 280px !important;
    overflow: auto !important;
  }

  body.jx-team-admin-open .main-body .main-row > .main-column {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.jx-team-admin-open #teamsPage.team-admin-page.page-content {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }

  #teamsPage.team-admin-page .team-admin__tabs--underline {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0 14px;
    scrollbar-width: none;
  }

  #teamsPage.team-admin-page .team-admin__tabs--underline::-webkit-scrollbar {
    display: none;
  }

  #teamsPage.team-admin-page .team-admin__tabs--underline .nav-link {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    white-space: nowrap;
    padding: 8px 2px 9px;
  }

  #teamsPage.team-admin-page .team-admin__hero-body,
  #teamsPage.team-admin-page .team-admin__panel .card-body {
    padding: 12px 16px;
  }

  #teamsPage.team-admin-page .team-admin__toolbar--filters {
    gap: 8px;
  }

  #teamsPage.team-admin-page .team-admin__table-wrap {
    margin-left: 0;
    margin-right: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 8px;
  }
}

@media (max-width: 575.98px) {
  #teamsPage.team-admin-page .team-members-table thead {
    display: none;
  }

  #teamsPage.team-admin-page .team-members-table,
  #teamsPage.team-admin-page .team-members-table tbody {
    display: block;
    width: 100%;
  }

  #teamsPage.team-admin-page .team-member-cell__meta-line {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--bs-secondary-color);
  }

  #teamsPage.team-admin-page .team-members-table tr.team-member-row {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "identity"
      "roles"
      "actions";
    gap: 6px;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
  }

  #teamsPage.team-admin-page .team-members-table tr.team-member-row:last-child {
    border-bottom: 0;
  }

  #teamsPage.team-admin-page .team-members-table tr.team-member-row td {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
  }

  #teamsPage.team-admin-page .team-member-row__identity {
    grid-area: identity;
  }

  #teamsPage.team-admin-page .team-member-row__roles {
    grid-area: roles;
  }

  #teamsPage.team-admin-page .team-member-row__access,
  #teamsPage.team-admin-page .team-member-row__joined {
    display: none !important;
  }

  #teamsPage.team-admin-page .team-member-row__actions {
    grid-area: actions;
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px 16px;
    justify-content: flex-start;
    padding-top: 2px;
  }

  #teamsPage.team-admin-page .team-member-row__actions .btn-link {
    font-weight: 600;
    text-decoration: none;
  }

  #teamsPage.team-admin-page .team-member-row.is-owner .team-member-row__actions {
    display: none !important;
  }

  #teamsPage.team-admin-page .team-admin__search {
    max-width: 100%;
    flex-basis: 100%;
  }

  #teamsPage.team-admin-page .team-admin__count {
    margin-left: 0;
    width: 100%;
  }
}