.ped-member-native-hidden {
  display: none !important;
}

.ped-member-view {
  margin-top: 1rem;
}

.ped-member-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(0, 0, 0, .22);
}

.ped-member-toolbar h4 {
  margin: 0 0 .2rem;
  color: #fff;
  font-size: 1rem;
}

.ped-member-toolbar p {
  margin: 0;
  color: rgba(255, 255, 255, .5);
  font-size: .78rem;
}

.ped-member-search {
  width: min(300px, 100%);
  padding: .65rem .8rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  outline: none;
  background: rgba(0, 0, 0, .35);
  color: #fff;
}

.ped-member-search:focus {
  border-color: rgba(255, 87, 34, .65);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, .1);
}

.ped-member-layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 1rem;
  min-height: 480px;
}

.ped-member-sidebar,
.ped-member-details {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(0, 0, 0, .2);
}

.ped-member-sidebar {
  padding: .65rem;
}

.ped-member-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-height: 560px;
  overflow-y: auto;
  padding-right: .2rem;
}

.ped-member-list::-webkit-scrollbar,
.ped-member-groups::-webkit-scrollbar {
  width: 5px;
}

.ped-member-list::-webkit-scrollbar-thumb,
.ped-member-groups::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: rgba(255, 87, 34, .4);
}

.ped-member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  padding: .7rem 2.8rem .7rem .75rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.ped-member-card:hover {
  border-color: rgba(255, 87, 34, .38);
  background: rgba(255, 255, 255, .065);
  transform: translateX(2px);
}

.ped-member-card.selected {
  border-color: rgba(255, 87, 34, .8);
  background: linear-gradient(135deg, rgba(255, 87, 34, .2), rgba(255, 87, 34, .07));
  box-shadow: inset 3px 0 0 #ff5722;
}

.ped-member-card-discord,
.ped-member-card-fivem {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ped-member-card-discord {
  font-size: .82rem;
  font-weight: 600;
}

.ped-member-card-fivem {
  margin-top: .2rem;
  color: rgba(255, 255, 255, .52);
  font-size: .72rem;
}

.ped-member-card-count {
  position: absolute;
  top: 50%;
  right: .7rem;
  min-width: 1.65rem;
  padding: .22rem .36rem;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 87, 34, .16);
  color: #ff7043;
  font-size: .7rem;
  font-weight: 700;
  text-align: center;
}

.ped-member-details {
  padding: 1rem;
}

.ped-member-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .2rem .2rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.ped-member-detail-kicker {
  color: #ff5722;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ped-member-detail-header h4 {
  margin: .25rem 0 .15rem;
  color: #fff;
  font-size: 1.05rem;
}

.ped-member-detail-header p {
  margin: 0 0 .55rem;
  color: rgba(255, 255, 255, .58);
  font-size: .8rem;
}

.ped-member-detail-header code {
  display: inline-block;
  max-width: min(500px, 100%);
  overflow: hidden;
  color: rgba(255, 255, 255, .42);
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ped-member-detail-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .55rem;
}

.ped-member-total-badge {
  padding: .4rem .65rem;
  border: 1px solid rgba(255, 87, 34, .35);
  border-radius: 999px;
  background: rgba(255, 87, 34, .12);
  color: #ff7043;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.ped-member-discord-link {
  color: #9ea8ff;
  font-size: .7rem;
  text-decoration: none;
}

.ped-member-discord-link:hover {
  text-decoration: underline;
}

.ped-member-founder-note {
  color: rgba(255, 255, 255, .42);
  font-size: .68rem;
}

.ped-member-clean-button,
.ped-member-action {
  border: 1px solid transparent;
  border-radius: 7px;
  color: #fff;
  font: inherit;
  font-size: .67rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, opacity .18s ease;
}

.ped-member-clean-button {
  padding: .5rem .65rem;
  border-color: rgba(255, 152, 0, .35);
  background: rgba(255, 152, 0, .12);
  color: #ffb74d;
}

.ped-member-clean-button:hover {
  border-color: rgba(255, 152, 0, .7);
  background: rgba(255, 152, 0, .2);
}

.ped-member-feedback {
  margin: 0 0 1rem;
  padding: .7rem .85rem;
  border: 1px solid rgba(76, 175, 80, .35);
  border-radius: 8px;
  background: rgba(76, 175, 80, .1);
  color: #81c784;
  font-size: .76rem;
}

.ped-member-feedback.error {
  border-color: rgba(244, 67, 54, .4);
  background: rgba(244, 67, 54, .1);
  color: #ef9a9a;
}

.ped-member-groups {
  max-height: 470px;
  overflow-y: auto;
  padding: .9rem .2rem .2rem 0;
}

.ped-member-group + .ped-member-group {
  margin-top: 1rem;
}

.ped-member-group h5 {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .55rem;
  color: rgba(255, 255, 255, .76);
  font-size: .78rem;
}

.ped-member-group h5 span {
  padding: .12rem .35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .45);
  font-size: .64rem;
}

.ped-member-peds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .5rem;
}

.ped-member-ped-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: .7rem .75rem;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.ped-member-ped-card strong,
.ped-member-ped-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ped-member-ped-card strong {
  color: rgba(255, 255, 255, .9);
  font-size: .78rem;
}

.ped-member-ped-card span {
  margin-top: .22rem;
  color: rgba(255, 255, 255, .38);
  font-size: .68rem;
}

.ped-member-ped-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .7rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(255, 255, 255, .065);
}

.ped-member-action {
  flex: 1 1 auto;
  padding: .42rem .5rem;
}

.ped-member-action.remove {
  border-color: rgba(244, 67, 54, .28);
  background: rgba(244, 67, 54, .1);
  color: #ef9a9a;
}

.ped-member-action.remove:hover {
  border-color: rgba(244, 67, 54, .6);
  background: rgba(244, 67, 54, .18);
}

.ped-member-action.public {
  border-color: rgba(76, 175, 80, .3);
  background: rgba(76, 175, 80, .1);
  color: #81c784;
}

.ped-member-action.public:hover {
  border-color: rgba(76, 175, 80, .62);
  background: rgba(76, 175, 80, .18);
}

.ped-member-action.muted,
.ped-member-action:disabled {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .3);
  cursor: not-allowed;
}

.ped-member-view-busy {
  cursor: wait;
  opacity: .72;
}

.ped-member-loading,
.ped-member-error,
.ped-member-empty,
.ped-member-list-empty {
  padding: 2rem;
  color: rgba(255, 255, 255, .55);
  font-size: .82rem;
  text-align: center;
}

.ped-member-error {
  color: #ff6b6b;
}

@media (max-width: 900px) {
  .ped-member-toolbar,
  .ped-member-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ped-member-search {
    width: 100%;
  }

  .ped-member-layout {
    grid-template-columns: 1fr;
  }

  .ped-member-list {
    max-height: 260px;
  }

  .ped-member-detail-actions {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .ped-perm-subtabs {
    align-items: stretch;
    flex-direction: column;
  }

  .ped-perm-subtab {
    justify-content: center;
  }

  .ped-member-peds-grid {
    grid-template-columns: 1fr;
  }
}
