/**
 * ============================================================================
 * LUCIDE ANIMATED CSS (Micro-Interações Vetoriais Suaves - Estabilidade Total)
 * ============================================================================
 * Micro-interações táteis e físicas de alta performance (60 FPS via GPU).
 * 1. pointer-events: none em todos os ícones para eliminar 100% de tremor/hover-flicker.
 * 2. Animações com amortecimento suave (spring curves) executadas apenas 1 vez (sem loops infinitos).
 * 3. Suporte unificado para ícones nativos Lucide (SVG) e Phosphor (Font/Glyph).
 * ============================================================================
 */

/* --------------------------------------------------------------------------
   1. ESTABILIDADE & RESET BASE (Sem tremor de cursor)
   -------------------------------------------------------------------------- */
svg.lucide,
.lucide-animated,
.lucide-inline-icon,
.lucide-beacon,
i[data-lucide],
i.ph,
i[class*="ph-"] {
  pointer-events: none !important; /* Impede tremor/oscilação do mouse ao transformar */
  user-select: none;
}

svg.lucide,
.lucide-animated {
  display: inline-block;
  vertical-align: middle;
  width: 1.15em;
  height: 1.15em;
  stroke-width: 2px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateZ(0); /* Aceleração via GPU */
  backface-visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s ease,
              stroke 0.2s ease,
              filter 0.25s ease;
  will-change: transform;
}

/* Modificadores de Dimensão */
.lucide-xs { width: 12px; height: 12px; stroke-width: 1.75px; }
.lucide-sm { width: 14px; height: 14px; stroke-width: 2px; }
.lucide-md { width: 18px; height: 18px; stroke-width: 2px; }
.lucide-lg { width: 22px; height: 22px; stroke-width: 2px; }
.lucide-xl { width: 28px; height: 28px; stroke-width: 2px; }

/* Paleta de Destaque */
.lucide-blue    { color: #38bdf8 !important; }
.lucide-cyan    { color: #06b6d4 !important; }
.lucide-emerald { color: #10b981 !important; }
.lucide-green   { color: #22c55e !important; }
.lucide-amber   { color: #f59e0b !important; }
.lucide-gold    { color: #fbbf24 !important; }
.lucide-red     { color: #ef4444 !important; }
.lucide-crimson { color: #f43f5e !important; }
.lucide-purple  { color: #a855f7 !important; }

/* --------------------------------------------------------------------------
   2. MICRO-INTERAÇÕES POR CATEGORIA (ESTÁVEIS E SUAVES)
   -------------------------------------------------------------------------- */

/* 1. BELL / SINO (Balanço de Pêndulo Suave - Executa 1 vez no Hover) */
.lucide-bell,
[data-lucide="bell"] svg,
.ph-bell {
  transform-origin: 50% 15%;
}
button:hover .lucide-bell,
button:hover [data-lucide="bell"] svg,
button:hover .ph-bell,
a:hover .lucide-bell,
a:hover [data-lucide="bell"] svg,
a:hover .ph-bell,
.nav-item:hover .lucide-bell,
.nav-item:hover [data-lucide="bell"] svg {
  animation: lucide-bell-swing 0.65s cubic-bezier(0.25, 1, 0.5, 1) 1;
}
@keyframes lucide-bell-swing {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(11deg); }
  40%  { transform: rotate(-9deg); }
  60%  { transform: rotate(5deg); }
  80%  { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

/* 2. SETTINGS / GEAR (Giro Preciso e Suave no Hover) */
.lucide-settings,
.lucide-gear,
[data-lucide="settings"] svg,
.ph-gear,
.ph-gear-six {
  transform-origin: 50% 50%;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
button:hover .lucide-settings,
button:hover [data-lucide="settings"] svg,
button:hover .ph-gear,
button:hover .ph-gear-six,
a:hover .lucide-settings,
a:hover [data-lucide="settings"] svg,
a:hover .ph-gear,
.btn:hover .lucide-settings,
.btn:hover [data-lucide="settings"] svg,
.btn:hover .ph-gear {
  transform: rotate(90deg) scale(1.08);
}

/* Rotação Contínua apenas quando expressamente solicitado pela classe .spin */
.lucide-spin,
.lucide-spin-continuous {
  animation: lucide-spin-kf 2s linear infinite;
  transform-origin: center center;
}
@keyframes lucide-spin-kf {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 3. DROPLET / GOTA DE ÁGUA (Squash & Stretch Hidráulico Suave) */
.lucide-droplet,
.lucide-droplets,
[data-lucide="droplet"] svg,
[data-lucide="droplets"] svg,
.ph-drop,
.ph-droplet {
  transform-origin: 50% 90%;
}
button:hover .lucide-droplet,
button:hover [data-lucide="droplet"] svg,
button:hover .ph-drop,
a:hover .lucide-droplet,
a:hover [data-lucide="droplet"] svg,
a:hover .ph-drop,
.switcher-option-card:hover .ph-drop,
.switcher-option-card:hover [data-lucide="droplet"] svg {
  animation: lucide-droplet-kf 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}
@keyframes lucide-droplet-kf {
  0%   { transform: translateY(0) scale(1, 1); }
  30%  { transform: translateY(-3px) scale(0.92, 1.12); }
  60%  { transform: translateY(1px) scale(1.08, 0.94); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* 4. SEARCH / LUPA (Varredura e Escala Confortável - Sem Tremer) */
.lucide-search,
[data-lucide="search"] svg,
.ph-magnifying-glass {
  transform-origin: 40% 40%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
button:hover .lucide-search,
button:hover [data-lucide="search"] svg,
button:hover .ph-magnifying-glass,
.search-box:hover .lucide-search,
.search-box:hover [data-lucide="search"] svg,
.search-box:hover .ph-magnifying-glass,
.header-search:focus-within [data-lucide="search"] svg {
  transform: scale(1.12) translate(1px, -1px);
}

/* 5. MAP-PIN / MARCADOR GEOGRÁFICO (Quique Único no Hover) */
.lucide-map-pin,
[data-lucide="map-pin"] svg,
.ph-map-pin {
  transform-origin: 50% 100%;
}
button:hover .lucide-map-pin,
button:hover [data-lucide="map-pin"] svg,
button:hover .ph-map-pin,
a:hover .lucide-map-pin,
a:hover [data-lucide="map-pin"] svg,
a:hover .ph-map-pin {
  animation: lucide-pin-kf 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}
@keyframes lucide-pin-kf {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-4px); }
  70%  { transform: translateY(1px) scale(1.05, 0.95); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* 6. GAUGE / MANÔMETRO / TELEMETRIA (Oscilação Confortável do Ponteiro) */
.lucide-gauge,
[data-lucide="gauge"] svg,
.ph-gauge {
  transform-origin: 50% 50%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
button:hover .lucide-gauge,
button:hover [data-lucide="gauge"] svg,
button:hover .ph-gauge,
a:hover .lucide-gauge,
a:hover [data-lucide="gauge"] svg,
a:hover .ph-gauge {
  transform: rotate(30deg) scale(1.06);
}

/* 7. CHECK & CHECK-CIRCLE (Pop de Confirmação) */
.lucide-check,
.lucide-check-circle,
.lucide-check-circle-2,
[data-lucide*="check"] svg,
.ph-check,
.ph-check-circle {
  transform-origin: center center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
button:hover [data-lucide*="check"] svg,
button:hover .ph-check,
.btn:hover [data-lucide*="check"] svg,
.btn:hover .ph-check {
  transform: scale(1.15);
}

/* 8. SPARKLES / IA & RAG (Cintilação Suave) */
.lucide-sparkles,
[data-lucide="sparkles"] svg,
.ph-sparkle {
  transform-origin: center center;
}
button:hover .lucide-sparkles,
button:hover [data-lucide="sparkles"] svg,
button:hover .ph-sparkle,
.btn-ai:hover [data-lucide="sparkles"] svg {
  animation: lucide-sparkle-kf 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1;
}
@keyframes lucide-sparkle-kf {
  0%   { transform: scale(1) rotate(0deg); }
  50%  { transform: scale(1.22) rotate(18deg); filter: drop-shadow(0 0 5px #38bdf8); }
  100% { transform: scale(1) rotate(0deg); }
}

/* 9. SETAS & LINKS EXTERNOS (Impulso Direcional) */
.lucide-arrow-right,
[data-lucide="arrow-right"] svg,
.ph-arrow-right {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
button:hover .lucide-arrow-right,
button:hover [data-lucide="arrow-right"] svg,
button:hover .ph-arrow-right,
a:hover .lucide-arrow-right,
a:hover [data-lucide="arrow-right"] svg,
a:hover .ph-arrow-right {
  transform: translateX(3px);
}

.lucide-arrow-left,
[data-lucide="arrow-left"] svg,
.ph-arrow-left {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
button:hover .lucide-arrow-left,
button:hover [data-lucide="arrow-left"] svg,
button:hover .ph-arrow-left,
a:hover .lucide-arrow-left,
a:hover [data-lucide="arrow-left"] svg,
a:hover .ph-arrow-left {
  transform: translateX(-3px);
}

.lucide-arrow-up-right,
.lucide-external-link,
[data-lucide="arrow-up-right"] svg,
[data-lucide="external-link"] svg,
.ph-arrow-square-out,
.ph-arrow-up-right {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
button:hover [data-lucide="external-link"] svg,
button:hover .ph-arrow-square-out,
a:hover [data-lucide="external-link"] svg,
a:hover .ph-arrow-square-out,
a:hover [data-lucide="arrow-up-right"] svg {
  transform: translate(2px, -2px);
}

/* 10. REFRESH / ROTATE (Giro Suave Único de 360°) */
.lucide-rotate-ccw,
.lucide-rotate-cw,
.lucide-refresh-cw,
[data-lucide*="rotate"] svg,
[data-lucide*="refresh"] svg,
.ph-arrows-clockwise,
.ph-arrow-clockwise {
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
button:hover [data-lucide*="rotate"] svg,
button:hover [data-lucide*="refresh"] svg,
button:hover .ph-arrows-clockwise,
button:hover .ph-arrow-clockwise {
  transform: rotate(360deg);
}

/* 11. ZAP & ENERGIA (Brilho e Escala Elástica) */
.lucide-zap,
[data-lucide="zap"] svg,
.ph-lightning {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.25s ease,
              color 0.2s ease;
}
button:hover .lucide-zap,
button:hover [data-lucide="zap"] svg,
button:hover .ph-lightning,
a:hover .lucide-zap,
a:hover [data-lucide="zap"] svg,
a:hover .ph-lightning {
  transform: scale(1.18);
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}

/* 12. SHIELD & SEGURANÇA (Pulso Protetor Suave) */
.lucide-shield,
.lucide-shield-check,
[data-lucide*="shield"] svg,
.ph-shield,
.ph-shield-check {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.25s ease;
}
button:hover [data-lucide*="shield"] svg,
button:hover .ph-shield,
button:hover .ph-shield-check {
  transform: scale(1.12);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

/* 13. ALERTA & SIRENE (Pulso Elegante - SEM VIBRAÇÃO/TREMOR) */
.lucide-alert-triangle,
.lucide-alert-circle,
.lucide-alert-octagon,
.lucide-siren,
[data-lucide*="alert"] svg,
[data-lucide="siren"] svg,
.ph-warning,
.ph-warning-circle,
.ph-siren {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.25s ease;
}
button:hover [data-lucide*="alert"] svg,
button:hover [data-lucide="siren"] svg,
button:hover .ph-warning,
button:hover .ph-siren {
  transform: scale(1.12);
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6));
}

/* 14. LAYERS, DASHBOARDS & QUADROS (Leve Elevação 3D) */
.lucide-layers,
.lucide-layout-dashboard,
.lucide-panels-top-left,
[data-lucide="layers"] svg,
[data-lucide="layout-dashboard"] svg,
[data-lucide="panels-top-left"] svg,
.ph-squares-four,
.ph-map-trifold {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
button:hover [data-lucide="layers"] svg,
button:hover [data-lucide="layout-dashboard"] svg,
button:hover [data-lucide="panels-top-left"] svg,
button:hover .ph-squares-four,
.system-switcher-trigger:hover .switcher-icon {
  transform: translateY(-2px) scale(1.08);
}

/* 15. USUÁRIOS & EQUIPE (Elevação Amigável) */
.lucide-users,
.lucide-user,
[data-lucide="users"] svg,
[data-lucide="user"] svg,
.ph-users,
.ph-user {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
button:hover [data-lucide="users"] svg,
button:hover .ph-users {
  transform: translateY(-2px) scale(1.06);
}

/* 16. TROPHY & LANDMARK (Brilho Nobre) */
.lucide-trophy,
.lucide-landmark,
[data-lucide="trophy"] svg,
[data-lucide="landmark"] svg,
.ph-trophy {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.25s ease;
}
button:hover [data-lucide="trophy"] svg,
button:hover .ph-trophy,
a:hover [data-lucide="trophy"] svg {
  transform: scale(1.14) translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}

/* --------------------------------------------------------------------------
   3. FARÓIS VETORIAIS (SUBSTITUIÇÃO DE EMOJIS CIRCULARES 🔴 🟡 🟢 🔵)
   -------------------------------------------------------------------------- */
.lucide-beacon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin: 0 4px;
  pointer-events: none;
}
.lucide-beacon::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: lucide-beacon-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.lucide-beacon::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.lucide-beacon.beacon-red::before { background: rgba(239, 68, 68, 0.5); }
.lucide-beacon.beacon-red::after  { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

.lucide-beacon.beacon-amber::before { background: rgba(245, 158, 11, 0.5); }
.lucide-beacon.beacon-amber::after  { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

.lucide-beacon.beacon-green::before { background: rgba(34, 197, 94, 0.5); }
.lucide-beacon.beacon-green::after  { background: #22c55e; box-shadow: 0 0 6px #22c55e; }

.lucide-beacon.beacon-blue::before { background: rgba(56, 189, 248, 0.5); }
.lucide-beacon.beacon-blue::after  { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }

@keyframes lucide-beacon-ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Ícones inline para substituição pontual de emojis */
.lucide-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: 0 3px 1px 3px;
  font-style: normal;
  line-height: 1;
}
.lucide-inline-icon svg {
  width: 1.15em;
  height: 1.15em;
}
