/* Furrmarket SaaS layer — shared tokens, toasts, motion, mesh bg */

:root {
  --fm-bg: #0a0a0b;
  --fm-surface: #18181b;
  --fm-border: #27272a;
  --fm-text: #f4f4f5;
  --fm-muted: #a1a1aa;
  --fm-primary: #f59e0b;
  --fm-secondary: #3b82f6;
  --fm-green: #10b981;
  --fm-radius: 12px;
}

/* ── Animated mesh background ─────────────────────────────────────────── */
.fm-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--fm-bg);
}
.fm-mesh::before,
.fm-mesh::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: fmMeshDrift 18s ease-in-out infinite alternate;
}
.fm-mesh::before {
  width: 55vw;
  height: 55vw;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 70%);
}
.fm-mesh::after {
  width: 50vw;
  height: 50vw;
  bottom: -20%;
  right: -12%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28), transparent 70%);
  animation-delay: -9s;
}
@keyframes fmMeshDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, 3%) scale(1.08); }
}

/* ── Toast stack ──────────────────────────────────────────────────────── */
.fm-toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.fm-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(24, 24, 27, 0.96);
  border: 1px solid var(--fm-border);
  color: var(--fm-text);
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  animation: fmToastIn 0.28s ease;
  transform-origin: bottom right;
}
.fm-toast.success { border-color: rgba(16, 185, 129, 0.45); }
.fm-toast.error { border-color: rgba(239, 68, 68, 0.45); }
.fm-toast.info { border-color: rgba(59, 130, 246, 0.45); }
.fm-toast.warn { border-color: rgba(245, 158, 11, 0.45); }
.fm-toast i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.fm-toast.success i { color: var(--fm-green); }
.fm-toast.error i { color: #ef4444; }
.fm-toast.info i { color: var(--fm-secondary); }
.fm-toast.warn i { color: var(--fm-primary); }
.fm-toast.leaving { animation: fmToastOut 0.22s ease forwards; }
@keyframes fmToastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fmToastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}

/* ── Live pulse dot ───────────────────────────────────────────────────── */
.fm-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fm-green);
  letter-spacing: 0.02em;
}
.fm-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fm-green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: fmPulse 2s infinite;
}
@keyframes fmPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── Skeleton loaders ─────────────────────────────────────────────────── */
.fm-skeleton {
  background: linear-gradient(90deg, #1f1f23 25%, #2a2a30 50%, #1f1f23 75%);
  background-size: 200% 100%;
  animation: fmShimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes fmShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Stat counter glow ────────────────────────────────────────────────── */
.fm-stat-num {
  font-variant-numeric: tabular-nums;
  transition: text-shadow 0.3s;
}
.fm-stat-num.fm-counted {
  text-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
}

/* ── Admin chart panel ────────────────────────────────────────────────── */
.fm-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.fm-chart-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 20px;
}
.fm-chart-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
