/* ════════════════════════════════════════════════════════════════════════════
   MAVEN UI — MICROINTERAÇÕES PREMIUM v5.1
   Design System: Apple + Linear + Notion
   ════════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────
   ANIMAÇÕES BASE
   ────────────────────────────────────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes checkmark {
  0% {
    stroke-dashoffset: 50;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   CHECK ANIMADO
   ────────────────────────────────────────────────────────────────────────── */

.maven-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary, #22c55e);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.maven-check svg {
  width: 14px;
  height: 14px;
  stroke: #000;
  stroke-width: 3;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkmark 0.4s 0.2s ease-out forwards;
}

/* ──────────────────────────────────────────────────────────────────────────
   SKELETON LOADING
   ────────────────────────────────────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-text.long {
  width: 100%;
}

.skeleton-card {
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 12px;
}

/* ──────────────────────────────────────────────────────────────────────────
   PULSE EFFECTS
   ────────────────────────────────────────────────────────────────────────── */

.maven-pulse {
  position: relative;
}

.maven-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--primary, #22c55e);
  opacity: 0.2;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.maven-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #22c55e);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ──────────────────────────────────────────────────────────────────────────
   TOASTS ELEGANTES
   ────────────────────────────────────────────────────────────────────────── */

.maven-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  min-width: 320px;
  max-width: 420px;
  padding: 16px 20px;
  background: var(--card-bg, #161b27);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.maven-toast.success {
  border-left: 4px solid var(--primary, #22c55e);
}

.maven-toast.error {
  border-left: 4px solid var(--red, #ef4444);
}

.maven-toast.warning {
  border-left: 4px solid #f59e0b;
}

.maven-toast.info {
  border-left: 4px solid #3b82f6;
}

.maven-toast-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.maven-toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.maven-toast-body {
  flex: 1;
  min-width: 0;
}

.maven-toast-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white, #fff);
  margin-bottom: 4px;
}

.maven-toast-message {
  font-size: 0.82rem;
  color: var(--gray, #64748b);
  line-height: 1.5;
}

.maven-toast-close {
  background: none;
  border: none;
  color: var(--gray, #64748b);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.maven-toast-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white, #fff);
}

/* ──────────────────────────────────────────────────────────────────────────
   ESTADOS VAZIOS ILUSTRADOS
   ────────────────────────────────────────────────────────────────────────── */

.maven-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  animation: fadeUp 0.4s ease;
}

.maven-empty-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.3;
  filter: grayscale(1);
}

.maven-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white, #fff);
  margin-bottom: 8px;
}

.maven-empty-description {
  font-size: 0.88rem;
  color: var(--gray, #64748b);
  line-height: 1.6;
  max-width: 360px;
  margin-bottom: 24px;
}

.maven-empty-action {
  padding: 10px 20px;
  background: var(--primary, #22c55e);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.maven-empty-action:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────────────────────
   LOADING SPINNER
   ────────────────────────────────────────────────────────────────────────── */

.maven-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary, #22c55e);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.maven-spinner.large {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

/* ──────────────────────────────────────────────────────────────────────────
   TRANSIÇÕES SUAVES
   ────────────────────────────────────────────────────────────────────────── */

.maven-transition-all {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.maven-transition-fast {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.maven-transition-slow {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ──────────────────────────────────────────────────────────────────────────
   HOVER EFFECTS
   ────────────────────────────────────────────────────────────────────────── */

.maven-hover-lift {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.maven-hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.maven-hover-glow {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.maven-hover-glow:hover {
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.3);
}

.maven-hover-scale {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.maven-hover-scale:hover {
  transform: scale(1.02);
}

/* ──────────────────────────────────────────────────────────────────────────
   BADGES E CHIPS
   ────────────────────────────────────────────────────────────────────────── */

.maven-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.maven-badge.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--primary, #22c55e);
}

.maven-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red, #ef4444);
}

.maven-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.maven-badge.info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.maven-badge.neutral {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray, #64748b);
}

/* ──────────────────────────────────────────────────────────────────────────
   PROGRESS BARS
   ────────────────────────────────────────────────────────────────────────── */

.maven-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.maven-progress-bar {
  height: 100%;
  background: var(--primary, #22c55e);
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.maven-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

.maven-progress.thick {
  height: 12px;
}

.maven-progress.thin {
  height: 4px;
}

/* ──────────────────────────────────────────────────────────────────────────
   DIVIDERS
   ────────────────────────────────────────────────────────────────────────── */

.maven-divider {
  height: 1px;
  background: var(--border, rgba(255, 255, 255, 0.1));
  margin: 20px 0;
}

.maven-divider.thick {
  height: 2px;
}

.maven-divider.gradient {
  background: linear-gradient(
    90deg,
    transparent,
    var(--border, rgba(255, 255, 255, 0.1)),
    transparent
  );
}

/* ──────────────────────────────────────────────────────────────────────────
   CARDS COM GLASSMORPHISM
   ────────────────────────────────────────────────────────────────────────── */

.maven-glass-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.maven-glass-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ──────────────────────────────────────────────────────────────────────────
   RIPPLE EFFECT
   ────────────────────────────────────────────────────────────────────────── */

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.maven-ripple {
  position: relative;
  overflow: hidden;
}

.maven-ripple::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
}

.maven-ripple:active::after {
  animation: ripple 0.6s ease-out;
}

/* ──────────────────────────────────────────────────────────────────────────
   MODO RESPONSIVO
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .maven-toast {
    top: 16px;
    right: 16px;
    left: 16px;
    min-width: auto;
  }

  .maven-empty-state {
    padding: 40px 20px;
  }

  .maven-empty-icon {
    width: 60px;
    height: 60px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   UTILITÁRIOS
   ────────────────────────────────────────────────────────────────────────── */

.maven-fade-up {
  animation: fadeUp 0.4s ease;
}

.maven-fade-in {
  animation: fadeIn 0.3s ease;
}

.maven-scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.maven-slide-in-right {
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
