input,
select {
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.2s;
}

input:hover,
select:hover {
  border-color: #10b981;
}

input:focus,
select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

/* Transições suaves de views */
section {
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- CONFIGURAÇÕES DO THEME DA QUARK FINANCE --- */
.tab-btn.active {
  background-color: #1e293b !important;
  color: #10b981 !important;
  border-left: 4px solid #10b981;
}

/* --- BOTÕES FLUTUANTES (CONTAINERS) --- */
.fixed-container {
  position: fixed;
  bottom: 20px;
  z-index: 9999;
  animation: float 3s ease-in-out infinite;
}

.fixed-container.left {
  left: 24px;
}
.fixed-container.right {
  right: 24px;
  animation-delay: 0.5s;
}

/* --- BOTÃO GLASSMORPHISM EMERALD DESIGN (ESQUERDA) --- */
.btn-glass {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(
    135deg,
    rgba(56, 62, 75, 0.8) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glass:active {
  transform: scale(0.98);
}

.logo-circle {
  width: 33px;
  height: 33px;
  padding: 3px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-label {
  color: #1e293b;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- BOTÃO WHATSAPP PREMIUM (DIREITA) --- */
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-whatsapp:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

.btn-whatsapp img {
  width: 28px;
  height: 28px;
}

/* --- ENGINE DE ANIMAÇÕES --- */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(146, 198, 219, 0.63),
    transparent
  );
  transform: rotate(30deg);
  animation: shine-sweep 4s infinite ease-in-out;
}

@keyframes shine-sweep {
  0% {
    left: -100%;
  }
  20% {
    left: 150%;
  }
  100% {
    left: 150%;
  }
}

/* --- MODAL CUSTOMIZADO QUARK FINANCE --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75); /* Fundo escuro semi-transparente */
  backdrop-filter: blur(5px); /* Efeito de desfoque no fundo */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.modal-container {
  background: #cbd5e1;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  padding: 24px;
  box-shadow:
    inset 0 0 65px #1e293b,
    0 0 5px #cbd5e1;
  text-align: center;
  animation: modalScaleUp 0.3s ease forwards;
}

.modal-logo {
  height: 50px;
  object-fit: contain;
  margin: 0 auto 16px auto;
}

.modal-body h3 {
  color: #1e293b;
  font-size: 1.5rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.modal-body p {
  color: #1e293b; /* Texto claro slate-300 */
  font-size: 1rem;
  margin-bottom: 12px !important;
  text-align: center !important;
}

.modal-btn {
  box-shadow:
    inset 0 0 100px #059669,
    0 0 7px #1e293b;
  color: #1e293b;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition:
    background 0.2s ease-in-out,
    transform 0.3s ease-in-out;
}

.modal-btn:hover {
  background: #027953;
  color: #cbd5e1;
  transform: translateY(-3px);
}

.modal-btn:active {
  transform: scale(0.98);
}

/* Classe utilitária para esconder o modal */
.modal-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* Animação suave de abertura */
@keyframes modalScaleUp {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Desgruda a seta nativa da borda direita em TODOS os selects */
select {
  appearance: none; /* Remove o visual padrão do sistema */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 16px) center !important; /* Afastamento elegante da borda */
  padding-right: 40px !important;
}

/* Deixa o ícone do calendário BRANCO */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  margin-right: 8px; /* Afastamento da borda */
}

/* Deixa o ícone do relógio BRANCO */
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  margin-right: 8px; /* Afastamento da borda */
}

#authForm {
  transition: 0.35s;
}

.auth-switching {
  pointer-events: none;
}

.auth-hide {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  filter: blur(5px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    filter 0.45s ease;
}

.auth-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    filter 0.45s ease;
}

/* ======================================
BOTÃO GOOGLE
====================================== */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Espaçamento menor em mobile */
  background: #ffffff;
  color: #0f172b;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  box-shadow:
    inset 0 2px 15px #9fb8b4,
    0 8px 20px rgba(0, 0, 0, 0.2);
  white-space: nowrap; /* Impede a quebra da linha do texto */
}

.google-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 10px rgba(255, 255, 255, 0.95),
    0 12px 25px rgba(0, 0, 0, 0.28);
}

.google-btn:active {
  transform: scale(0.98);
}

.flag-active {
  transform: scale(1.15);
  opacity: 1;
  filter: none;
  transition: all 0.3s ease;
}

.flag-inactive {
  transform: scale(0.9);
  opacity: 0.45;
  filter: grayscale(1);
  transition: all 0.3s ease;
}

.quark-modal-message {
  /* white-space: pre-wrap; */
  display: block;
  line-height: 1.2;

  margin: 0 !important;
  padding: 0 !important;

  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* --- BARRA DE ROLAGEM HORIZONTAL VISÍVEL (COR DOS BOTÕES DE SETA) --- */
.tabela-container-scroll {
  overflow-x: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #0f172a; /* Azul do Período e fundo escuro */
}

.tabela-container-scroll::-webkit-scrollbar {
  height: 10px !important;
  display: block !important;
}

.tabela-container-scroll::-webkit-scrollbar-track {
  background: #0f172a !important;
  border-radius: 6px;
}

.tabela-container-scroll::-webkit-scrollbar-thumb {
  background: #3b82f6 !important;
  border-radius: 6px;
  border: 2px solid #0f172a;
}

.tabela-container-scroll::-webkit-scrollbar-thumb:hover {
  background: #60a5fa !important;
}

/* --- DROPDOWNS NATIVOS COM PADDING E RESPIRO --- */
.select-tabela-custom {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
  border-radius: 0.375rem !important;
  padding: 0.375rem 0.5rem !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  cursor: pointer;
  outline: none;
}

.select-tabela-custom option {
  background-color: #0f172a !important;
  color: #ffffff !important;
  padding: 8px !important;
}

/* Garante altura máxima com scroll nos selects da tabela de Saídas */
.select-cat-saida option {
  background-color: #0f172a; /* Slate 900 */
  color: #ffffff;
  padding: 8px;
}

/* Limita o popup do select nativo quando aberto */
select.select-cat-saida {
  max-height: 160px;
}

/* Limita a altura das listas suspensas dos selects na tabela de saídas com barra de rolagem */
.select-cat-saida option {
  background-color: #0f172a; /* Slate-900 */
  color: #ffffff;
  padding: 8px;
}

/* Para navegadores baseados em Chromium, limita a caixa visual */
select.select-cat-saida {
  max-height: 200px;
}

/* Customização Global de Scrollbar */
::-webkit-scrollbar {
  width: 6px; /* Largura da barra vertical */
  height: 6px; /* Altura da barra horizontal */
}

::-webkit-scrollbar-track {
  background: #0f172a; /* Fundo azul escuro/apagado */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #06b6d4; /* Azul ciano (cor da imagem 2) */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0891b2; /* Ciano levemente mais escuro no hover */
}

/* Suporte para Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #06b6d4 #0f172a;
}

/* Container de legenda do Chart.js com grid dinâmico e responsivo */
#categoryPieChart + div ul,
.chartjs-legend {
  display: grid !important;
  /* Cria até 4 colunas em telas amplas e reduz automaticamente em telas menores */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 10px 16px !important;
  justify-items: start !important;
  width: 100% !important;
  padding-top: 12px !important;
}

/* Garante texto branco brilhante e sem cortes na legenda */
.chartjs-legend li,
.chartjs-legend span {
  color: #ffffff !important;
  white-space: nowrap !important;
  font-weight: 500 !important;
}

/* Container de legenda em Grid para 4 colunas em telas grandes */
.custom-chart-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  width: 100%;
  padding-top: 10px;
}

/* Item individual da legenda */
.legend-item {
  display: flex;
  items-center: center;
  gap: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #ffffff !important; /* Texto 100% Branco */
  white-space: nowrap;
}

/* Cor do quadrado de marcação */
.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Scrollbar estilizada para o container de categorias */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* =========================================================================
   CONTAINER DA PROPAGANDA QUARKZETTA (LAYOUT, BACKGROUND & RESPONSIVIDADE)
============================================================================= */
.tech-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 220px;
  margin-top: 3rem;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(10, 123, 255, 0.12), transparent 60%),
    linear-gradient(135deg, #0b1220, #101b33, #0d1b2a);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.03),
    0 10px 40px rgba(0, 0, 0, 0.25);
}

/* Canvas das Partículas */
#particlesCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Envolvente do Link / Logos */
.tech-container .relative {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.quarkzetta-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Pausa a animação das logos quando o usuário passa o mouse por cima */
.quarkzetta-link:hover .logoQuark,
.quarkzetta-link:hover .logoQuarkName {
  animation-play-state: paused !important;
}

.logoQuark {
  width: clamp(50px, 10vw, 70px);
  animation: magnet-zigzag-logo 20s ease-in-out infinite;
  will-change: transform;
  z-index: 2;
}

.logoQuarkName {
  width: clamp(120px, 30vw, 180px);
  animation: magnet-zigzag-nome 20s ease-in-out infinite;
  will-change: transform;
  z-index: 2;
}

/* =======================================================
   ANIMAÇÕES ZIGZAG (MOBILE)
======================================================= */
@keyframes magnet-zigzag-logo {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-48px, 0px);
  }
  40% {
    transform: translate(60px, -90px);
  }
  60% {
    transform: translate(168px, 0);
  }
  80% {
    transform: translate(60px, 88px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes magnet-zigzag-nome {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(48px, 0px);
  }
  40% {
    transform: translate(-25px, 92px);
  }
  60% {
    transform: translate(-98px, 0);
  }
  80% {
    transform: translate(-25px, -92px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.quark-progress-track {
  width: 100%;
  height: 12px;
  background: #94a3b8;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.quark-progress-bar {
  height: 100%;
  width: 0%;
  background: #06b6d4;
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* =======================================================
   ANIMAÇÕES ZIGZAG 360px
======================================================= */
@media (min-width: 360px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-68px, 0px);
    }
    40% {
      transform: translate(58px, -90px);
    }
    60% {
      transform: translate(188px, 0);
    }
    80% {
      transform: translate(58px, 88px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(68px, 0px);
    }
    40% {
      transform: translate(-30px, 92px);
    }
    60% {
      transform: translate(-118px, 0);
    }
    80% {
      transform: translate(-30px, -92px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   ANIMAÇÕES ZIGZAG 480px
======================================================= */
@media (min-width: 480px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-115px, 0px);
    }
    40% {
      transform: translate(70px, -88px);
    }
    60% {
      transform: translate(259px, 0);
    }
    80% {
      transform: translate(70px, 88px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(116px, 0px);
    }
    40% {
      transform: translate(-25px, 90px);
    }
    60% {
      transform: translate(-166px, 0);
    }
    80% {
      transform: translate(-25px, -90px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   ANIMAÇÕES ZIGZAG 640px
======================================================= */
@media (min-width: 640px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-168px, 0px);
    }
    40% {
      transform: translate(85px, -84px);
    }
    60% {
      transform: translate(349px, 0);
    }
    80% {
      transform: translate(85px, 84px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(170px, 0px);
    }
    40% {
      transform: translate(-50px, 85px);
    }
    60% {
      transform: translate(-235px, 0);
    }
    80% {
      transform: translate(-50px, -85px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (TABLETS >= 768px)
======================================================= */
@media (min-width: 768px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-95px, 0px);
    }
    40% {
      transform: translate(85px, -82px);
    }
    60% {
      transform: translate(275px, 0);
    }
    80% {
      transform: translate(85px, 82px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(95px, 0px);
    }
    40% {
      transform: translate(-53px, 85px);
    }
    60% {
      transform: translate(-166px, 0);
    }
    80% {
      transform: translate(-53px, -85px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (LAPTOP >= 1024px)
======================================================= */
@media (min-width: 1024px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-221px, 0px);
    }
    40% {
      transform: translate(87px, -80px);
    }
    60% {
      transform: translate(403px, 0);
    }
    80% {
      transform: translate(87px, 80px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(221px, 0px);
    }
    40% {
      transform: translate(-57px, 83px);
    }
    60% {
      transform: translate(-290px, 0);
    }
    80% {
      transform: translate(-57px, -83px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (LAPTOP >= 1200px)
======================================================= */
@media (min-width: 1200px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-310px, 0px);
    }
    40% {
      transform: translate(87px, -80px);
    }
    60% {
      transform: translate(490px, 0);
    }
    80% {
      transform: translate(87px, 80px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(310px, 0px);
    }
    40% {
      transform: translate(-57px, 83px);
    }
    60% {
      transform: translate(-380px, 0);
    }
    80% {
      transform: translate(-57px, -83px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (LAPTOP >= 1280px)
======================================================= */
@media (min-width: 1280px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-350px, 0px);
    }
    40% {
      transform: translate(87px, -80px);
    }
    60% {
      transform: translate(530px, 0);
    }
    80% {
      transform: translate(87px, 80px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(350px, 0px);
    }
    40% {
      transform: translate(-57px, 83px);
    }
    60% {
      transform: translate(-420px, 0);
    }
    80% {
      transform: translate(-57px, -83px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (LAPTOP >= 1366px)
======================================================= */
@media (min-width: 1366px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-390px, 0px);
    }
    40% {
      transform: translate(87px, -80px);
    }
    60% {
      transform: translate(570px, 0);
    }
    80% {
      transform: translate(87px, 80px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(395px, 0px);
    }
    40% {
      transform: translate(-57px, 83px);
    }
    60% {
      transform: translate(-465px, 0);
    }
    80% {
      transform: translate(-57px, -83px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (LAPTOP >= 1440px)
======================================================= */
@media (min-width: 1440px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-430px, 0px);
    }
    40% {
      transform: translate(87px, -80px);
    }
    60% {
      transform: translate(610px, 0);
    }
    80% {
      transform: translate(87px, 80px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(430px, 0px);
    }
    40% {
      transform: translate(-57px, 83px);
    }
    60% {
      transform: translate(-500px, 0);
    }
    80% {
      transform: translate(-57px, -83px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (LAPTOP >= 1920px)
======================================================= */
@media (min-width: 1920px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-670px, 0px);
    }
    40% {
      transform: translate(87px, -80px);
    }
    60% {
      transform: translate(850px, 0);
    }
    80% {
      transform: translate(87px, 80px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(670px, 0px);
    }
    40% {
      transform: translate(-57px, 83px);
    }
    60% {
      transform: translate(-740px, 0);
    }
    80% {
      transform: translate(-57px, -83px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}

/* =======================================================
   RESPONSIVIDADE (LAPTOP >= 2560px)
======================================================= */
@media (min-width: 2560px) {
  @keyframes magnet-zigzag-logo {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(-985px, 0px);
    }
    40% {
      transform: translate(68px, -80px);
    }
    60% {
      transform: translate(1170px, 0);
    }
    80% {
      transform: translate(68px, 80px);
    }
    100% {
      transform: translate(0, 0);
    }
  }

  @keyframes magnet-zigzag-nome {
    0% {
      transform: translate(0, 0);
    }
    20% {
      transform: translate(990px, 0px);
    }
    40% {
      transform: translate(-57px, 83px);
    }
    60% {
      transform: translate(-1060px, 0);
    }
    80% {
      transform: translate(-57px, -83px);
    }
    100% {
      transform: translate(0, 0);
    }
  }
}
/* ===========================================================
   FIM DA ESTILIZAÇÃO DO CONTAINER DA PROPAGANDA QUARKZETTA
============================================================== */

/* =========================================================
   CONTAINERS E CARDS GLOBAIS
   ========================================================= */
.ad-card {
  display: flex;
  align-items: center;
  border-radius: 20px;
  text-decoration: none;
  color: #0f172a !important;
  max-width: 600px;
  width: calc(100% - 2rem);
  margin: 1.5rem auto;
  box-sizing: border-box;
  transition: transform 0.2s;
  overflow: hidden;
}

/* --- ANÚNCIO FDD (1º Anúncio) --- */
.ad-affiliate-container-FDD {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  background-color: #f9f9f9;
  max-width: 600px;
  width: calc(100% - 2rem);
  margin: 1.5rem auto;
  box-sizing: border-box;
  animation: swing-banner 2.5s ease-in-out infinite;
}

.ad-card-FDD {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  box-shadow: inset 0 0 25px #31a9ad;
  text-decoration: none;
  color: #0f172a !important;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.2s;
  overflow: hidden;
}

.ad-image-FDD {
  width: 110px;
  height: 110px;
  border-radius: 20px;
  margin: 15px 0 15px 15px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 10px #1b7679;
}

.ad-content-FDD {
  text-align: center;
  padding: 15px;
  flex: 1;
}

.ad-title-FDD {
  font-weight: bold;
  text-align: center;
  font-size: 1.1rem;
  color: #1b7679;
  margin-bottom: 5px;
}

.ad-button-FDD {
  position: relative;
  background: white;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 18px;
  font-weight: bold;
  box-shadow:
    inset 0 0 15px #1b7679,
    0 3px 7px #155b5e;
  display: inline-block;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  animation: balancar 2.5s ease-in-out infinite;
}

.ad-button-FDD::before {
  content: "< 💶 📓 💰 >";
  position: absolute;
  font-size: 15px;
  opacity: 0;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: fly 2.3s infinite;
}

.ad-button-FDD::after {
  content: "< 💰 💶 📓 >";
  position: absolute;
  font-size: 15px;
  opacity: 0;
  top: 0;
  right: 50%;
  transform: translateX(50%);
  animation: fly 2.3s infinite;
  animation-delay: 0.7s;
}

/* --- DEVCLUB (2º Anúncio) --- */
.ad-affiliate-container-devClub {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  background-color: #f9f9f9;
  max-width: 600px;
  width: calc(100% - 2rem);
  margin: 1.5rem auto;
  box-sizing: border-box;
  animation: swing-banner2 2.5s ease-in-out infinite;
}

.ad-card-devClub {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  box-shadow: inset 0 0 25px #420f69;
  text-decoration: none;
  color: #0f172a !important;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.2s;
  overflow: hidden;
}

.ad-image-devClub {
  width: 110px;
  height: 110px;
  border-radius: 20px;
  margin: 15px 0 15px 15px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 10px #420f69;
}

.ad-content-devClub {
  text-align: center;
  padding: 15px;
  flex: 1;
}

.ad-title-devClub {
  font-weight: bold;
  text-align: center;
  font-size: 1.1rem;
  color: #420f69;
  margin-bottom: 5px;
}

.ad-button-devClub {
  position: relative;
  background: white;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 18px;
  font-weight: bold;
  box-shadow:
    inset 0 0 15px #6f31ad,
    0 3px 7px #552585;
  display: inline-block;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  animation: balancar 2.5s ease-in-out infinite;
}

.ad-button-devClub #dev {
  color: #73cf0c;
  margin-right: 1px;
}

.ad-button-devClub #club {
  color: #6e30ad;
}

.ad-button-devClub::before {
  content: "< 🖥️ 🧠 📱 >";
  position: absolute;
  font-size: 15px;
  opacity: 0;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: fly 2.3s infinite;
}

.ad-button-devClub::after {
  content: "< 📱 🖥️ 🧠 >";
  position: absolute;
  font-size: 15px;
  opacity: 0;
  top: 0;
  right: 50%;
  transform: translateX(50%);
  animation: fly 2.3s infinite;
  animation-delay: 0.7s;
}

/* --- EBOOK VIVER NA ESPANHA (3º Anúncio) --- */
.ad-affiliate-container-ebookVNE {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  background-color: #f9f9f9;
  max-width: 600px;
  width: calc(100% - 2rem);
  margin: 1.5rem auto;
  box-sizing: border-box;
  animation: swing-banner 2.5s ease-in-out infinite;
}

.ad-card-ebookVNE {
  display: flex;
  align-items: center;
  border-radius: 20px;
  box-shadow: inset 0 0 25px #f1bf00;
  text-decoration: none;
  color: #0f172a !important;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.2s;
  overflow: hidden;
}

.ad-image-ebookVNE {
  width: 110px;
  height: auto;
  object-fit: cover;
  border-radius: 20px;
  margin-left: 3%;
  flex-shrink: 0;
}

.ad-content-ebookVNE {
  text-align: center;
  padding: 15px;
  flex: 1;
}

.ad-title-ebookVNE {
  font-weight: bold;
  font-size: 1.1rem;
  color: #b60229;
  margin-bottom: 5px;
}

.ad-text {
  font-size: 1rem;
  color: #0f172ace;
}

.ad-button-ebookVNE {
  position: relative;
  color: #b60229;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 18px;
  font-weight: bold;
  box-shadow:
    inset 0 0 15px #f1bf00,
    0 3px 7px #cea500;
  display: inline-block;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  animation: balancar 2.5s ease-in-out infinite;
}

.ad-button-ebookVNE::before {
  content: "🗺️ 🛩️ 🧳 ";
  position: absolute;
  font-size: 15px;
  opacity: 0;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: fly 2.3s infinite;
}

.ad-button-ebookVNE::after {
  content: "🧳 🗺️ 🛩️ ";
  position: absolute;
  font-size: 15px;
  opacity: 0;
  top: 0;
  right: 50%;
  transform: translateX(50%);
  animation: fly 2.3s infinite;
  animation-delay: 0.7s;
}

/* --- ANIMAÇÕES --- */
@keyframes balancar {
  0%,
  100% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(-7deg);
  }
  20% {
    transform: rotate(7deg);
  }
  30% {
    transform: rotate(-7deg);
  }
  40% {
    transform: rotate(7deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

@keyframes fly {
  0% {
    transform: translate(-30%, 0) scale(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(15px, -50px) scale(1.1);
    opacity: 0;
  }
}

@keyframes swing-banner {
  0%,
  100% {
    transform: translateX(5px);
  }
  50% {
    transform: translateX(-5px);
  }
}

@keyframes swing-banner2 {
  0%,
  100% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
}

/* --- CONFIGURAÇÕES DO FOOTER --- */
.main-footer {
  width: 100%;
  padding-top: 40px;
  margin-top: auto;
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  text-align: center;
  padding-top: 24px;
}

.footer-logo-text {
  padding: 16px 0;
  color: var(--color-slate-700);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5em;
}

.footer-credits {
  color: var(--color-slate-700);
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 2rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
}

/* ============================================================
   QUARK FINANCE — PÁGINAS JURÍDICAS
   Termos de Uso + Política de Privacidade
   ============================================================ */
.legal-page {
  margin: 0;
  min-height: 100vh;
  background: #020617;
  color: #f8fafc;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

/* ============================================================
   CABEÇALHO
   ============================================================ */
.legal-header {
  width: 100%;
  min-height: 80px;
  padding: 0 6.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  background: #0f172a;
  border-bottom: 1px solid #1e293b;

  box-sizing: border-box;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.legal-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.legal-brand-name {
  color: #f8fafc;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.legal-back {
  color: #34d399;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.legal-back:hover {
  color: #6ee7b7;
  transform: translateY(-1px);
}

/* ============================================================
   ÁREA PRINCIPAL
   ============================================================ */
.legal-main {
  width: 100%;
  min-height: calc(100vh - 80px);
  padding: 40px 20px 70px;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  box-sizing: border-box;
}

/* ============================================================
   CARD PRINCIPAL
   ============================================================ */
.legal-card {
  width: 100%;
  max-width: 1000px;

  background: #1e293b;

  border: 1px solid #475569;
  border-radius: 24px;

  padding: 32px;

  box-sizing: border-box;

  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   BARRA DE IDIOMAS
   ============================================================ */
.legal-toolbar {
  width: 100%;

  display: flex;
  justify-content: flex-end;
  align-items: center;

  margin-bottom: 26px;
}

.legal-language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-language-btn {
  width: 42px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  background: #0f172a;

  border: 1px solid #475569;
  border-radius: 11px;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.legal-language-btn:hover {
  transform: translateY(-2px);
  background: #1e293b;
  border-color: #64748b;
}

.legal-language-btn.active {
  border-color: #22d3ee;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.35),
    0 0 18px rgba(34, 211, 238, 0.12);
}

.legal-flag {
  width: 26px;
  height: 18px;

  display: block;

  object-fit: cover;

  border-radius: 3px;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.legal-language-btn:hover .legal-flag {
  transform: scale(1.06);
}

/* ============================================================
   TÍTULO
   ============================================================ */
.legal-heading {
  margin-bottom: 34px;
}

.legal-heading h1 {
  margin: 0;

  color: #ffffff;

  font-size: clamp(2.25rem, 5vw, 3.8rem);
  line-height: 1.05;
  font-weight: 800;

  letter-spacing: -0.03em;
}

.legal-updated {
  margin: 12px 0 0;

  color: #94a3b8;

  font-size: 14px;
  line-height: 1.5;
}

.legal-updated strong {
  color: #f8fafc;
}

/* ============================================================
   CONTEÚDO JURÍDICO
   ============================================================ */
.legal-content {
  width: 100%;
}

.legal-section {
  margin: 0 0 34px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 12px;

  color: #f8fafc;

  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 750;
}

.legal-section p {
  margin: 0 0 12px;

  color: #cbd5e1;

  font-size: 15px;
  line-height: 1.85;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.sidebar-avatar {
  position: relative;
  border: 0;
  padding: 0;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 50px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #020617;
  font-size: 13px;
  font-weight: 900;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(2, 6, 23, 0.62);
  color: #f8fafc;

  opacity: 0;
  transition: opacity 0.2s ease;

  pointer-events: none;
}

.sidebar-avatar:hover .sidebar-avatar-overlay {
  opacity: 1;
}

.language-nav a.active img {
  transform: scale(1.15);
  opacity: 1;
  filter: none;
}

.language-nav a:not(.active) img {
  transform: scale(0.9);
  opacity: 0.45;
  filter: grayscale(1);
}

.sidebar-footer {
  margin-top: auto;
}

/* ============================================================
   SELETOR DE IDIOMAS — TOPO SUPERIOR DIREITO
   ============================================================ */
#languageSwitcher {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1100;
}

/* ============================================================
   QUARK FINANCE — SIDEBAR DESKTOP + PERFIL DO USUÁRIO
   ============================================================ */
#appSidebar {
  align-self: stretch;
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Responsividade: Reduz o número de colunas em telas menores */
@media (max-width: 1280px) {
  .custom-chart-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .custom-chart-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   MOBILE / TABLET — ATÉ 768px
   A sidebar acompanha somente o conteúdo necessário.
   ============================================================ */
@media (max-width: 768px) {
  .legal-header {
    min-height: 72px;
    padding: 0 20px;
  }

  .legal-logo {
    width: 120px;
  }

  .legal-brand-name {
    font-size: 15px;
  }

  .legal-back {
    font-size: 13px;
  }

  .legal-main {
    padding: 24px 12px 50px;
  }

  .legal-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .legal-toolbar {
    margin-bottom: 22px;
  }

  .legal-heading {
    margin-bottom: 28px;
  }

  .legal-heading h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .legal-section {
    margin-bottom: 28px;
  }

  .legal-section h2 {
    font-size: 1.12rem;
  }

  .legal-section p {
    font-size: 14px;
    line-height: 1.75;
  }

  #appSidebar {
    min-height: auto;
    height: auto;
  }

  .sidebar-footer {
    margin-top: 1rem;
  }

  #logoutBtn {
    margin-top: 0.75rem !important;
  }
}

@media (max-width: 640px) {
  .custom-chart-legend {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .ad-affiliate-container-ebookVNE,
  .ad-affiliate-container-devClub,
  .ad-affiliate-container-FDD {
    width: calc(100% - 2.5rem) !important;
    margin: 1.2rem auto !important;
  }

  .ad-card-ebookVNE,
  .ad-card-devClub,
  .ad-card-FDD {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 20px 15px !important;
  }

  .ad-image-ebookVNE,
  .ad-image-devClub,
  .ad-image-FDD {
    margin: 0 auto 15px auto !important;
  }

  .ad-content-ebookVNE,
  .ad-content-devClub,
  .ad-content-FDD {
    width: 100% !important;
    padding: 0 !important;
  }
}

@media (max-width: 520px) {
  .legal-header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .legal-brand {
    gap: 8px;
  }

  .legal-logo {
    width: 100px;
  }

  .legal-brand-name {
    font-size: 14px;
  }

  .legal-back {
    font-size: 12px;
  }

  .legal-main {
    padding: 16px 8px 40px;
  }

  .legal-card {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .legal-language-switcher {
    gap: 5px;
  }

  .legal-language-btn {
    width: 38px;
    height: 34px;
    border-radius: 9px;
  }

  .legal-flag {
    width: 24px;
    height: 17px;
  }

  .legal-heading h1 {
    font-size: 2rem;
  }

  .legal-updated {
    font-size: 12px;
  }

  .legal-section p {
    font-size: 13px;
    line-height: 1.7;
  }
}

/* ============================================================
   AJUSTE MOBILE — EVITA SOBREPOSIÇÃO DA FAIXA DE TESTE E LOGO
   ============================================================ */
@media (max-width: 480px) {
  #languageSwitcher {
    top: 100px;
    right: 10px;
    gap: 4px !important;
    padding: 4px !important;
  }

  #languageSwitcher button {
    padding: 2px !important;
  }

  #languageSwitcher img {
    width: 20px !important;
    height: 14px !important;
  }
}

/* Regras específicas para telas até 360px */
@media (max-width: 360px) {
  .google-btn {
    font-size: 12px !important;
    padding: 10px 8px !important;
    gap: 6px !important;
  }
}

/* ============================================================
   DESKTOP — A PARTIR DE 1024px
   Tablet grande / Notebook / Desktop
   ============================================================ */
@media (min-width: 1024px) {
  #appSidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: 16rem;
    min-width: 16rem;
    height: 100vh;
    min-height: 100vh;

    z-index: 1000;

    overflow-y: auto;
    overflow-x: hidden;

    align-self: auto;
  }

  #appScreen > main {
    min-height: 100vh;
    margin-left: 16rem;
    width: calc(100% - 16rem);
  }
}
