.groups-manager {
  display: flex;
  gap: 20px;
  height: calc(100vh - 200px);
}

.groups-sidebar {
  width: 350px;
  background: #202c33;
  border-radius: 15px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #2a3942;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s;
  background: #111b21;
  color: #e9edef;
}

.search-input:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.search-input::placeholder {
  color: #8696a0;
}

.groups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.groups-header h3 {
  color: #e9edef;
  font-size: 18px;
}

.refresh-btn {
  background: #2a3942;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s;
  color: #e9edef;
}

.refresh-btn:hover {
  background: #3d4a52;
  transform: rotate(180deg);
}

.groups-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  background: #111b21;
}

.group-item:hover {
  background: #2a3942;
}

.group-item.active {
  background: #25d366;
  color: white;
  border-color: #20ba5a;
}

.group-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.group-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.group-avatar span {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-item.active .group-avatar {
  background: rgba(255, 255, 255, 0.2);
}

.group-info {
  flex: 1;
  min-width: 0;
}

.group-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e9edef;
}

.group-meta {
  font-size: 12px;
  opacity: 0.7;
  color: #8696a0;
}

.group-item.active .group-name,
.group-item.active .group-meta {
  color: white;
  opacity: 1;
}

.group-details {
  flex: 1;
  background: #202c33;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.group-header-details {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.group-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 36px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.group-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.group-avatar-large span {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-title-section {
  flex: 1;
  min-width: 200px;
}

.group-title-section h2 {
  color: #e9edef;
  font-size: 28px;
  margin-bottom: 5px;
}

.group-id {
  color: #8696a0;
  font-size: 12px;
  font-family: monospace;
}

.group-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  white-space: nowrap;
}

.action-btn.add {
  background: #25d366;
  color: white;
}

.action-btn.add:hover {
  background: #20ba5a;
}

.action-btn.remove {
  background: #f44336;
  color: white;
}

.action-btn.remove:hover {
  background: #da190b;
}

.action-btn.leave {
  background: #ff9800;
  color: white;
}

.action-btn.leave:hover {
  background: #e68900;
}

.action-btn.export {
  background: #2196f3;
  color: white;
}

.action-btn.export:hover {
  background: #1976d2;
}

.action-btn.send {
  background: #25d366;
  color: white;
}

.action-btn.send:hover {
  background: #20ba5a;
}

.action-btn.schedule {
  background: #9c27b0;
  color: white;
}

.action-btn.schedule:hover {
  background: #7b1fa2;
}

.add-members-panel,
.remove-members-panel,
.send-message-panel,
.schedule-message-panel {
  background: #111b21;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.add-members-panel h3,
.remove-members-panel h3,
.send-message-panel h3,
.schedule-message-panel h3 {
  color: #e9edef;
  margin-bottom: 10px;
}

.help-text {
  color: #8696a0;
  font-size: 14px;
  margin-bottom: 15px;
}

.members-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #2a3942;
  border-radius: 8px;
  font-size: 14px;
  font-family: monospace;
  resize: vertical;
  margin-bottom: 15px;
  background: #202c33;
  color: #e9edef;
}

.members-input:focus {
  outline: none;
  border-color: #25d366;
}

.members-checkbox-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #202c33;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  color: #e9edef;
}

.member-checkbox:hover {
  background: #2a3942;
}

.member-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.panel-actions {
  display: flex;
  gap: 10px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-primary {
  background: #4caf50;
  color: white;
}

.btn-primary:hover {
  background: #45a049;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #da190b;
}

.btn-secondary {
  background: #2a3942;
  color: #e9edef;
}

.btn-secondary:hover {
  background: #3d4a52;
}

.members-section h3 {
  color: #e9edef;
  margin-bottom: 20px;
  font-size: 22px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.member-card {
  background: #111b21;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: #202c33;
}

.member-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 24px;
  margin: 0 auto 10px;
}

.member-name {
  font-weight: 600;
  color: #e9edef;
  margin-bottom: 5px;
  font-size: 15px;
}

.member-id {
  font-size: 12px;
  color: #8696a0;
  font-family: monospace;
}

.admin-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff9800;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
}

.no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #8696a0;
}

.no-selection-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.no-selection h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #8696a0;
  font-size: 16px;
}

