/* ─── Admin Panel ─────────────────────────────────────────────────── */

.admin {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
  overflow: hidden;
}

.admin__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.admin__badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Stats cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.admin-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-stat-card__label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.admin-stat-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.admin-stat-card__value--online {
  color: #22c55e;
}

/* Section */
.admin-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-section__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* User table */
.admin-users {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color 0.15s;
}

.admin-user-row:hover {
  border-color: var(--accent);
}

.admin-user-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.admin-user-row__info {
  flex: 1;
  min-width: 0;
}

.admin-user-row__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-row__meta {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-row__tags {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.admin-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.admin-tag--hardcoded {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.admin-tag--admin {
  background: rgba(var(--accent-rgb, 139, 92, 246), 0.15);
  color: var(--accent);
}

.admin-tag--online {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.admin-user-row__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.admin-btn:hover {
  background: var(--bg-hover);
}

.admin-btn--promote {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-btn--promote:hover {
  background: rgba(var(--accent-rgb, 139, 92, 246), 0.12);
}

.admin-btn--demote {
  border-color: #ef4444;
  color: #ef4444;
}

.admin-btn--demote:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Placeholder stub */
.admin-stub {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.admin-stub__icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.admin-stub__title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Loading */
.admin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-secondary);
  gap: 10px;
}
