/* ==============================================================
 * admin-utilities.css — Obsidian Aurora Badges, Loading, Tooltips
 * ============================================================== */

/* ─── Status Badges ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge-active, .badge-success, .badge-green {
  background: var(--mint-light);
  color: var(--mint-text);
  border: 1px solid rgba(52,211,153,0.12);
}
.badge-inactive, .badge-danger, .badge-red {
  background: var(--rose-light);
  color: var(--rose-text);
  border: 1px solid rgba(251,113,133,0.12);
}
.badge-warning, .badge-amber {
  background: var(--amber-light);
  color: var(--amber-text);
  border: 1px solid rgba(251,191,36,0.12);
}
.badge-info, .badge-primary {
  background: var(--primary-light);
  color: var(--primary-text);
  border: 1px solid rgba(129,140,248,0.12);
}
.badge-violet {
  background: var(--violet-light);
  color: var(--violet-text);
  border: 1px solid rgba(139,92,246,0.12);
}
.badge-sky {
  background: var(--sky-light);
  color: var(--sky-text);
  border: 1px solid rgba(56,189,248,0.12);
}
.badge-admin {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.badge-superadmin {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.32);
}
.badge-editor {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.badge-blocked {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

/* ─── Toast Sub-elements ───────────────────────────────── */
.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.toast-message {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-1);
}

/* ─── Empty State ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-4);
  font-size: 13.5px;
}
.empty-state .empty-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}


/* ─── Loading States ───────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinSlow 0.7s linear infinite;
}
.loading-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-3);
}

/* Inline loader */
.inline-loader {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.inline-loader span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulseGlow 1.2s ease-in-out infinite;
}
.inline-loader span:nth-child(2) { animation-delay: 0.2s; }
.inline-loader span:nth-child(3) { animation-delay: 0.4s; }

/* ─── Tooltips ─────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: rgba(12, 16, 32, 0.95);
  border: 1px solid var(--border-bold);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 8000;
  box-shadow: var(--shadow);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Empty State ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-5);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 6px;
}
.empty-state-desc {
  font-size: 13px;
  color: var(--text-5);
}

/* ─── Progress Bar ─────────────────────────────────────── */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary-grad);
  transition: width 0.6s var(--ease);
  position: relative;
}
.progress-bar-fill.green { background: var(--mint-grad); }
.progress-bar-fill.amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.progress-bar-fill.red   { background: linear-gradient(135deg, #fb7185, #ef4444); }

/* ─── Separator ────────────────────────────────────────── */
.separator {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

/* ─── Copy Button inline ──────────────────────────────── */
.btn-copy-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-5);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-copy-inline:hover {
  background: var(--primary-light);
  color: var(--primary-text);
  border-color: var(--border-glow);
}
