/* ============================================================
   LicitaFree — Tech Visual Effects
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   G. SLIDE-IN PARA LINHAS DA TABELA
══════════════════════════════════════════════════════════ */
@keyframes row-slide-in {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.row-slide {
  animation: row-slide-in .28s cubic-bezier(.4,0,.2,1) both;
}

/* ══════════════════════════════════════════════════════════
   M. CONFETTI CANVAS
══════════════════════════════════════════════════════════ */
#lf-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
}

/* ══════════════════════════════════════════════════════════
   AVATAR COLORIDO
══════════════════════════════════════════════════════════ */
.lf-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
  user-select: none;
}
.lf-avatar-lg { width: 40px; height: 40px; font-size: 16px; }

/* ══════════════════════════════════════════════════════════
   BADGE USUÁRIOS ONLINE
══════════════════════════════════════════════════════════ */
#lf-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(5,150,105,.12);
  border: 1px solid rgba(5,150,105,.25);
  border-radius: 20px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  cursor: default;
  user-select: none;
}
#lf-online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: online-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes online-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(16,185,129,.0); }
}

/* ══════════════════════════════════════════════════════════
   B. BARRA DE PROGRESSO NO TOPO
══════════════════════════════════════════════════════════ */
#lf-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #7c3aed, #06b6d4);
  background-size: 200% 100%;
  animation: lf-progress-shimmer 1.2s linear infinite;
  z-index: 99999;
  border-radius: 0 2px 2px 0;
  transition: width .25s ease, opacity .3s ease;
  box-shadow: 0 0 10px rgba(59,130,246,.6);
  pointer-events: none;
}
@keyframes lf-progress-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════════════════
   C. BORDA GRADIENTE ANIMADA NOS CARDS
══════════════════════════════════════════════════════════ */
@keyframes grad-border-move {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.grad-border {
  border: 1.5px solid transparent !important;
  background-clip: padding-box;
  box-shadow:
    0 0 0 1.5px rgba(59,130,246,.0),
    0 2px 8px rgba(0,0,0,.06) !important;
  animation: grad-border-glow 3s ease-in-out infinite !important;
  transition: box-shadow .3s !important;
}
.grad-border:hover {
  animation: grad-border-glow-hover 2s ease-in-out infinite !important;
}
@keyframes grad-border-glow {
  0%,100% { box-shadow: 0 0 0 1.5px rgba(59,130,246,.35), 0 4px 16px rgba(59,130,246,.08); }
  33%      { box-shadow: 0 0 0 1.5px rgba(124,58,237,.4),  0 4px 16px rgba(124,58,237,.1); }
  66%      { box-shadow: 0 0 0 1.5px rgba(6,182,212,.35),  0 4px 16px rgba(6,182,212,.08); }
}
@keyframes grad-border-glow-hover {
  0%,100% { box-shadow: 0 0 0 2px rgba(59,130,246,.6),  0 8px 24px rgba(59,130,246,.2); }
  33%      { box-shadow: 0 0 0 2px rgba(124,58,237,.65), 0 8px 24px rgba(124,58,237,.2); }
  66%      { box-shadow: 0 0 0 2px rgba(6,182,212,.6),   0 8px 24px rgba(6,182,212,.2); }
}

/* ══════════════════════════════════════════════════════════
   D. SIDEBAR — mantém cor original + sombra sutil
══════════════════════════════════════════════════════════ */
.sidebar {
  background: linear-gradient(180deg,#0c1428 0%,#111827 60%,#0f172a 100%) !important;
  border-right: 1px solid rgba(255,255,255,.07) !important;
  box-shadow: 4px 0 24px rgba(0,0,0,.3) !important;
}

/* ══════════════════════════════════════════════════════════
   E. TOAST NOTIFICATIONS
══════════════════════════════════════════════════════════ */
#lf-toast-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99998;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}
.lf-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.15);
  pointer-events: auto;
  cursor: pointer;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.15);
  transform: translateX(110%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
  position: relative;
  overflow: hidden;
}
.lf-toast.show {
  transform: translateX(0);
  opacity: 1;
}
.lf-toast.hide {
  transform: translateX(110%);
  opacity: 0;
}
/* Linha de progresso embaixo do toast */
.lf-toast-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  border-radius: 0 0 14px 14px;
  background: rgba(255,255,255,.4);
  animation: toast-shrink 3.5s linear forwards;
}
@keyframes toast-shrink {
  from { width: 100%; }
  to   { width: 0%; }
}

/* Variantes de cor */
.lf-toast.ok   { background: linear-gradient(135deg, #0f4c2a, #065f46); }
.lf-toast.err  { background: linear-gradient(135deg, #450a0a, #991b1b); }
.lf-toast.info { background: linear-gradient(135deg, #0c1e4a, #1e3a8a); }
.lf-toast.warn { background: linear-gradient(135deg, #451a03, #92400e); }

/* Ícone do toast */
.lf-toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}
.lf-toast-msg { flex: 1; line-height: 1.4; }

/* ══════════════════════════════════════════════════════════
   RIPPLE EFFECT
══════════════════════════════════════════════════════════ */
.ripple-btn { position: relative; overflow: hidden; }
.ripple-btn::after {
  content: '';
  position: absolute;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  transform: translate(-50%, -50%);
  transition: width .5s, height .5s, opacity .5s;
  opacity: 0;
  pointer-events: none;
  top: 50%; left: 50%;
}
.ripple-btn:active::after { width: 300px; height: 300px; opacity: 1; transition: 0s; }

/* ══════════════════════════════════════════════════════════
   CARD HOVER LIFT
══════════════════════════════════════════════════════════ */
.card-lift {
  transition: transform .2s cubic-bezier(.4,0,.2,1),
              box-shadow .2s cubic-bezier(.4,0,.2,1) !important;
}
.card-lift:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.13) !important;
}

/* ══════════════════════════════════════════════════════════
   SKELETON LOADING
══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: 6px;
  color: transparent !important;
  pointer-events: none;
}
@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════════════════
   TYPEWRITER CURSOR
══════════════════════════════════════════════════════════ */
.typewriter::after {
  content: '|';
  animation: blink-cursor .7s step-end infinite;
  color: #60a5fa;
  margin-left: 2px;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ══════════════════════════════════════════════════════════
   NEURAL NETWORK LOADER
══════════════════════════════════════════════════════════ */
.neural-loader {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 24px;
}
.neural-canvas-wrap { width: 200px; height: 110px; }
.neural-canvas-wrap canvas { width: 100%; height: 100%; }
.neural-status { font-size: 13px; font-weight: 600; color: #3b82f6; text-align: center; min-height: 20px; }
.neural-bar { width: 200px; height: 3px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.neural-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #7c3aed);
  border-radius: 4px;
  animation: neural-progress 3s ease forwards;
}
@keyframes neural-progress {
  0%{width:5%} 30%{width:40%} 60%{width:72%} 85%{width:88%} 100%{width:95%}
}

/* ══════════════════════════════════════════════════════════
   PARTICLES CANVAS
══════════════════════════════════════════════════════════ */
#particles-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

/* ══════════════════════════════════════════════════════════
   SMOOTH PAGE TRANSITION
══════════════════════════════════════════════════════════ */
body { animation: page-in .25s ease; }
@keyframes page-in { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* ══════════════════════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.45); }
