/* === Переиспользуемые компоненты (кнопки, бейджи, карточки, поиск, переключатели) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-btn);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font);
}
.btn-primary {
  background: var(--orange);
  color: white;
}
.btn-primary:hover {
  background: var(--orange-dark);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray-500);
}
.btn-outline:hover {
  background: var(--gray-100);
}
.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.8rem;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-success {
  background: #e6f7e6;
  color: #2e7d32;
}
.badge-danger {
  background: #ffebee;
  color: #c62828;
}
.badge-warning {
  background: #fff3e0;
  color: #ef6c00;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.user-card {
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  padding: 1rem;
  transition: background 0.1s, box-shadow 0.2s;
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}
.user-card:hover {
  background: var(--gray-50);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.user-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.user-card-row:last-child {
  margin-bottom: 0;
}
.user-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.user-card-action {
  font-size: 1.2rem;
  color: var(--gray-400);
  padding: 0.2rem 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.user-email {
  font-size: 14px;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}
.user-card-statuses {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 14px;
  white-space: nowrap;
}
.status-label {
  color: var(--gray-500);
  font-weight: 500;
}

.admin-header-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--black);
  margin: 0;
}
.search-wrapper {
  position: relative;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-300);
  font-size: 0.9rem;
}
.search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--white);
  transition: all 0.2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.1);
}

.toast-notification {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-btn);
  font-size: 0.85rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: normal;
  max-width: 90%;
  text-align: center;
}
.toast-notification.show {
  opacity: 1;
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--orange);
}
input:checked + .slider:before {
  transform: translateX(26px);
}

.loading-state, .error-state, .empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
  background: var(--white);
  border-radius: var(--radius-card);
}