/* ==========================================================================
   VIPFX Design System — Componentes  (v1.1.0)
   CSS puro, prefixo .vx-, depende de tokens.css. Funciona com ou sem Tailwind
   (os projetos PHP como sgo e cjc não usam Tailwind).
   Ordem de carga: tokens.css → components.css → CSS do projeto.
   ========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

.vx-body,
body.vx {
  margin: 0;
  min-height: 100vh;
  background-color: var(--vx-bg);
  color: var(--vx-text-body);
  font-family: var(--vx-font-sans);
  font-size: var(--vx-text-md);
  line-height: var(--vx-leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
.vx-body ::selection, body.vx ::selection { background: var(--vx-brand-hover); color: var(--vx-text-on-brand); }

/* Fundo com brilho radial (landing) e com grade sutil (app) */
.vx-bg-aurora {
  background-image:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(34, 211, 238, 0.05), transparent 40%),
    radial-gradient(circle at 15% 70%, rgba(251, 191, 36, 0.04), transparent 40%);
  background-attachment: fixed;
}
.vx-bg-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

:where(.vx-body, body.vx) :focus-visible {
  outline: 2px solid var(--vx-brand-hover);
  outline-offset: 2px;
}

[v-cloak] { display: none !important; }

/* ---------- Layout ---------- */
.vx-container {
  width: 100%;
  max-width: var(--vx-container);
  margin-inline: auto;
  padding-inline: var(--vx-gutter);
}
.vx-container--narrow { max-width: var(--vx-container-narrow); }
.vx-section { padding-block: var(--vx-space-16); }
@media (min-width: 768px) { .vx-section { padding-block: var(--vx-space-24); } }

.vx-grid { display: grid; gap: var(--vx-space-4); }
.vx-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.vx-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.vx-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.vx-stack { display: flex; flex-direction: column; gap: var(--vx-space-4); }
.vx-row { display: flex; align-items: center; gap: var(--vx-space-3); flex-wrap: wrap; }
.vx-row--between { justify-content: space-between; }

/* ---------- Tipografia ---------- */
.vx-h1, .vx-h2, .vx-h3, .vx-display {
  color: var(--vx-text-strong);
  font-weight: 800;
  letter-spacing: var(--vx-tracking-tight);
  line-height: var(--vx-leading-tight);
  margin: 0;
}
.vx-display { font-family: var(--vx-font-heading); font-size: clamp(2.25rem, 6vw, var(--vx-text-6xl)); font-weight: 900; }
.vx-h1 { font-size: clamp(1.5rem, 4vw, var(--vx-text-4xl)); }
.vx-h2 { font-size: clamp(1.25rem, 3vw, var(--vx-text-3xl)); font-weight: 700; }
.vx-h3 { font-size: var(--vx-text-xl); font-weight: 700; line-height: var(--vx-leading-snug); }
.vx-lead { font-size: var(--vx-text-lg); color: var(--vx-text-muted); line-height: var(--vx-leading-body); max-width: 42rem; }
.vx-muted { color: var(--vx-text-muted); }
.vx-subtle { color: var(--vx-text-subtle); }

/* Título de seção com barra lateral (padrão de app: rnd, slc, Site aegis) */
.vx-section-title {
  display: flex; align-items: center; gap: var(--vx-space-2);
  margin: 0 0 var(--vx-space-4);
  padding-left: var(--vx-space-3);
  border-left: 4px solid var(--vx-accent);
  color: var(--vx-text-strong);
  font-size: var(--vx-text-xl);
  font-weight: 700;
  line-height: var(--vx-leading-snug);
}
.vx-section-title--brand { border-left-color: var(--vx-brand-text); }

/* Rótulo pequeno em caixa alta (KPIs, cabeçalhos de tabela, campos) */
.vx-label {
  display: block;
  color: var(--vx-text-muted);
  font-size: var(--vx-text-2xs);
  font-weight: 600;
  letter-spacing: var(--vx-tracking-wider);
  text-transform: uppercase;
}

/* Números financeiros: sempre mono com algarismos tabulares */
.vx-num { font-family: var(--vx-font-mono); font-variant-numeric: tabular-nums; }
.vx-gain { color: var(--vx-success); }
.vx-loss { color: var(--vx-danger); }

.vx-gradient-text {
  background: linear-gradient(135deg, #ffffff 10%, #34d399 50%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.vx-gradient-text--gold {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #d97706 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.vx-link {
  color: var(--vx-brand-text);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--vx-dur) ease;
}
.vx-link:hover { color: #6ee7b7; text-decoration: underline; text-underline-offset: 3px; }

.vx-code {
  font-family: var(--vx-font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.4em;
  border-radius: var(--vx-radius-sm);
  background: var(--vx-brand-soft);
  color: var(--vx-brand-text);
}

/* ---------- Botões ---------- */
.vx-btn {
  --_bg: var(--vx-surface-3);
  --_bg-hover: var(--vx-border-strong);
  --_fg: var(--vx-text-strong);
  --_bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--vx-space-2);
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--_bd);
  border-radius: var(--vx-radius);
  background: var(--_bg);
  color: var(--_fg);
  font-family: inherit;
  font-size: var(--vx-text-sm);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--vx-dur) ease, border-color var(--vx-dur) ease,
              color var(--vx-dur) ease, box-shadow var(--vx-dur) ease, transform var(--vx-dur-fast) ease;
}
.vx-btn:hover { background: var(--_bg-hover); }
.vx-btn:active { transform: translateY(1px); }
.vx-btn:disabled, .vx-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.vx-btn svg { width: 1.125em; height: 1.125em; flex-shrink: 0; }

.vx-btn--primary   { --_bg: var(--vx-brand); --_bg-hover: var(--vx-brand-hover); --_fg: var(--vx-text-on-brand); }
.vx-btn--primary:hover { box-shadow: var(--vx-glow-brand); }
.vx-btn--accent    { --_bg: var(--vx-accent); --_bg-hover: var(--vx-accent-hover); --_fg: var(--vx-text-on-brand); }
.vx-btn--accent:hover { box-shadow: var(--vx-glow-accent); }
.vx-btn--gold      { --_fg: var(--vx-text-on-brand); background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: var(--vx-glow-accent); }
.vx-btn--gold:hover { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.vx-btn--secondary { --_bg: var(--vx-surface-3); --_bg-hover: var(--vx-border-strong); --_bd: var(--vx-border-strong); }
.vx-btn--outline   { --_bg: transparent; --_bg-hover: var(--vx-brand-soft); --_fg: var(--vx-brand-text); --_bd: var(--vx-brand-line); }
.vx-btn--ghost     { --_bg: transparent; --_bg-hover: rgba(255, 255, 255, 0.06); --_fg: var(--vx-text-body); }
.vx-btn--danger    { --_bg: var(--vx-danger-soft); --_bg-hover: rgba(239, 68, 68, 0.2); --_fg: var(--vx-danger); --_bd: var(--vx-danger-line); }
.vx-btn--danger-solid { --_bg: var(--vx-danger-solid); --_bg-hover: #dc2626; --_fg: #fff; }
.vx-btn--whatsapp  { --_bg: var(--vx-whatsapp); --_bg-hover: #20bd5a; --_fg: #fff; }

.vx-btn--sm   { min-height: 2.25rem; padding: 0.4rem 0.875rem; font-size: var(--vx-text-xs); }
.vx-btn--lg   { min-height: 3.25rem; padding: 0.875rem 2rem; font-size: var(--vx-text-md); border-radius: var(--vx-radius-lg); }
.vx-btn--pill { border-radius: var(--vx-radius-full); }
.vx-btn--block { display: flex; width: 100%; }
.vx-btn--icon { padding: 0; width: 2.75rem; min-width: 2.75rem; }
.vx-btn--icon.vx-btn--sm { width: 2.25rem; min-width: 2.25rem; }

.vx-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.vx-btn.is-loading::after {
  content: ""; position: absolute; width: 1.1em; height: 1.1em;
  border: 2px solid var(--_fg); border-right-color: transparent; border-radius: 50%;
  animation: vx-spin 0.7s linear infinite;
}

/* Botão flutuante do WhatsApp (fq, roboforex, vantage, Site aegis) */
.vx-fab-whatsapp {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: var(--vx-z-toast);
  display: flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--vx-whatsapp); color: #fff;
  animation: vx-pulse-ring 2s infinite;
}
.vx-fab-whatsapp svg { width: 1.75rem; height: 1.75rem; }

/* ---------- Cards ---------- */
.vx-card {
  position: relative;
  padding: var(--vx-space-6);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-xl);
}
.vx-card--glass {
  background: var(--vx-glass);
  -webkit-backdrop-filter: blur(var(--vx-blur));
  backdrop-filter: blur(var(--vx-blur));
  border-color: var(--vx-border-glass);
  box-shadow: var(--vx-shadow-card);
}
.vx-card--inset { background: var(--vx-surface-2); border-radius: var(--vx-radius-lg); padding: var(--vx-space-4); }
.vx-card--hover { transition: transform var(--vx-dur-slow) var(--vx-ease), border-color var(--vx-dur-slow) var(--vx-ease), box-shadow var(--vx-dur-slow) var(--vx-ease); }
.vx-card--hover:hover { transform: translateY(-4px); border-color: rgba(52, 211, 153, 0.3); box-shadow: var(--vx-glow-hover); }
.vx-card--featured { border-color: var(--vx-accent-line); background: linear-gradient(180deg, rgba(251, 191, 36, 0.06), transparent 60%), var(--vx-surface); box-shadow: var(--vx-glow-accent); }
.vx-card--compact { padding: var(--vx-space-4); }
@media (min-width: 640px) { .vx-card { padding: var(--vx-space-8); } .vx-card--compact { padding: var(--vx-space-5); } }

.vx-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--vx-space-3); margin-bottom: var(--vx-space-4); }
.vx-card__title { margin: 0; color: var(--vx-text-strong); font-size: var(--vx-text-lg); font-weight: 700; }

/* Quadrado de ícone (cards de recurso) */
.vx-icon-box {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 3rem; height: 3rem;
  border-radius: var(--vx-radius-lg);
  background: var(--vx-brand-soft);
  border: 1px solid var(--vx-brand-line);
  color: var(--vx-brand-text);
}
.vx-icon-box svg { width: 1.5rem; height: 1.5rem; }
.vx-icon-box--accent { background: var(--vx-accent-soft); border-color: var(--vx-accent-line); color: var(--vx-accent); }
.vx-icon-box--info   { background: var(--vx-info-soft); border-color: var(--vx-info-line); color: var(--vx-info); }
.vx-icon-box--danger { background: var(--vx-danger-soft); border-color: var(--vx-danger-line); color: var(--vx-danger); }

/* ---------- KPI / indicador ---------- */
.vx-stat {
  display: flex; flex-direction: column; gap: var(--vx-space-1);
  padding: var(--vx-space-5);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-xl);
  min-width: 0;
}
.vx-stat__value {
  color: var(--vx-text-strong);
  font-family: var(--vx-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--vx-text-2xl);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.vx-stat__delta { font-family: var(--vx-font-mono); font-size: var(--vx-text-xs); font-weight: 600; }
.vx-stat--brand  { border-left: 3px solid var(--vx-brand-text); }
.vx-stat--accent { border-left: 3px solid var(--vx-accent); }
.vx-stat--danger { border-left: 3px solid var(--vx-danger); }

/* ---------- Badges, pílulas e status ---------- */
.vx-badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.2rem 0.625rem;
  border: 1px solid var(--vx-border-strong);
  border-radius: var(--vx-radius-full);
  background: var(--vx-surface-3);
  color: var(--vx-text-body);
  font-size: var(--vx-text-xs);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.vx-badge--brand  { background: var(--vx-brand-soft); border-color: var(--vx-brand-line); color: var(--vx-brand-text); }
.vx-badge--accent { background: var(--vx-accent-soft); border-color: var(--vx-accent-line); color: var(--vx-accent); }
.vx-badge--danger { background: var(--vx-danger-soft); border-color: var(--vx-danger-line); color: var(--vx-danger); }
.vx-badge--info   { background: var(--vx-info-soft); border-color: var(--vx-info-line); color: var(--vx-info); }
.vx-badge--mono   { font-family: var(--vx-font-mono); }

/* Sobretítulo de seção/hero: pílula em caixa alta */
.vx-eyebrow {
  display: inline-flex; align-items: center; gap: var(--vx-space-2);
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--vx-brand-line);
  border-radius: var(--vx-radius-full);
  background: var(--vx-brand-soft);
  color: var(--vx-brand-text);
  font-size: var(--vx-text-2xs);
  font-weight: 700;
  letter-spacing: var(--vx-tracking-wider);
  text-transform: uppercase;
}
.vx-eyebrow--accent { border-color: var(--vx-accent-line); background: var(--vx-accent-soft); color: var(--vx-accent); }
@media (min-width: 640px) { .vx-eyebrow { font-size: var(--vx-text-xs); } }

/* Ponto de status (online, ao vivo, conectado) */
.vx-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--vx-success); flex-shrink: 0; }
.vx-dot--live { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: vx-live 1.8s infinite; }
.vx-dot--warning { background: var(--vx-warning); }
.vx-dot--danger { background: var(--vx-danger); }
.vx-dot--off { background: var(--vx-text-subtle); }

/* ---------- Formulários ---------- */
.vx-field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.vx-field__label { color: var(--vx-text-muted); font-size: var(--vx-text-xs); font-weight: 600; }
.vx-field__help { color: var(--vx-text-subtle); font-size: var(--vx-text-xs); }
.vx-field__error { color: var(--vx-danger); font-size: var(--vx-text-xs); font-weight: 500; }

.vx-input, .vx-select, .vx-textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--vx-input);
  border: 1px solid var(--vx-border-strong);
  border-radius: var(--vx-radius);
  color: var(--vx-text-strong);
  font-family: inherit;
  font-size: var(--vx-text-sm);
  line-height: 1.4;
  outline: none;
  transition: border-color var(--vx-dur) ease, box-shadow var(--vx-dur) ease;
  -webkit-appearance: none; appearance: none;
}
.vx-input::placeholder, .vx-textarea::placeholder { color: var(--vx-text-subtle); }
.vx-input:hover, .vx-select:hover, .vx-textarea:hover { border-color: #475569; }
.vx-input:focus, .vx-select:focus, .vx-textarea:focus { border-color: var(--vx-brand-hover); box-shadow: var(--vx-ring); }
.vx-input:disabled, .vx-select:disabled, .vx-textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.vx-input.is-invalid, .vx-select.is-invalid, .vx-textarea.is-invalid { border-color: var(--vx-danger); }
.vx-input--mono { font-family: var(--vx-font-mono); font-variant-numeric: tabular-nums; }
.vx-textarea { min-height: 6rem; resize: vertical; }
.vx-select {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem;
}
.vx-select option { background: var(--vx-surface); color: var(--vx-text-strong); }

/* Input com prefixo/sufixo (R$, %, dias) */
.vx-input-group { display: flex; align-items: stretch; }
.vx-input-group > .vx-input { border-radius: 0; flex: 1; min-width: 0; }
.vx-input-group > :first-child { border-top-left-radius: var(--vx-radius); border-bottom-left-radius: var(--vx-radius); }
.vx-input-group > :last-child { border-top-right-radius: var(--vx-radius); border-bottom-right-radius: var(--vx-radius); }
.vx-input-group__addon {
  display: flex; align-items: center; padding: 0 0.75rem;
  background: var(--vx-surface-3); border: 1px solid var(--vx-border-strong);
  color: var(--vx-text-muted); font-family: var(--vx-font-mono); font-size: var(--vx-text-xs);
}
.vx-input-group__addon:first-child { border-right: 0; }
.vx-input-group__addon:last-child { border-left: 0; }

.vx-check { display: inline-flex; align-items: center; gap: var(--vx-space-2); color: var(--vx-text-body); font-size: var(--vx-text-sm); cursor: pointer; }
.vx-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--vx-brand); cursor: pointer; }

/* Interruptor */
.vx-switch { position: relative; display: inline-flex; align-items: center; gap: var(--vx-space-3); cursor: pointer; font-size: var(--vx-text-sm); color: var(--vx-text-body); }
.vx-switch input { position: absolute; opacity: 0; pointer-events: none; }
.vx-switch__track { position: relative; width: 2.5rem; height: 1.375rem; border-radius: 999px; background: var(--vx-border-strong); transition: background var(--vx-dur) ease; flex-shrink: 0; }
.vx-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: transform var(--vx-dur) var(--vx-ease); }
.vx-switch input:checked + .vx-switch__track { background: var(--vx-brand); }
.vx-switch input:checked + .vx-switch__track::after { transform: translateX(1.125rem); }
.vx-switch input:focus-visible + .vx-switch__track { box-shadow: var(--vx-ring); }

/* Seletor segmentado / abas em pílula */
.vx-segmented {
  display: inline-flex; gap: 0.25rem; padding: 0.25rem;
  background: var(--vx-input); border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-lg); max-width: 100%; overflow-x: auto;
}
.vx-segmented button {
  padding: 0.45rem 0.9rem; border: 0; border-radius: var(--vx-radius);
  background: transparent; color: var(--vx-text-muted);
  font: inherit; font-size: var(--vx-text-xs); font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background var(--vx-dur) ease, color var(--vx-dur) ease;
}
.vx-segmented button:hover { color: var(--vx-text-strong); }
.vx-segmented button.is-active, .vx-segmented button[aria-selected="true"] { background: var(--vx-surface-3); color: var(--vx-brand-text); }

/* Abas sublinhadas */
.vx-tabs { display: flex; gap: var(--vx-space-6); border-bottom: 1px solid var(--vx-border); overflow-x: auto; }
.vx-tabs button, .vx-tabs a {
  position: relative; padding: 0.75rem 0; border: 0; background: none;
  color: var(--vx-text-muted); font: inherit; font-size: var(--vx-text-sm); font-weight: 600;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.vx-tabs button:hover, .vx-tabs a:hover { color: var(--vx-text-strong); }
.vx-tabs .is-active, .vx-tabs [aria-selected="true"] { color: var(--vx-brand-text); }
.vx-tabs .is-active::after, .vx-tabs [aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--vx-brand-text);
}

/* ---------- Tabela ---------- */
.vx-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--vx-border); border-radius: var(--vx-radius-xl); background: var(--vx-surface); }
.vx-table { width: 100%; border-collapse: collapse; font-size: var(--vx-text-sm); }
.vx-table th {
  padding: 0.875rem 1rem; text-align: left; white-space: nowrap;
  background: var(--vx-bg); color: var(--vx-text-muted);
  font-family: var(--vx-font-mono); font-size: var(--vx-text-2xs); font-weight: 600;
  letter-spacing: var(--vx-tracking-wider); text-transform: uppercase;
  border-bottom: 1px solid var(--vx-border);
}
.vx-table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--vx-border); color: var(--vx-text-body); vertical-align: middle; }
.vx-table tbody tr:last-child td { border-bottom: 0; }
.vx-table tbody tr { transition: background var(--vx-dur-fast) ease; }
.vx-table tbody tr:hover { background: rgba(30, 41, 59, 0.45); }
.vx-table .is-num { text-align: right; font-family: var(--vx-font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vx-table--compact th, .vx-table--compact td { padding: 0.5rem 0.75rem; }

/* ---------- Alertas ---------- */
.vx-alert {
  display: flex; gap: var(--vx-space-3); align-items: flex-start;
  padding: var(--vx-space-4);
  border: 1px solid var(--vx-info-line); border-left-width: 4px;
  border-radius: var(--vx-radius-lg);
  background: var(--vx-info-soft); color: var(--vx-text);
  font-size: var(--vx-text-sm);
}
.vx-alert svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--vx-info); margin-top: 0.1rem; }
.vx-alert strong { color: var(--vx-text-strong); }
.vx-alert--success { border-color: var(--vx-brand-line); background: var(--vx-success-soft); }
.vx-alert--success svg { color: var(--vx-success); }
.vx-alert--warning { border-color: var(--vx-accent-line); background: var(--vx-warning-soft); }
.vx-alert--warning svg { color: var(--vx-warning); }
.vx-alert--danger { border-color: var(--vx-danger-line); background: var(--vx-danger-soft); }
.vx-alert--danger svg { color: var(--vx-danger); }

/* ---------- Header e navegação ---------- */
.vx-header {
  position: sticky; top: 0; z-index: var(--vx-z-header);
  background: var(--vx-bg-header);
  -webkit-backdrop-filter: blur(var(--vx-blur)); backdrop-filter: blur(var(--vx-blur));
  border-bottom: 1px solid var(--vx-border-glass);
}
.vx-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--vx-space-4); min-height: var(--vx-header-h); }
.vx-brandmark { display: inline-flex; align-items: center; gap: 0; color: var(--vx-text-strong); font-weight: 800; font-size: var(--vx-text-lg); letter-spacing: var(--vx-tracking-tight); text-decoration: none; }
.vx-brandmark img { width: 2rem; height: 2rem; border-radius: var(--vx-radius); margin-right: var(--vx-space-2); }
.vx-brandmark .vx-badge { margin-left: var(--vx-space-2); }
.vx-brandmark > span:not(.vx-badge) { color: var(--vx-brand-text); }
.vx-nav { display: none; align-items: center; gap: var(--vx-space-6); }
@media (min-width: 1024px) { .vx-nav { display: flex; } }
.vx-nav a {
  position: relative; color: var(--vx-text-body); font-size: var(--vx-text-sm); font-weight: 500; text-decoration: none;
  transition: color var(--vx-dur) ease;
}
.vx-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--vx-brand-text); transition: width var(--vx-dur-slow) var(--vx-ease);
}
.vx-nav a:hover, .vx-nav a.is-active { color: var(--vx-text-strong); }
.vx-nav a:hover::after, .vx-nav a.is-active::after { width: 100%; }

/* Marca de produto: logo do produto + "VIPFX" em cima + nome do produto.
   <a class="vx-product-mark" href="/"><img src="logo.png" alt="">
     <span class="vx-product-mark__text"><span class="vx-product-mark__eco">VIP<b>FX</b></span>
     <span class="vx-product-mark__name">Nome do produto</span></span></a> */
.vx-product-mark { display: inline-flex; align-items: center; gap: var(--vx-space-3); min-width: 0; color: var(--vx-text-strong); text-decoration: none; font-family: var(--vx-font-sans); }
.vx-product-mark img { height: 2.25rem; width: auto; max-width: 7rem; object-fit: contain; flex-shrink: 0; }
.vx-product-mark__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.vx-product-mark__eco { color: var(--vx-text-muted); font-size: var(--vx-text-2xs); font-weight: 800; letter-spacing: 0.14em; }
.vx-product-mark__eco b { color: var(--vx-brand-text); font-weight: 800; }
.vx-product-mark__name { color: var(--vx-text-strong); font-size: var(--vx-text-md); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) { .vx-product-mark__name { font-size: var(--vx-text-sm); } .vx-product-mark img { height: 2rem; } }

/* Header fixo (páginas que reservam o espaço com padding-top no body) */
.vx-header--fixed { position: fixed; left: 0; right: 0; width: 100%; }
.vx-header__inner > :first-child { min-width: 0; }
.vx-header__actions { display: flex; align-items: center; gap: var(--vx-space-2); flex-shrink: 0; }

/* Menu suspenso: <details class="vx-dropdown"><summary class="vx-dropdown__btn">Recursos</summary>
   <div class="vx-dropdown__panel"><a class="vx-dropdown__item">…</a></div></details>
   ecosystem.js fecha ao clicar fora e com Esc. */
.vx-dropdown { position: relative; }
.vx-dropdown > summary { list-style: none; cursor: pointer; }
.vx-dropdown > summary::-webkit-details-marker { display: none; }
.vx-dropdown__btn { display: inline-flex; align-items: center; gap: 0.375rem; white-space: nowrap; }
.vx-dropdown__btn::after { content: ""; width: 0.4rem; height: 0.4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: 0.7; transition: transform var(--vx-dur) ease; }
.vx-dropdown[open] > .vx-dropdown__btn::after { transform: translateY(1px) rotate(-135deg); }
.vx-dropdown__panel { position: absolute; top: calc(100% + 0.75rem); right: 0; z-index: var(--vx-z-modal); min-width: 15rem; padding: var(--vx-space-2); background: var(--vx-surface); border: 1px solid var(--vx-border-strong); border-radius: var(--vx-radius-lg); box-shadow: var(--vx-shadow-modal); animation: vx-modal-in 0.2s ease-out both; }
@media (max-width: 639px) { .vx-dropdown__panel { position: fixed; top: calc(var(--vx-header-h) + 0.5rem); left: 1rem; right: 1rem; min-width: 0; max-height: calc(100vh - var(--vx-header-h) - 2rem); overflow-y: auto; } }
.vx-dropdown__label { display: block; padding: 0.5rem 0.75rem 0.25rem; color: var(--vx-text-muted); font-size: var(--vx-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--vx-tracking-wider); }
.vx-dropdown__item { display: flex; width: 100%; align-items: center; gap: var(--vx-space-2); padding: 0.55rem 0.75rem; border: 0; border-radius: var(--vx-radius); background: none; color: var(--vx-text-body); font: 500 var(--vx-text-sm)/1.3 var(--vx-font-sans); text-align: left; text-decoration: none; cursor: pointer; }
.vx-dropdown__item:hover { background: var(--vx-surface-3); color: var(--vx-text-strong); }

/* ---------- Ecossistema (ecosystem.js) ---------- */
.vx-eco-brand { color: var(--vx-text-strong); font-family: var(--vx-font-sans); font-weight: 800; font-size: var(--vx-text-lg); letter-spacing: var(--vx-tracking-tight); text-decoration: none; }
.vx-eco-brand span { color: var(--vx-brand-text); }
.vx-footer a.vx-eco-brand, .vx-footer a.vx-eco-brand:hover { color: var(--vx-text-strong); }

.vx-eco-menu { position: relative; display: inline-flex; font-family: var(--vx-font-sans); }
.vx-eco-menu__btn {
  display: inline-flex; align-items: center; gap: var(--vx-space-2);
  min-height: 2.25rem; padding: 0.4rem 0.75rem;
  background: transparent; color: var(--vx-text-body);
  border: 1px solid var(--vx-border-strong); border-radius: var(--vx-radius);
  font: 600 var(--vx-text-xs)/1 var(--vx-font-sans); cursor: pointer;
  transition: color var(--vx-dur) ease, border-color var(--vx-dur) ease, background var(--vx-dur) ease;
}
.vx-eco-menu__btn svg { width: 1rem; height: 1rem; color: var(--vx-brand-text); }
.vx-eco-menu__btn:hover, .vx-eco-menu__btn[aria-expanded="true"] { color: var(--vx-text-strong); border-color: var(--vx-brand-line); background: var(--vx-brand-soft); }
.vx-eco-menu__btn:focus-visible { outline: 2px solid var(--vx-brand-hover); outline-offset: 2px; }
@media (max-width: 639px) { .vx-eco-menu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); } .vx-eco-menu__btn { width: 2.25rem; justify-content: center; padding: 0; } }

.vx-eco-panel {
  position: absolute; top: calc(100% + 0.625rem); right: 0; z-index: var(--vx-z-modal);
  width: min(40rem, calc(100vw - 2rem));
  padding: var(--vx-space-5);
  background: var(--vx-surface); border: 1px solid var(--vx-border-strong);
  border-radius: var(--vx-radius-xl); box-shadow: var(--vx-shadow-modal);
  text-align: left; animation: vx-modal-in 0.2s ease-out both;
}
.vx-eco-panel[hidden] { display: none; }
/* Abre para cima e para a direita (ex.: menu no rodapé de uma barra lateral) */
.vx-eco-menu--up .vx-eco-panel { top: auto; bottom: calc(100% + 0.625rem); left: 0; right: auto; }
.vx-eco-menu--block, .vx-eco-menu--block .vx-eco-menu__btn { width: 100%; }
@media (max-width: 639px) { .vx-eco-panel { position: fixed; top: calc(var(--vx-header-h) + 0.5rem); left: 1rem; right: 1rem; width: auto; max-height: calc(100vh - var(--vx-header-h) - 2rem); overflow-y: auto; } }
.vx-eco-panel__head { display: flex; align-items: baseline; gap: var(--vx-space-3); padding-bottom: var(--vx-space-4); margin-bottom: var(--vx-space-4); border-bottom: 1px solid var(--vx-border); }
.vx-eco-panel__sub { color: var(--vx-text-muted); font-size: var(--vx-text-xs); }
.vx-eco-panel__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--vx-space-4) var(--vx-space-5); }

.vx-eco-group__title { margin: 0 0 var(--vx-space-2); color: var(--vx-text-muted); font-size: var(--vx-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--vx-tracking-wider); }
.vx-eco-item { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.5rem 0.625rem; margin: 0 -0.625rem; border-radius: var(--vx-radius); text-decoration: none; transition: background var(--vx-dur-fast) ease; }
.vx-eco-item:hover { background: var(--vx-surface-3); }
.vx-eco-item__name { color: var(--vx-text); font-size: var(--vx-text-sm); font-weight: 600; line-height: 1.3; }
.vx-eco-item__desc { color: var(--vx-text-muted); font-size: var(--vx-text-xs); line-height: 1.4; }
.vx-eco-item.is-current .vx-eco-item__name { color: var(--vx-brand-text); }
.vx-eco-here { display: inline-block; margin-left: 0.25rem; padding: 0.05rem 0.4rem; border-radius: var(--vx-radius-full); background: var(--vx-brand-soft); border: 1px solid var(--vx-brand-line); color: var(--vx-brand-text); font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; vertical-align: 1px; }

.vx-eco-footer { background: var(--vx-bg); font-family: var(--vx-font-sans); line-height: var(--vx-leading-body); text-align: left; position: relative; z-index: 1; }
.vx-eco-footer__top { display: grid; gap: var(--vx-space-8); grid-template-columns: 1fr; }
@media (min-width: 1024px) { .vx-eco-footer__top { grid-template-columns: 16rem 1fr; } }
.vx-eco-footer__brand p { margin: var(--vx-space-3) 0 0; color: var(--vx-text-muted); font-size: var(--vx-text-sm); max-width: 18rem; }
.vx-eco-footer__cols { display: grid; gap: var(--vx-space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.vx-eco-footer__cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.vx-eco-footer .vx-eco-item { padding: 0.25rem 0; margin: 0; }
.vx-eco-footer .vx-eco-item:hover { background: none; }
.vx-eco-footer .vx-eco-item__name { color: var(--vx-text-muted); font-weight: 500; }
.vx-eco-footer .vx-eco-item:hover .vx-eco-item__name { color: var(--vx-brand-text); }
.vx-eco-footer .vx-eco-item.is-current .vx-eco-item__name { color: var(--vx-brand-text); }
.vx-eco-footer .vx-eco-here { display: none; }
.vx-eco-risk { display: flex; gap: var(--vx-space-3); margin-top: var(--vx-space-8); padding: var(--vx-space-4); background: var(--vx-surface); border: 1px solid var(--vx-border); border-radius: var(--vx-radius-lg); color: var(--vx-text-muted); font-size: var(--vx-text-xs); line-height: 1.6; }
.vx-eco-risk svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; margin-top: 0.1rem; color: var(--vx-accent); }
.vx-eco-risk p { margin: 0; }
.vx-eco-risk strong { color: var(--vx-text); }
.vx-eco-risk__note { margin-bottom: var(--vx-space-2) !important; color: var(--vx-text-body); }
.vx-eco-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--vx-space-3); margin-top: var(--vx-space-6); padding-top: var(--vx-space-6); border-top: 1px solid var(--vx-border); color: var(--vx-text-subtle); }
.vx-eco-footer__links { display: flex; flex-wrap: wrap; gap: var(--vx-space-4); }
.vx-eco-footer__links a { color: var(--vx-text-muted); text-decoration: none; }
.vx-eco-footer__links a:hover { color: var(--vx-brand-text); }

/* ---------- Modal ---------- */
.vx-modal-backdrop {
  position: fixed; inset: 0; z-index: var(--vx-z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--vx-space-3);
  background: var(--vx-overlay);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.vx-modal-backdrop[hidden] { display: none; }
.vx-modal {
  position: relative; width: 100%; max-width: 32rem; max-height: 92vh; overflow-y: auto;
  padding: var(--vx-space-6);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-xl);
  box-shadow: var(--vx-shadow-modal);
  animation: vx-modal-in 0.3s ease-out both;
}
.vx-modal--lg { max-width: 56rem; }
.vx-modal__close { position: absolute; top: var(--vx-space-3); right: var(--vx-space-3); }
.vx-modal__footer { display: flex; gap: var(--vx-space-3); margin-top: var(--vx-space-6); }
.vx-modal__footer > * { flex: 1; }
@media (min-width: 640px) { .vx-modal { padding: var(--vx-space-8); } }

/* ---------- Toast ---------- */
.vx-toast-stack { position: fixed; right: var(--vx-space-4); bottom: var(--vx-space-4); z-index: var(--vx-z-toast); display: flex; flex-direction: column; gap: var(--vx-space-2); max-width: calc(100vw - 2rem); }
.vx-toast {
  display: flex; align-items: center; gap: var(--vx-space-3);
  min-width: 16rem; padding: 0.75rem 1rem;
  background: var(--vx-surface-3); border: 1px solid var(--vx-border-strong); border-left: 4px solid var(--vx-success);
  border-radius: var(--vx-radius-lg); box-shadow: var(--vx-shadow-card);
  color: var(--vx-text); font-size: var(--vx-text-sm);
  animation: vx-fade-up 0.3s var(--vx-ease) both;
}
.vx-toast--danger { border-left-color: var(--vx-danger); }
.vx-toast--warning { border-left-color: var(--vx-warning); }

/* ---------- Diversos ---------- */
.vx-divider { height: 1px; border: 0; background: var(--vx-border); margin: var(--vx-space-6) 0; }

.vx-progress { height: 0.5rem; border-radius: 999px; background: var(--vx-surface-3); overflow: hidden; }
.vx-progress__bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--vx-brand), var(--vx-brand-hover)); transition: width var(--vx-dur-slow) var(--vx-ease); }
.vx-progress--accent .vx-progress__bar { background: linear-gradient(90deg, var(--vx-accent-deep), var(--vx-accent)); }

.vx-empty { display: flex; flex-direction: column; align-items: center; gap: var(--vx-space-3); padding: var(--vx-space-12) var(--vx-space-4); text-align: center; color: var(--vx-text-muted); font-size: var(--vx-text-sm); }
.vx-empty svg { width: 2.5rem; height: 2.5rem; color: var(--vx-text-subtle); }

.vx-skeleton { border-radius: var(--vx-radius); background: linear-gradient(90deg, var(--vx-surface-3) 25%, #273449 50%, var(--vx-surface-3) 75%); background-size: 200% 100%; animation: vx-shimmer 1.4s infinite; }

.vx-avatar { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--vx-surface-3); border: 1px solid var(--vx-border-strong); color: var(--vx-brand-text); font-size: var(--vx-text-xs); font-weight: 700; flex-shrink: 0; }

.vx-list-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--vx-space-3); }
.vx-list-check li { display: flex; gap: var(--vx-space-3); align-items: flex-start; color: var(--vx-text-body); font-size: var(--vx-text-sm); }
.vx-list-check li::before {
  content: ""; flex-shrink: 0; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem;
  background: var(--vx-brand-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Bloco de texto legal (termos, privacidade) */
.vx-prose { color: var(--vx-text-muted); font-size: var(--vx-text-sm); line-height: var(--vx-leading-body); }
.vx-prose h2, .vx-prose h3, .vx-prose h4 { color: var(--vx-text-strong); font-weight: 700; margin: 1.5em 0 0.5em; padding-left: 0.75rem; border-left: 3px solid var(--vx-brand-text); }
.vx-prose p, .vx-prose ul, .vx-prose ol { margin: 0 0 0.9em; }
.vx-prose ul, .vx-prose ol { padding-left: 1.25rem; }
.vx-prose strong { color: var(--vx-text); }
.vx-prose a { color: var(--vx-brand-text); }

.vx-footer { border-top: 1px solid var(--vx-border); padding-block: var(--vx-space-10); color: var(--vx-text-subtle); font-size: var(--vx-text-xs); }
.vx-footer a { color: var(--vx-text-muted); text-decoration: none; }
.vx-footer a:hover { color: var(--vx-brand-text); }

/* Barra de rolagem fina */
.vx-scroll { scrollbar-width: thin; scrollbar-color: #475569 transparent; }
.vx-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.vx-scroll::-webkit-scrollbar-track { background: transparent; }
.vx-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
.vx-scroll::-webkit-scrollbar-thumb:hover { background: #475569; }

.vx-fade-up { animation: vx-fade-up 0.6s var(--vx-ease) both; }
.vx-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Animações ---------- */
@keyframes vx-spin { to { transform: rotate(360deg); } }
@keyframes vx-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vx-modal-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes vx-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes vx-live { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@keyframes vx-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

@media (prefers-reduced-motion: reduce) {
  .vx-fade-up, .vx-modal, .vx-toast, .vx-dot--live, .vx-fab-whatsapp, .vx-skeleton { animation: none; }
  .vx-card--hover:hover { transform: none; }
}
