/* ==========================================================================
   FII Page Styles - Shared CSS for all FII landing pages
   Extracted from inline styles to reduce duplication across ~83 pages
   ========================================================================== */

/* Base overrides for FII pages */
html, body { background-color: #0d1117; color: #e6edf3; }
* { font-family: 'Inter', system-ui, sans-serif; }

/* Alinha o conteúdo da V1 (renderizado por fii-template.js dentro de
   #fii-root) com o header (.article-topbar, max-width:1200px + padding
   horizontal 14px) e o footer (.article-footer-inner). O template usa
   Tailwind max-w-7xl (1280px) + px-4 (16px) que cria desalinhamento de
   ~80px em viewports largos. Especificidade #fii-root vence o utility. */
#fii-root .max-w-7xl { max-width: 1200px; }
#fii-root .px-4 { padding-left: 14px; padding-right: 14px; }

/* Esconde o hero mobile em desktop (reforço do lg:hidden Tailwind) */
@media (min-width: 1024px) {
    .hero-mobile { display: none !important; }
}

/* Hero gradient background */
.hero-gradient {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Dark cards */
.dark-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Stat cards with hover effect */
.stat-card {
    background: var(--bg-card);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-light);
}

/* Animations */
.pulse-dot { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.fade-in { animation: fadeIn 0.6s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Score ring (recommendation) */
.score-ring { transform: rotate(-90deg); }

/* Chart containers */
.chart-container { position: relative; height: 300px; }

/* Timeline */
.timeline-line {
    position: absolute;
    left: 24px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
}

.timeline-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    position: relative;
    z-index: 10;
}

/* Progress bar */
.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: width 1s ease-out;
}

/* Sticky navigation */
.nav-sticky {
    /* backdrop-filter removido: fundo 0.95 (quase opaco) torna o blur quase
       imperceptível, mas a barra sticky re-rasteriza o blur a cada frame de
       scroll → engasgo no mobile. */
    background: rgba(13, 17, 23, 0.98);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* Asset table row hover */
.asset-row:hover { background: rgba(45, 138, 110, 0.1); }

/* Glow effects for section cards */
.glow-green { box-shadow: 0 0 20px rgba(45, 138, 110, 0.3); }
.glow-amber { box-shadow: 0 0 20px rgba(240, 193, 75, 0.3); }
.glow-purple { box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }

/* Loading skeleton */
.fii-skeleton {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.fii-skeleton-pulse {
    animation: skeletonPulse 1.5s ease-in-out infinite;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary, #1c2333) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   MOBILE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 767px) {
    /* Prevent horizontal overflow */
    body { overflow-x: hidden; }
    * { max-width: 100%; }

    /* Container padding */
    .max-w-7xl { padding-left: 14px !important; padding-right: 14px !important; }

    /* ═══ HERO MOBILE — CONCEITO "COTAÇÃO FIRST" ═══════════
       Inspiração: apps de corretora/trading (XP, Nubank, Rico).
       Hierarquia:
         1. Ticker + nota compacta (linha 1)
         2. COTAÇÃO gigante = elemento visual dominante
         3. Barra do VEREDICTO com cor do sentimento
         4. Métricas em tiras horizontais (nome | valor) tipo lista de app
         5. Rodapé com nome + segmento em fonte leve
       ════════════════════════════════════════════════════════ */
    .hero-mobile { padding: 0 !important; }
    .hm2-inner {
        padding: 14px 18px 22px;
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    /* 1. Topline: ticker + nota pill */
    .hm2-topline {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 18px;
    }
    .hm2-ticker {
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: rgb(226 232 240);
    }
    .hm2-nota-chip {
        display: inline-flex;
        align-items: baseline;
        padding: 5px 11px;
        border-radius: 999px;
        font-weight: 800;
        font-size: 0.95rem;
        line-height: 1;
        border: 1px solid;
    }
    .hm2-nota-val { font-size: 1rem; }
    .hm2-nota-max {
        font-size: 0.65rem;
        opacity: 0.7;
        margin-left: 1px;
        font-weight: 600;
    }
    .hm2-nota-emerald {
        background: rgba(16,185,129,0.18);
        border-color: rgba(16,185,129,0.5);
        color: rgb(110 231 183);
    }
    .hm2-nota-amber {
        background: rgba(245,158,11,0.18);
        border-color: rgba(245,158,11,0.5);
        color: rgb(252 211 77);
    }
    .hm2-nota-red,
    .hm2-nota-orange {
        background: rgba(239,68,68,0.18);
        border-color: rgba(239,68,68,0.5);
        color: rgb(252 165 165);
    }
    .hm2-nota-blue {
        background: rgba(59,130,246,0.18);
        border-color: rgba(59,130,246,0.5);
        color: rgb(147 197 253);
    }

    /* 2. Cotação — HERO VISUAL (alinhamento à esquerda consistente) */
    .hm2-price-label {
        font-size: 0.7rem;
        color: rgb(147 197 253);
        text-transform: uppercase;
        letter-spacing: 0.12em;
        font-weight: 600;
        margin-bottom: 4px;
        text-align: left;
    }
    .hm2-price {
        display: flex;
        align-items: baseline;
        gap: 8px;
        justify-content: flex-start;
    }
    .hm2-currency {
        font-size: 1.35rem;
        color: rgb(148 163 184);
        font-weight: 600;
    }
    .hm2-amount {
        font-size: 3.75rem;           /* 60px — o ENORME */
        font-weight: 900;
        letter-spacing: -0.035em;
        line-height: 0.9;
        color: #fff;
        font-variant-numeric: tabular-nums;
    }
    .hm2-price-caption {
        font-size: 0.75rem;
        color: rgb(148 163 184);
        margin-top: 6px;
    }

    /* 2b. Bloco comparativo: preço justo com upside/downside */
    .hm2-fairprice {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 11px 14px;
        margin-top: 12px;
        background: rgba(59,130,246,0.08);
        border: 1px solid rgba(59,130,246,0.25);
        border-radius: 10px;
    }
    .hm2-fairprice-label {
        font-size: 0.7rem;
        color: rgb(147 197 253);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 600;
    }
    .hm2-fairprice-wrap {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .hm2-fairprice-val {
        font-size: 1rem;
        font-weight: 700;
        color: rgb(191 219 254);
        font-variant-numeric: tabular-nums;
    }
    .hm2-upside-green,
    .hm2-upside-red,
    .hm2-upside-amber {
        font-size: 0.72rem;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 5px;
        font-variant-numeric: tabular-nums;
    }
    .hm2-upside-green {
        color: rgb(110 231 183);
        background: rgba(16,185,129,0.18);
    }
    .hm2-upside-red {
        color: rgb(252 165 165);
        background: rgba(239,68,68,0.18);
    }
    .hm2-upside-amber {
        color: rgb(252 211 77);
        background: rgba(245,158,11,0.18);
    }

    /* 3. Explicação da nota (substitui barra de veredicto) */
    .hm2-nota-explain {
        margin-top: 14px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px dashed rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        font-size: 0.72rem;
        color: rgb(148 163 184);
        line-height: 1.45;
    }
    .hm2-nota-explain strong {
        color: rgb(226 232 240);
        font-weight: 700;
    }
    .hm2-nota-explain em {
        font-style: normal;
        color: rgb(148 163 184);
        display: block;
        margin-top: 3px;
        font-size: 0.68rem;
    }

    /* (legado) Barra do VEREDICTO — não é mais renderizada */
    .hm2-verdict { display: none !important; }

    /* Barra do VEREDICTO (mantida para classes antigas) */
    .hm2-verdict {
        margin-top: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        border-radius: 12px;
        border: 1px solid transparent;
    }
    .hm2-verdict-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 600;
        opacity: 0.85;
    }
    .hm2-verdict-value {
        font-size: 1.15rem;
        font-weight: 800;
        letter-spacing: 0.04em;
    }
    .hm2-verdict-emerald {
        background: linear-gradient(90deg, rgba(16,185,129,0.22), rgba(16,185,129,0.08));
        border-color: rgba(16,185,129,0.35);
        color: rgb(167 243 208);
    }
    .hm2-verdict-amber {
        background: linear-gradient(90deg, rgba(245,158,11,0.22), rgba(245,158,11,0.08));
        border-color: rgba(245,158,11,0.35);
        color: rgb(253 230 138);
    }
    .hm2-verdict-red,
    .hm2-verdict-orange {
        background: linear-gradient(90deg, rgba(239,68,68,0.22), rgba(239,68,68,0.08));
        border-color: rgba(239,68,68,0.35);
        color: rgb(254 202 202);
    }
    .hm2-verdict-blue {
        background: linear-gradient(90deg, rgba(59,130,246,0.22), rgba(59,130,246,0.08));
        border-color: rgba(59,130,246,0.35);
        color: rgb(191 219 254);
    }

    /* 4. Métricas em tiras (lista de app) */
    .hm2-metrics {
        margin-top: 18px;
        display: flex;
        flex-direction: column;
    }
    .hm2-metric-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .hm2-metric-row:last-child { border-bottom: none; }
    .hm2-metric-highlight {
        background: rgba(59,130,246,0.06);
        margin: 4px -10px 0;
        padding: 10px;
        border-radius: 10px;
        border-bottom: none;
    }
    .hm2-metric-name {
        font-size: 0.8rem;
        color: rgb(148 163 184);
        font-weight: 500;
    }
    .hm2-metric-val {
        font-size: 1.1rem;
        font-weight: 700;
        color: #fff;
        font-variant-numeric: tabular-nums;
    }
    .hm2-val-green { color: rgb(110 231 183); }
    .hm2-val-amber { color: rgb(252 211 77); }
    .hm2-val-blue { color: rgb(147 197 253); }
    .hm2-val-unit {
        font-size: 0.68rem;
        color: rgb(148 163 184);
        margin-left: 5px;
        font-weight: 500;
    }

    /* 5. Identidade no rodapé (leve) */
    .hm2-identity {
        margin-top: 22px;
        padding-top: 14px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
    .hm2-fund-name {
        font-size: 0.88rem;
        color: rgb(226 232 240);
        font-weight: 500;
        line-height: 1.3;
        margin-bottom: 3px;
    }
    .hm2-fund-tags {
        font-size: 0.7rem;
        color: rgb(148 163 184);
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    /* 1. Identificação */
    .hm-identity { text-align: center; }
    .hm-ticker {
        font-size: 2.5rem;
        font-weight: 900;
        letter-spacing: -0.03em;
        line-height: 1;
        margin-bottom: 6px;
    }
    .hm-nome {
        font-size: 0.95rem;
        color: rgb(191 219 254); /* blue-200 */
        font-weight: 300;
        line-height: 1.3;
        max-width: 300px;
        margin: 0 auto 4px;
    }
    .hm-segmento {
        font-size: 0.7rem;
        color: rgb(147 197 253); /* blue-300 */
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: 500;
    }

    /* 2. Cotação em destaque */
    .hm-cotacao-block {
        text-align: center;
        padding: 14px 0 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .hm-cotacao-label {
        font-size: 0.65rem;
        color: rgb(147 197 253);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 4px;
    }
    .hm-cotacao-valor {
        font-size: 3rem;          /* 48px — destaque máximo */
        font-weight: 900;
        line-height: 0.95;
        letter-spacing: -0.025em;
    }
    .hm-cotacao-data {
        font-size: 0.7rem;
        color: rgb(148 163 184); /* slate-400 */
        margin-top: 4px;
    }

    /* 3. Veredicto + Nota (bloco acionável destacado) */
    .hm-veredicto {
        border-radius: 14px;
        padding: 14px 16px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .hm-veredicto-emerald {
        background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(16,185,129,0.06));
        border-color: rgba(16,185,129,0.35);
    }
    .hm-veredicto-amber {
        background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(245,158,11,0.06));
        border-color: rgba(245,158,11,0.35);
    }
    .hm-veredicto-red,
    .hm-veredicto-orange {
        background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(239,68,68,0.06));
        border-color: rgba(239,68,68,0.35);
    }
    .hm-veredicto-blue {
        background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(59,130,246,0.06));
        border-color: rgba(59,130,246,0.35);
    }
    .hm-veredicto-topo {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .hm-veredicto-pill {
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        color: #fff;
    }
    .hm-veredicto-nota {
        font-size: 1.8rem;
        font-weight: 900;
        line-height: 1;
        color: #fff;
    }
    .hm-veredicto-max {
        font-size: 0.85rem;
        color: rgb(203 213 225); /* slate-300 */
        font-weight: 500;
    }
    .hm-veredicto-linha {
        font-size: 0.7rem;
        color: rgb(148 163 184);
        margin-top: 6px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    /* 4. Métricas — grid 3 colunas */
    .hm-metricas {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .hm-metrica {
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 12px 6px;
        text-align: center;
    }
    .hm-metrica-label {
        font-size: 0.6rem;
        color: rgb(147 197 253);
        letter-spacing: 0.08em;
        font-weight: 600;
        margin-bottom: 6px;
    }
    .hm-metrica-valor {
        font-size: 1.3rem;
        font-weight: 800;
        line-height: 1;
        margin-bottom: 4px;
    }
    .hm-metrica-sub {
        font-size: 0.62rem;
        color: rgb(148 163 184);
        line-height: 1.2;
    }

    /* Esconde o hero desktop no mobile (reforço do lg:hidden Tailwind) */
    .hero-desktop { display: none !important; }

    /* ── HERO — REDESIGN MOBILE ────────────────────────── */
    /* Em mobile, o hero é reorganizado como "cartão do fundo" centralizado:
       TICKER grande → subtítulo → linha divisória → cotação hero →
       métricas (DY | P/VP) em destaque → badges abaixo. */
    .hero-gradient {
        padding-top: 24px !important;
        padding-bottom: 90px !important;
        text-align: center;
    }
    /* Remove o layout horizontal original no mobile */
    .hero-gradient .flex.flex-col.lg\:flex-row {
        gap: 16px !important;
        align-items: center !important;
    }
    /* Bloco esquerdo (ticker + nome + badges) — alinha centralizado */
    .hero-gradient .space-y-3,
    .hero-gradient .space-y-4 {
        width: 100% !important;
    }
    .hero-gradient .flex.items-center.gap-2,
    .hero-gradient .flex.items-center.gap-3 {
        justify-content: center !important;
    }
    .hero-gradient .flex.flex-wrap {
        justify-content: center !important;
    }
    /* Ticker */
    .hero-gradient h1 {
        font-size: 2.5rem !important;     /* 40px — grande mas não gigante */
        line-height: 1 !important;
        letter-spacing: -0.03em;
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
    /* Pills "NOTA X/10" e veredicto — logo abaixo do ticker */
    .hero-gradient .rounded-lg {
        font-size: 0.72rem !important;
        padding: 5px 10px !important;
    }
    /* Nome completo do fundo */
    .hero-gradient p {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        max-width: 320px;
        margin: 0 auto !important;
    }
    /* Badges (segmento, contador de imóveis) — "chips" pequenos */
    .hero-gradient .rounded-full {
        font-size: 0.65rem !important;
        padding: 3px 10px !important;
    }

    /* Bloco direito (Cota + DY + P/VP) — vira destaque centralizado */
    .hero-gradient > div > div > div.w-full.lg\:w-auto,
    .hero-gradient .lg\:text-right {
        padding-top: 16px !important;
        margin-top: 8px !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        text-align: center !important;
    }
    /* "Cota Atual" rótulo */
    .hero-gradient .uppercase.tracking-wider {
        font-size: 0.65rem !important;
        margin-bottom: 6px !important;
    }
    /* Cotação principal — destaque */
    .hero-gradient .flex.items-baseline {
        justify-content: center !important;
        gap: 8px !important;
    }
    .hero-gradient .text-5xl,
    .hero-gradient .text-6xl {
        font-size: 2.6rem !important;     /* 42px — destaque maior */
        line-height: 1 !important;
        letter-spacing: -0.02em;
        font-weight: 900;
    }
    /* Container DY | P/VP — boxes iguais centralizados */
    .hero-gradient .flex.items-center.gap-3,
    .hero-gradient .flex.items-center.gap-4 {
        justify-content: center !important;
        gap: 24px !important;
        margin-top: 14px !important;
    }
    .hero-gradient .text-2xl {
        font-size: 1.5rem !important;     /* DY e P/VP: 24px */
        font-weight: 800;
    }

    /* ── STAT CARDS — REDESIGN MOBILE ───────────────────── */
    /* Cards ficam mais "chips" com hierarquia vertical: ícone no topo,
       label pequeno, valor dominante. Layout centralizado. */
    .stat-card {
        padding: 16px 10px !important;
        border-radius: 16px !important;
        text-align: center;
    }
    /* Ícone acima (reorganiza flex em coluna) */
    .stat-card > .flex.items-center {
        flex-direction: column !important;
        gap: 8px !important;
        justify-content: center !important;
        margin-bottom: 10px !important;
    }
    .stat-card > .flex.items-center > .flex.items-center {
        justify-content: center !important;
    }
    .stat-card .w-8, .stat-card .w-10 {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }
    /* Label acima do valor, sutil */
    .stat-card .text-sm,
    .stat-card span.text-sm {
        font-size: 0.65rem !important;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
    /* Valor principal — grande e dominante */
    .stat-card .text-2xl,
    .stat-card .text-3xl {
        font-size: 1.5rem !important;    /* 24px */
        line-height: 1.05 !important;
        font-weight: 800;
    }
    .stat-card .text-xl {
        font-size: 1.3rem !important;
        line-height: 1.05 !important;
        font-weight: 800;
    }
    /* Detalhe (abaixo do valor) */
    .stat-card .text-xs {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
        margin-top: 4px !important;
    }

    /* Encaixe dos cards sob o hero */
    section.-mt-20,
    section.-mt-16 {
        margin-top: -64px !important;
    }

    /* ── RECOMENDAÇÃO — REDESIGN MOBILE ─────────────────── */
    /* Score ring acima, pill do veredicto integrado no título,
       texto do resumo limpo e bem legível. */
    .dark-card {
        padding: 20px 18px !important;
        border-radius: 20px !important;
    }
    /* Score ring centralizado e com tamanho moderado */
    .dark-card .flex-shrink-0 {
        margin: 0 auto 4px !important;
    }
    .dark-card h2 {
        font-size: 1.05rem !important;
        text-align: center;
    }
    /* Título + pill do veredicto — empilhados e centralizados */
    .dark-card .flex.items-center.gap-2,
    .dark-card .flex.items-center.gap-3 {
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
    }
    /* Pill do veredicto em destaque */
    .dark-card .rounded-lg {
        font-size: 0.85rem !important;
        padding: 6px 14px !important;
    }
    /* Texto do resumo — fluido */
    .dark-card p {
        font-size: 0.92rem !important;
        line-height: 1.6 !important;
        text-align: left;
    }

    /* ── Grids e espaçamentos ──────────────────────────── */
    .grid.grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .grid.grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .grid.grid-cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

    section.mb-12 { margin-bottom: 20px !important; }
    section.mb-10 { margin-bottom: 18px !important; }
    section.mb-8  { margin-bottom: 16px !important; }

    /* ── Charts ───────────────────────────────────────── */
    .chart-container, .chart-container-lg {
        height: 230px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* ── Tabelas com scroll horizontal ─────────────────── */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .overflow-x-auto table { min-width: 600px; font-size: 0.75rem; }
    .overflow-x-auto th, .overflow-x-auto td { padding: 8px 6px !important; }

    /* Cards nunca estouram a tela */
    .rounded-3xl, .rounded-2xl, .rounded-xl {
        box-sizing: border-box;
        max-width: 100%;
    }

    /* Gap padrão em flex-wrap */
    .flex-wrap { gap: 8px !important; }

    /* ═══ BLOCOS DE CONTEÚDO (fora do hero) ═══════════════
       Regras gerais para cards e blocos renderizados pelo
       fii-template dentro do <main> (Portfolio, Ativos,
       Gestora, Taxas, Timeline, Tese, Dividendos, Valuation,
       Conclusão etc.)
       ══════════════════════════════════════════════════════ */

    /* Wrapper dark-card geral (Portfólio, Gestora, Taxas...) */
    main .dark-card {
        padding: 16px 14px !important;
        border-radius: 16px !important;
    }
    main .dark-card.rounded-3xl { padding: 18px 14px !important; }

    /* Título do bloco (h2 dentro dos cards escuros) */
    main .dark-card h2 {
        font-size: 1.15rem !important;
        line-height: 1.3 !important;
        margin-bottom: 14px !important;
    }

    /* Subtítulos h3 */
    main .dark-card h3 {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }

    /* ── Portfolio: grid de stats (Imóveis, ABL, Vacância, WALE) ── */
    /* Esses cards pequenos bg-white/5 com números grandes são os
       principais ofensores no mobile. */
    main .bg-white\/5.rounded-xl.p-4.text-center {
        padding: 12px 8px !important;
        border-radius: 12px !important;
    }
    main .bg-white\/5 .text-3xl {
        font-size: 1.35rem !important;    /* 21.6px — antes 30px */
        line-height: 1.1 !important;
        font-weight: 800 !important;
    }
    main .bg-white\/5 .text-xs {
        font-size: 0.65rem !important;
        line-height: 1.25 !important;
    }

    /* Grids internos (2 colunas em mobile — vs md:grid-cols-X) */
    main .grid.md\:grid-cols-2,
    main .grid.md\:grid-cols-3,
    main .grid.md\:grid-cols-4,
    main .grid.md\:grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    /* Casos específicos: alguns blocos quebram melhor em 1 coluna */
    main .grid.md\:grid-cols-2.chart-wrap,
    main .grid.md\:grid-cols-2.gestora-fundos-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── Gestora: bloco stats de AuM / Anos ── */
    main .text-3xl.font-bold,
    main .text-4xl.font-bold {
        font-size: 1.4rem !important;
    }

    /* ── Timeline períodos ── */
    main .timeline-period .text-lg,
    main .timeline-period .font-semibold {
        font-size: 0.95rem !important;
    }

    /* ── Conclusão: pontosFortes / pontosAtencao ── */
    main section ul li {
        font-size: 0.88rem !important;
        line-height: 1.55 !important;
    }

    /* ── Tabelas pequenas: estão com scroll, mas reduz fonte ── */
    main table th,
    main table td {
        font-size: 0.75rem !important;
    }

    /* ── Paragrafos em conclusão/tese ── */
    main p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }

    /* ── Chart containers: altura menor no mobile ── */
    main .chart-container { height: 220px !important; }

    /* Badges/pills internos de conteúdo (ratings, risco, etc) */
    main .px-2.py-1.rounded { font-size: 0.65rem !important; padding: 3px 7px !important; }
}

/* ============================================================
   TAB NAV — menu de navegacao por conteudo (mobile-first)
   ============================================================ */
.fii-tabs {
    position: sticky;
    /* Encosta abaixo do cabeçalho fixo do site (--topbar-h: 56px desktop /
       52px mobile, definido em article-fii.css). Evita que sticky fique
       escondida atrás do topbar global. */
    top: var(--topbar-h, 56px);
    z-index: 40;
    background: linear-gradient(180deg, rgba(13,17,23,0.98) 0%, rgba(13,17,23,0.96) 100%);
    /* backdrop-filter removido: barra de abas sticky re-rasterizava o blur a
       cada frame de scroll; fundo subido p/ ~opaco mantém o visual. */
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin: 16px 0 20px;
    /* scroll-margin-top serve para navegação via âncora de fragmento (#tab-id) */
    scroll-margin-top: calc(var(--topbar-h, 56px) + 4px);
}
.fii-tabs-inner {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Alinha o menu à ESQUERDA, na MESMA coluna do conteúdo. O <main> usa
       `#fii-root .max-w-7xl { max-width: 1200px }` (override do 1280 do
       Tailwind) + 14px de padding lateral — então a borda esquerda do card
       fica em (vw-1200)/2 + 14. Replicamos AQUI o mesmo box (1200px centrado +
       14px) pra o primeiro botão bater exatamente nessa borda. Antes usávamos
       1280/16 e o menu ficava ~38px à esquerda do conteúdo. */
    padding: 8px 14px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: flex-start;
}
.fii-tabs-inner::-webkit-scrollbar { display: none; }
.fii-tabs-inner.is-dragging { cursor: grabbing; user-select: none; }
.fii-tabs-inner.is-dragging .fii-tab-btn { pointer-events: none; }
.fii-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.72);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all .18s ease;
    flex-shrink: 0;
}
.fii-tab-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.16);
}
.fii-tab-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(16,185,129,0.22) 0%, rgba(59,130,246,0.22) 100%);
    border-color: rgba(16,185,129,0.45);
    box-shadow: 0 4px 14px rgba(16,185,129,0.15);
}
.fii-tab-icon { display: inline-flex; align-items: center; }
.fii-tab-label { }
.fii-tab-pane { animation: fii-fade-in .25s ease; }
.fii-tab-pane[hidden] { display: none !important; }
@keyframes fii-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    /* Sem margem lateral negativa — barra respeita o padding do container.
       Padding interno horizontal de 16px alinha o primeiro botão ("Visão Geral")
       verticalmente com o conteúdo abaixo e dá respiro à direita do último botão. */
    .fii-tabs { margin: 12px 0 16px; border-radius: 12px; }
    .fii-tabs-inner {
        padding: 8px 16px;
        gap: 6px;
        scroll-padding-left: 16px;
        scroll-padding-right: 16px;
    }
    .fii-tab-btn { padding: 9px 12px; font-size: 0.82rem; }
    .fii-tab-icon svg { width: 14px; height: 14px; }
}

/* ============================================================
   DIVIDENDOS v2 — widgets do redesign
   ============================================================ */

/* 3 cards no topo: ultimo / proximo / pontos */
.divid-v2-toprow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
@media (min-width: 768px) {
    .divid-v2-toprow { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
.divid-v2-topcard {
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    display: flex; flex-direction: column;
    min-height: 140px;
}
.divid-v2-topcard-tag {
    font-size: 0.66rem; font-weight: 800; letter-spacing: 0.10em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 6px;
}
.divid-v2-topcard-tag-soft {
    font-size: 0.62rem; font-weight: 600; letter-spacing: 0.04em;
    margin-left: 6px; color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 4px;
    text-transform: lowercase;
}
.divid-v2-topcard-value {
    font-size: 2rem; font-weight: 800; color: #fff;
    line-height: 1.1; letter-spacing: -0.01em;
}
.divid-v2-topcard-sub {
    font-size: 0.78rem; color: #94a3b8; margin-top: 4px;
}
.divid-v2-topcard-meta {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.08);
    font-size: 0.78rem; color: #cbd5e1;
    display: grid; gap: 4px;
}
.divid-v2-topcard-meta span { color: #94a3b8; }
.divid-v2-topcard-regra {
    margin-top: 8px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(167,139,250,0.10);
    border: 1px solid rgba(167,139,250,0.22);
    font-size: 0.74rem; color: #94a3b8;
}
.divid-v2-topcard-regra strong { color: #c4b5fd; font-weight: 700; }
.divid-v2-topcard-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(167,139,250,0.18);
    color: #c4b5fd !important;
    font-size: 0.72rem;
    font-weight: 700;
}
.divid-v2-topcard-count.past {
    background: rgba(148,163,184,0.15);
    color: #94a3b8 !important;
}
.divid-v2-topcard-foot {
    margin-top: auto; padding-top: 10px;
    font-size: 0.65rem; color: rgba(148,163,184,0.55); font-style: italic;
    text-transform: lowercase;
}
.divid-v2-topcard-paid {
    background: linear-gradient(135deg, rgba(16,185,129,0.10) 0%, rgba(16,185,129,0.04) 100%);
    border-color: rgba(16,185,129,0.30);
}
.divid-v2-topcard-paid .divid-v2-topcard-value { color: #6ee7b7; }
.divid-v2-topcard-next {
    background: linear-gradient(135deg, rgba(59,130,246,0.10) 0%, rgba(147,51,234,0.06) 100%);
    border-color: rgba(147,51,234,0.30);
}
.divid-v2-topcard-next .divid-v2-topcard-value { color: #c4b5fd; }
.divid-v2-topcard-alerts {
    background: linear-gradient(135deg, rgba(245,158,11,0.06) 0%, rgba(239,68,68,0.04) 100%);
    border-color: rgba(245,158,11,0.25);
}
.divid-v2-topcard-alert-list {
    list-style: none; padding: 0; margin: 4px 0 0 0;
    display: flex; flex-direction: column; gap: 8px;
}
.divid-v2-topcard-alert-item {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.82rem; color: #cbd5e1;
    line-height: 1.35;
}
.divid-v2-topcard-alert-dot {
    width: 6px; height: 6px; border-radius: 50%;
    margin-top: 7px; flex-shrink: 0;
    background: #94a3b8;
}
.divid-v2-topcard-alert-item.sev-red     .divid-v2-topcard-alert-dot { background: #ef4444; }
.divid-v2-topcard-alert-item.sev-amber   .divid-v2-topcard-alert-dot { background: #f59e0b; }
.divid-v2-topcard-alert-item.sev-emerald .divid-v2-topcard-alert-dot { background: #10b981; }
.divid-v2-topcard-alert-item.sev-blue    .divid-v2-topcard-alert-dot { background: #3b82f6; }

.divid-v2-sust-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 4px;
}
.divid-v2-sust-badge {
    width: 76px; height: 76px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.1rem; font-weight: 800;
    border: 3px solid currentColor;
    flex-shrink: 0;
}
.divid-v2-sust-badge.cor-emerald { color: #10b981; background: rgba(16,185,129,0.08); }
.divid-v2-sust-badge.cor-amber   { color: #f59e0b; background: rgba(245,158,11,0.08); }
.divid-v2-sust-badge.cor-red     { color: #ef4444; background: rgba(239,68,68,0.08); }
.divid-v2-sust-badge.cor-blue    { color: #3b82f6; background: rgba(59,130,246,0.08); }
/* Compat com classes antigas (status-*) */
.divid-v2-sust-badge.status-fazendo_caixa { color: #10b981; }
.divid-v2-sust-badge.status-queimando_caixa { color: #ef4444; }
.divid-v2-sust-badge.status-estavel { color: #3b82f6; }
.divid-v2-sust-badge.status-misto { color: #f59e0b; }
.divid-v2-sust-text { font-size: 0.92rem; color: #cbd5e1; }
.divid-v2-sust-tag {
    font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 4px;
}
.divid-v2-sust-titulo {
    font-size: 1.22rem; font-weight: 800; color: #fff;
    line-height: 1.25;
    margin-bottom: 4px;
}
.divid-v2-sust-horizonte {
    font-size: 0.82rem; color: #cbd5e1;
    margin-bottom: 6px;
}
.divid-v2-sust-horizonte strong { color: #fff; }
.divid-v2-sust-caixa-sub {
    display: inline-block;
    font-size: 0.76rem; color: #94a3b8;
    background: rgba(255,255,255,0.04);
    padding: 3px 10px; border-radius: 999px;
    margin-bottom: 10px;
}
.divid-v2-sust-caixa-sub strong { font-weight: 700; }
.divid-v2-sust-caixa-sub strong.cor-emerald { color: #6ee7b7; }
.divid-v2-sust-caixa-sub strong.cor-amber   { color: #fcd34d; }
.divid-v2-sust-caixa-sub strong.cor-red     { color: #fca5a5; }
.divid-v2-sust-caixa-sub strong.cor-blue    { color: #93c5fd; }
.divid-v2-sust-leitura { font-size: 0.92rem; color: #cbd5e1; }
.divid-v2-sust-leitura p + p { margin-top: 8px; }
@media (max-width: 768px) {
    .divid-v2-sust-card { grid-template-columns: 1fr; gap: 14px; }
    .divid-v2-sust-badge { margin: 0 auto; width: 64px; height: 64px; font-size: 1.7rem; }
    .divid-v2-sust-tag, .divid-v2-sust-titulo { text-align: center; }
}
/* ─────────────────────────────────────────
   SÍNTESE COMPILADA
   ───────────────────────────────────────── */
.divid-v2-sintese {
    padding: 18px 20px;
    border: 1px solid rgba(255,255,255,0.08);
}
.divid-v2-sintese.cor-amber   { border-left: 4px solid #f59e0b; }
.divid-v2-sintese.cor-emerald { border-left: 4px solid #10b981; }
.divid-v2-sintese.cor-red     { border-left: 4px solid #ef4444; }
.divid-v2-sintese.cor-blue    { border-left: 4px solid #3b82f6; }
.divid-v2-sintese-head {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 6px;
}
.divid-v2-sintese-tag {
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em;
    color: rgba(255,255,255,0.55);
}
.divid-v2-sintese-tendencia {
    font-size: 0.85rem; font-weight: 700; color: #fff;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.35);
}
.divid-v2-sintese.cor-emerald .divid-v2-sintese-tendencia { background: rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.35); }
.divid-v2-sintese.cor-red     .divid-v2-sintese-tendencia { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.35); }
.divid-v2-sintese.cor-blue    .divid-v2-sintese-tendencia { background: rgba(59,130,246,0.18); border-color: rgba(59,130,246,0.35); }
.divid-v2-sintese-direcao {
    font-size: 0.95rem; color: #cbd5e1;
    margin: 6px 0 14px;
    line-height: 1.45;
}
.divid-v2-sintese-grid {
    display: grid; gap: 14px;
    grid-template-columns: 1fr;
    margin-bottom: 14px;
}
@media (min-width: 768px) { .divid-v2-sintese-grid { grid-template-columns: 1fr 1fr; gap: 18px; } }
.divid-v2-sintese-col h4 {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.divid-v2-sintese-col.positivo h4 { color: #6ee7b7; }
.divid-v2-sintese-col.negativo h4 { color: #fca5a5; }
.divid-v2-sintese-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.divid-v2-sintese-item {
    display: grid;
    grid-template-columns: 6px 1fr auto;
    gap: 8px;
    align-items: start;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.84rem;
    line-height: 1.4;
    color: #cbd5e1;
}
.divid-v2-sintese-bullet {
    width: 6px; height: 6px; border-radius: 50%;
    margin-top: 7px;
    background: #94a3b8;
}
.divid-v2-sintese-col.positivo .divid-v2-sintese-bullet { background: #10b981; }
.divid-v2-sintese-col.negativo .divid-v2-sintese-bullet { background: #ef4444; }
.divid-v2-sintese-peso {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 6px; border-radius: 4px;
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    white-space: nowrap;
    align-self: center;
}
.divid-v2-sintese-item.peso-alto  .divid-v2-sintese-peso { background: rgba(245,158,11,0.18); color: #fcd34d; }
.divid-v2-sintese-item.peso-medio .divid-v2-sintese-peso { background: rgba(148,163,184,0.18); color: #cbd5e1; }
.divid-v2-sintese-item.peso-baixo .divid-v2-sintese-peso { background: rgba(255,255,255,0.05); color: #94a3b8; }
.divid-v2-sintese-empty {
    font-size: 0.82rem; color: #64748b; font-style: italic;
    padding: 8px 10px;
}
.divid-v2-sintese-veredicto {
    padding: 14px 16px;
    background: rgba(167,139,250,0.06);
    border: 1px solid rgba(167,139,250,0.18);
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.divid-v2-sust-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 14px; }
.divid-v2-sust-extra {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.08);
    font-size: 0.8rem; color: #94a3b8;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.divid-v2-sust-extra-lbl { color: #cbd5e1; }
.divid-v2-sust-extra-note { cursor: help; color: #64748b; font-size: 0.85rem; }
.divid-v2-sust-stat { background: rgba(255,255,255,0.04); padding: 10px; border-radius: 10px; text-align: center; }
.divid-v2-sust-stat-val { font-weight: 700; color: #fff; font-size: 1.1rem; }
.divid-v2-sust-stat-lbl { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; }

.divid-v2-charts-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    margin-bottom: 12px;
}
.divid-v2-charts-controls {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.divid-v2-range-picker, .divid-v2-group-picker {
    display: inline-flex; gap: 4px;
    background: rgba(255,255,255,0.04); padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
}
.divid-v2-range-btn, .divid-v2-group-btn {
    background: transparent; border: none;
    padding: 6px 14px; border-radius: 999px;
    color: #94a3b8; font-weight: 600; font-size: 0.8rem;
    cursor: pointer; transition: all .15s;
    white-space: nowrap;
}
.divid-v2-range-btn.is-active { background: rgba(16,185,129,0.22); color: #fff; }
.divid-v2-group-btn.is-active { background: rgba(59,130,246,0.22); color: #fff; }
.divid-v2-range-btn:hover:not(.is-active):not(.is-disabled),
.divid-v2-group-btn:hover:not(.is-active) { color: #fff; }
.divid-v2-range-btn.is-disabled {
    opacity: 0.32; cursor: not-allowed; pointer-events: none;
}
@media (max-width: 768px) {
    .divid-v2-charts-controls { gap: 6px; width: 100%; }
    .divid-v2-range-btn, .divid-v2-group-btn { padding: 5px 10px; font-size: 0.72rem; }
}

.divid-v2-dividendo-block { margin-bottom: 16px; }
.divid-v2-caixa-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255,255,255,0.06);
}
.divid-v2-caixa-title {
    font-size: 0.85rem; font-weight: 600;
    color: #cbd5e1; margin-bottom: 10px;
    letter-spacing: 0.01em;
}
.divid-v2-caixa-block .divid-v2-caixa-title {
    color: rgba(167,139,250,0.85);
    font-size: 0.78rem;
}
.divid-v2-caixa-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    margin-bottom: 10px;
}
.divid-v2-caixa-head .divid-v2-caixa-title { margin-bottom: 0; }
.divid-v2-caixa-legend {
    display: inline-flex; gap: 12px; flex-wrap: wrap;
    font-size: 0.7rem; color: #94a3b8;
}
.divid-v2-caixa-legend > span {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
@media (max-width: 768px) {
    .divid-v2-caixa-legend { font-size: 0.65rem; gap: 8px; }
}

/* Legenda da timeline — inline, alinhada a esquerda, quebra so quando nao cabe */
.divid-v2-tl-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px 12px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    color: #94a3b8;
}
.divid-v2-tl-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.divid-v2-tl-legend-item .dot-sw {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.divid-v2-tl-hint {
    font-size: 0.7rem;
    color: rgba(148,163,184,0.55);
    margin: 0 0 10px 0;
    text-align: left;
}
@media (max-width: 768px) {
    .divid-v2-tl-legend { gap: 3px 10px; font-size: 0.68rem; }
    .divid-v2-tl-legend-item .dot-sw { width: 8px; height: 8px; }
    .divid-v2-tl-hint { font-size: 0.65rem; }
}

/* Timeline com escala temporal proporcional + scroll horizontal */
.divid-v2-tl-scroll {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 6px;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.divid-v2-tl-scroll.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}
.divid-v2-tl-scroll.is-dragging .divid-v2-tl-dot { pointer-events: none; }
.divid-v2-tl-scroll::-webkit-scrollbar { height: 8px; }
.divid-v2-tl-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 4px; }
.divid-v2-tl-scroll::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.4); border-radius: 4px; }
.divid-v2-tl-scroll::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,0.6); }

.divid-v2-tl-canvas {
    position: relative;
    height: 120px;
    min-width: 100%;
}

/* Linha horizontal central — width vem inline do JS (= largura total do canvas) */
.divid-v2-tl-line {
    position: absolute;
    top: 60px;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(148,163,184,0.18), rgba(148,163,184,0.45) 50%, rgba(148,163,184,0.18));
    border-radius: 2px;
    pointer-events: none;
}

/* Marcador de ano (linha vertical com label "2020", "2021"…) */
.divid-v2-tl-year {
    position: absolute;
    top: 22px; bottom: 22px;
    width: 1px;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}
.divid-v2-tl-year span {
    position: absolute;
    top: -16px;
    left: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.04em;
}

/* Marcador HOJE (linha vertical destacada) */
.divid-v2-tl-today {
    position: absolute;
    top: 18px; bottom: 18px;
    width: 2px;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.18));
    border-radius: 2px;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(255,255,255,0.18);
}
.divid-v2-tl-today span {
    position: absolute;
    top: -4px;
    left: 50%; transform: translateX(-50%);
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
    color: #fff;
    background: rgba(255,255,255,0.14);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Pontos sobre a linha — posicionados absolutamente por offset em px */
.divid-v2-tl-dot {
    position: absolute;
    top: 60px;
    transform: translate(-50%, -50%);
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(13,17,23,0.9);
    background: #3b82f6;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
    transition: transform .15s, box-shadow .15s;
}
.divid-v2-tl-dot:hover {
    transform: translate(-50%, -50%) scale(1.4);
    z-index: 5;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15), 0 4px 14px rgba(0,0,0,0.4);
}
.divid-v2-tl-dot.is-active {
    transform: translate(-50%, -50%) scale(1.55);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3), 0 4px 18px rgba(167,139,250,0.6);
    z-index: 6;
}
/* Pontos passado: cor solida por severidade */
.divid-v2-tl-dot.kind-passado.sev-positivo { background: #10b981; }
.divid-v2-tl-dot.kind-passado.sev-negativo { background: #ef4444; }
.divid-v2-tl-dot.kind-passado.sev-neutro   { background: #3b82f6; }

/* Pontos futuros: cor por severidade, certeza modula saturacao/borda
   confirmado = cor solida, projetado = cor translucida + borda colorida,
   possivel = transparente + borda tracejada */
/* Dot do HOJE — invisivel mas clicavel, sobre o marcador HOJE */
.divid-v2-tl-dot.kind-hoje {
    width: 22px; height: 22px;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.divid-v2-tl-dot.kind-hoje:hover {
    background: rgba(255,255,255,0.32);
    border-color: rgba(255,255,255,0.85);
}
.divid-v2-tl-dot.kind-hoje.is-active {
    background: rgba(255,255,255,0.5);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.25), 0 4px 18px rgba(255,255,255,0.35);
}
.divid-v2-tl-dot.kind-futuro                                    { background: #a78bfa; border-color: rgba(167,139,250,0.55); }
/* positivo (verde) */
.divid-v2-tl-dot.kind-futuro.sev-positivo.cer-confirmado        { background: #10b981; border-color: rgba(13,17,23,0.9); }
.divid-v2-tl-dot.kind-futuro.sev-positivo.cer-projetado         { background: rgba(16,185,129,0.45); border-color: #10b981; }
.divid-v2-tl-dot.kind-futuro.sev-positivo.cer-possivel          { background: transparent; border-color: #10b981; border-style: dashed; }
/* negativo (vermelho) */
.divid-v2-tl-dot.kind-futuro.sev-negativo.cer-confirmado        { background: #ef4444; border-color: rgba(13,17,23,0.9); }
.divid-v2-tl-dot.kind-futuro.sev-negativo.cer-projetado         { background: rgba(239,68,68,0.45); border-color: #ef4444; }
.divid-v2-tl-dot.kind-futuro.sev-negativo.cer-possivel          { background: transparent; border-color: #ef4444; border-style: dashed; }
/* neutro (azul/roxo) */
.divid-v2-tl-dot.kind-futuro.sev-neutro.cer-confirmado          { background: #3b82f6; border-color: rgba(13,17,23,0.9); }
.divid-v2-tl-dot.kind-futuro.sev-neutro.cer-projetado           { background: rgba(59,130,246,0.45); border-color: #3b82f6; }
.divid-v2-tl-dot.kind-futuro.sev-neutro.cer-possivel            { background: transparent; border-color: #3b82f6; border-style: dashed; }

.divid-v2-timeline-details {
    margin-top: 18px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    min-height: 80px;
}
.divid-v2-timeline-details-empty { color: #64748b; font-size: 0.85rem; font-style: italic; }
.divid-v2-evdetail-data {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.01em;
    margin-bottom: 2px;
    text-transform: capitalize;
}
.divid-v2-evdetail-titulo {
    font-size: 0.92rem;
    font-weight: 600;
    color: #cbd5e1;
    line-height: 1.35;
    margin-bottom: 6px;
}
.divid-v2-evdetail-tags {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 4px;
}
@media (max-width: 768px) {
    .divid-v2-evdetail-data { font-size: 1rem; }
    .divid-v2-evdetail-titulo { font-size: 0.88rem; }
}

.divid-v2-projecao-grid {
    display: grid; gap: 12px;
    grid-template-columns: 1fr;
    margin-top: 12px;
}
@media (min-width: 768px) { .divid-v2-projecao-grid { grid-template-columns: repeat(3, 1fr); } }
.divid-v2-cenario {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
}
.divid-v2-cenario.is-base      { border-color: rgba(59,130,246,0.4);   background: rgba(59,130,246,0.06); }
.divid-v2-cenario.is-otimista  { border-color: rgba(16,185,129,0.4);   background: rgba(16,185,129,0.06); }
.divid-v2-cenario.is-pessimista{ border-color: rgba(239,68,68,0.4);    background: rgba(239,68,68,0.06); }
.divid-v2-cenario-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: #94a3b8; text-transform: uppercase; }
.divid-v2-cenario-dy    { font-size: 2rem; font-weight: 800; color: #fff; margin: 4px 0; }
.divid-v2-cenario-div   { font-size: 0.85rem; color: #cbd5e1; margin-bottom: 6px; }
.divid-v2-cenario-desc  { font-size: 0.78rem; color: #94a3b8; }

.divid-v2-guidance {
    background: linear-gradient(135deg, rgba(59,130,246,0.10) 0%, rgba(147,51,234,0.08) 100%);
    border: 1px solid rgba(147,51,234,0.35);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 14px;
}
.divid-v2-guidance-head {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.divid-v2-guidance-chart-wrap {
    background: rgba(13,17,23,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px 12px 8px;
}
.divid-v2-guidance-chart-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
.divid-v2-guidance-chart-title {
    font-size: 0.78rem; font-weight: 700; color: #e2e8f0; letter-spacing: 0.02em;
}
.divid-v2-guidance-chart-legend {
    display: inline-flex; gap: 12px; flex-wrap: wrap;
    font-size: 0.7rem; color: #94a3b8;
}
.divid-v2-guidance-chart-legend > span {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.divid-v2-guidance-chart-legend .dash-sw {
    display: inline-block;
    width: 14px; height: 2px;
    border-radius: 1px;
    flex-shrink: 0;
}
.divid-v2-guidance-chart-legend .dash-sw.dotted {
    background: linear-gradient(90deg, currentColor 50%, transparent 50%);
    background-size: 4px 100%;
    background-color: transparent !important;
    color: rgba(255,255,255,0.6);
    height: 2px;
}
@media (max-width: 768px) {
    .divid-v2-guidance { padding: 14px; }
    .divid-v2-guidance-chart-legend { font-size: 0.65rem; gap: 8px; }
}
.divid-v2-guidance-titulo {
    font-size: 1.15rem; font-weight: 800; color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}
.divid-v2-guidance-fonte {
    font-size: 0.72rem; letter-spacing: 0.02em; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(147,51,234,0.22); color: #d8b4fe;
    border: 1px solid rgba(147,51,234,0.4);
    white-space: nowrap;
}
.divid-v2-guidance-fonte.gestor {
    background: rgba(16,185,129,0.22); color: #6ee7b7;
    border-color: rgba(16,185,129,0.4);
}
.divid-v2-guidance-faixa { font-size: 1.3rem; font-weight: 700; color: #fff; }
.divid-v2-guidance-period { font-size: 0.85rem; color: #94a3b8; }
.divid-v2-guidance-premissas { flex-basis: 100%; font-size: 0.8rem; color: #cbd5e1; }
.divid-v2-guidance-premissas ul { list-style: disc; padding-left: 20px; margin-top: 6px; }

/* ===========================================================
   ENCAIXE NA CARTEIRA v1
   =========================================================== */

/* RESUMO DE RISCO — bloco hero no topo da aba Risco.
   Visualmente distinto do resto: gradient sutil, score gigante, tipografia leve. */
.risco-resumo {
    position: relative;
    padding: 28px 24px 24px;
    margin-bottom: 24px;
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--enc-cor) 14%, rgba(15,23,42,0.95)) 0%,
            rgba(15,23,42,0.92) 60%,
            rgba(15,23,42,0.96) 100%);
    border: 1px solid var(--enc-border);
}
.risco-resumo::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        circle at 0% 0%,
        color-mix(in srgb, var(--enc-cor) 22%, transparent) 0%,
        transparent 55%);
    opacity: 0.6;
}
.risco-resumo > * { position: relative; z-index: 1; }

.risco-resumo-emerald { --enc-cor: #10b981; --enc-border: rgba(16, 185, 129, 0.40); }
.risco-resumo-amber   { --enc-cor: #f59e0b; --enc-border: rgba(245, 158, 11, 0.40); }
.risco-resumo-red     { --enc-cor: #ef4444; --enc-border: rgba(239, 68, 68, 0.40); }

.risco-resumo-tag {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--enc-cor);
    font-weight: 700;
    margin-bottom: 14px;
    opacity: 0.85;
}

.risco-resumo-grid {
    display: grid;
    grid-template-columns: minmax(0, 200px) 1fr;
    gap: 24px;
    align-items: center;
}
@media (max-width: 640px) {
    .risco-resumo-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.risco-resumo-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 0.95;
}
.risco-resumo-score {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.04em;
    line-height: 0.85;
    text-shadow: 0 0 30px color-mix(in srgb, var(--enc-cor) 50%, transparent);
}
.risco-resumo-score-de {
    font-size: 0.85rem;
    color: rgb(148 163 184);
    margin-top: 4px;
}
.risco-resumo-nivel {
    margin-top: 10px;
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--enc-cor);
    color: #0f172a;
}

.risco-resumo-texto p {
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgb(226 232 240);
    margin: 0;
    font-weight: 400;
}

.risco-resumo-drivers {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed rgba(255,255,255,0.08);
}
.risco-resumo-drivers-tag {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: rgb(148 163 184);
    font-weight: 700;
    margin-bottom: 12px;
}
.risco-resumo-drivers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) {
    .risco-resumo-drivers-grid { grid-template-columns: 1fr; }
}
.risco-resumo-driver {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border-left: 3px solid var(--driver-cor);
}
.risco-resumo-driver-emerald { --driver-cor: #10b981; }
.risco-resumo-driver-amber   { --driver-cor: #f59e0b; }
.risco-resumo-driver-red     { --driver-cor: #ef4444; }
.risco-resumo-driver-nome {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgb(148 163 184);
    font-weight: 600;
}
.risco-resumo-driver-score {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--driver-cor);
    line-height: 1;
    margin: 4px 0 6px;
}
.risco-resumo-driver-de {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(148 163 184);
}
.risco-resumo-driver-leitura {
    font-size: 0.82rem;
    color: rgb(203 213 225);
    line-height: 1.45;
}

.encaixe-cor-emerald { --enc-cor: #10b981; --enc-bg: rgba(16, 185, 129, 0.10); --enc-border: rgba(16, 185, 129, 0.35); }
.encaixe-cor-amber   { --enc-cor: #f59e0b; --enc-bg: rgba(245, 158, 11, 0.10); --enc-border: rgba(245, 158, 11, 0.35); }
.encaixe-cor-red     { --enc-cor: #ef4444; --enc-bg: rgba(239, 68, 68, 0.10);  --enc-border: rgba(239, 68, 68, 0.35); }
.encaixe-cor-blue    { --enc-cor: #3b82f6; --enc-bg: rgba(59, 130, 246, 0.10); --enc-border: rgba(59, 130, 246, 0.35); }
.encaixe-cor-slate   { --enc-cor: #64748b; --enc-bg: rgba(100, 116, 139, 0.10); --enc-border: rgba(100, 116, 139, 0.35); }

.encaixe-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.encaixe-section-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; color: #94a3b8; text-transform: uppercase; margin-bottom: 4px; }
.encaixe-section-titulo { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 12px; }

/* 1. Identidade */
.encaixe-identidade {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-left: 4px solid var(--enc-cor);
    border-radius: 18px;
    padding: 24px 28px;
    margin-bottom: 24px;
}
.encaixe-identidade-tag { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--enc-cor); font-weight: 700; margin-bottom: 8px; }
.encaixe-identidade-rotulo { font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.encaixe-identidade-sub { font-size: 0.95rem; color: #cbd5e1; line-height: 1.5; }

/* 2. Perfil de risco */
.encaixe-perfil-badge {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-radius: 14px;
    padding: 12px 18px;
    text-align: center;
    min-width: 140px;
}
.encaixe-perfil-score { font-size: 1.8rem; font-weight: 800; color: var(--enc-cor); line-height: 1; }
.encaixe-perfil-de { font-size: 0.85rem; color: #64748b; font-weight: 500; }
.encaixe-perfil-nivel { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.10em; color: var(--enc-cor); margin-top: 6px; }

.encaixe-comp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.encaixe-comp { background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px 16px; }
.encaixe-comp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.encaixe-comp-nome { font-size: 0.9rem; font-weight: 600; color: #fff; }
.encaixe-comp-score { font-size: 1.05rem; font-weight: 700; color: #fff; }
.encaixe-comp-peso { font-size: 0.7rem; color: #64748b; font-weight: 500; }
.encaixe-comp-bar { background: rgba(255,255,255,0.06); border-radius: 999px; height: 6px; overflow: hidden; margin-bottom: 8px; }
.encaixe-comp-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s; }
.encaixe-bar-emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.encaixe-bar-amber   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.encaixe-bar-red     { background: linear-gradient(90deg, #ef4444, #f87171); }
.encaixe-comp-metrica { font-size: 0.78rem; color: #94a3b8; font-family: ui-monospace, monospace; margin-bottom: 4px; }
.encaixe-comp-leitura { font-size: 0.82rem; color: #cbd5e1; line-height: 1.4; }

/* 3. Estratégias */
.encaixe-estrat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.encaixe-estrat {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-left: 3px solid var(--enc-cor);
    border-radius: 12px;
    padding: 14px 16px;
}
.encaixe-estrat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.encaixe-estrat-icone { font-size: 1.1rem; color: var(--enc-cor); font-weight: 700; }
.encaixe-estrat-nome { flex: 1; font-size: 0.95rem; font-weight: 600; color: #fff; }
.encaixe-estrat-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: var(--enc-cor); text-transform: uppercase; }
.encaixe-estrat-racional { font-size: 0.82rem; color: #cbd5e1; line-height: 1.45; }

/* 4. Riscos ocultos */
.encaixe-risco-grid { display: grid; gap: 12px; }
.encaixe-risco {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-left: 4px solid var(--enc-cor);
    border-radius: 12px;
    padding: 14px 18px;
}
.encaixe-risco-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.encaixe-risco-sev { font-size: 0.7rem; font-weight: 700; color: var(--enc-cor); letter-spacing: 0.08em; padding: 3px 10px; background: rgba(0,0,0,0.25); border-radius: 999px; }
.encaixe-risco-titulo { font-size: 1rem; font-weight: 600; color: #fff; }
.encaixe-risco-desc { font-size: 0.88rem; color: #cbd5e1; line-height: 1.5; margin-bottom: 8px; }
.encaixe-risco-mit { font-size: 0.82rem; color: #94a3b8; line-height: 1.45; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,0.08); }
.encaixe-risco-mit-tag { color: #10b981; font-weight: 600; font-size: 0.78rem; }

/* 5. Liquidez */
.encaixe-liq-stats { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.encaixe-liq-stat { flex: 1; min-width: 160px; background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px 16px; }
.encaixe-liq-stat-val { font-size: 1.3rem; font-weight: 700; color: #fff; }
.encaixe-liq-stat-lbl { font-size: 0.78rem; color: #94a3b8; margin-top: 2px; }
.encaixe-liq-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.encaixe-liq-tier { background: var(--enc-bg); border: 1px solid var(--enc-border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.encaixe-liq-tier-lbl { font-size: 0.72rem; color: #94a3b8; margin-bottom: 4px; }
.encaixe-liq-tier-val { font-size: 0.95rem; font-weight: 700; color: var(--enc-cor); }
.encaixe-liq-leitura { font-size: 0.88rem; color: #cbd5e1; line-height: 1.5; padding: 12px 14px; background: rgba(15, 23, 42, 0.5); border-radius: 10px; border-left: 3px solid #64748b; }

/* 6. Volatilidade */
.encaixe-vol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.encaixe-vol-block { background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px 18px; }
.encaixe-vol-block-tag { font-size: 0.72rem; letter-spacing: 0.10em; color: #94a3b8; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }
.encaixe-vol-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,0.06); font-size: 0.88rem; }
.encaixe-vol-row:last-child { border-bottom: none; }
.encaixe-vol-row span { color: #94a3b8; }
.encaixe-vol-row strong { color: #fff; font-weight: 600; }

/* 7. Sobreposição com pares */
.encaixe-sobre-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.encaixe-sobre-par {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-left: 3px solid var(--enc-cor);
    border-radius: 12px;
    padding: 14px 16px;
}
.encaixe-sobre-par-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.encaixe-sobre-par-ticker { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: 0.04em; }
.encaixe-sobre-par-pct { font-size: 1.3rem; font-weight: 800; color: var(--enc-cor); }
.encaixe-sobre-par-tipos { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.encaixe-sobre-tag { font-size: 0.68rem; padding: 2px 8px; background: rgba(0,0,0,0.25); border-radius: 999px; color: #cbd5e1; }
.encaixe-sobre-par-leitura { font-size: 0.82rem; color: #cbd5e1; line-height: 1.45; }
.encaixe-sobre-conclusao { font-size: 0.9rem; color: #cbd5e1; line-height: 1.55; padding: 14px 16px; background: rgba(15, 23, 42, 0.5); border-radius: 10px; border-left: 3px solid #3b82f6; }

/* 8. Cenários */
.encaixe-cen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.encaixe-cen-col-titulo { font-size: 0.85rem; font-weight: 700; color: var(--enc-cor); letter-spacing: 0.06em; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--enc-border); }
.encaixe-cen-item {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-left: 3px solid var(--enc-cor);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.encaixe-cen-titulo { font-size: 0.92rem; font-weight: 600; color: #fff; margin-bottom: 6px; }
.encaixe-cen-desc { font-size: 0.82rem; color: #cbd5e1; line-height: 1.45; }
.encaixe-cen-prob { font-size: 0.75rem; color: #94a3b8; margin-top: 6px; }
.encaixe-cen-prob strong { color: var(--enc-cor); letter-spacing: 0.1em; }

/* 9. Para quem é / não é */
.encaixe-pq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.encaixe-pq-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.encaixe-pq-tag { font-size: 0.75rem; padding: 4px 10px; background: var(--enc-bg); border: 1px solid var(--enc-border); color: var(--enc-cor); border-radius: 999px; font-weight: 600; }
.encaixe-pq-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; font-size: 0.85rem; }
.encaixe-pq-meta span { color: #94a3b8; }
.encaixe-pq-meta strong { color: #fff; text-transform: capitalize; }
.encaixe-pq-tipica { font-size: 0.88rem; color: #cbd5e1; line-height: 1.5; padding: 10px 12px; background: rgba(0,0,0,0.2); border-radius: 8px; margin-bottom: 14px; }
.encaixe-pq-listalbl { font-size: 0.78rem; font-weight: 600; color: #94a3b8; margin-bottom: 6px; letter-spacing: 0.04em; }
.encaixe-pq-lista { list-style: disc; padding-left: 20px; font-size: 0.85rem; color: #cbd5e1; line-height: 1.6; }
.encaixe-pq-lista li { margin-bottom: 4px; }
.encaixe-pq-lista-no li::marker { color: var(--enc-cor); }

/* ===========================================================
   PORTFOLIO v2 — schema discriminado por tipo
   =========================================================== */

/* ─── FOF — VP EM TEMPO REAL ──────────────────────────────── */
.fof-vp-hero {
    position: relative;
    padding: 28px 24px 22px;
    margin-bottom: 24px;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.15) 0%,
        rgba(15, 23, 42, 0.92) 55%,
        rgba(15, 23, 42, 0.96) 100%);
    border: 1px solid rgba(139, 92, 246, 0.40);
}
.fof-vp-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 100% 0%,
        rgba(139, 92, 246, 0.30) 0%, transparent 60%);
    opacity: 0.7;
}
.fof-vp-hero > * { position: relative; z-index: 1; }
.fof-vp-tag {
    font-size: 0.62rem; letter-spacing: 0.18em; color: #c4b5fd;
    font-weight: 700; margin-bottom: 10px; opacity: 0.95;
}
.fof-vp-headline {
    font-size: 1.15rem; font-weight: 700; color: #fff;
    line-height: 1.35; margin-bottom: 8px;
}
.fof-vp-explica {
    font-size: 0.85rem; color: rgb(203 213 225); line-height: 1.55;
    margin: 0 0 18px; max-width: 760px;
}

.fof-vp-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 22px;
}
.fof-vp-card {
    padding: 14px 16px; border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}
.fof-vp-card-tag {
    font-size: 0.6rem; letter-spacing: 0.14em; color: rgb(148 163 184);
    font-weight: 700; margin-bottom: 6px;
}
.fof-vp-card-val {
    font-size: 1.7rem; font-weight: 800; color: #fff;
    letter-spacing: -0.015em; line-height: 1.05; font-variant-numeric: tabular-nums;
}
.fof-vp-card-sub {
    font-size: 0.7rem; color: rgb(148 163 184); margin-top: 4px;
}
.fof-vp-estimado .fof-vp-card-val { color: #c4b5fd; text-shadow: 0 0 24px rgba(196,181,253,0.35); }
.fof-vp-delta-card.fof-vp-pos { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.35); }
.fof-vp-delta-card.fof-vp-pos .fof-vp-card-val { color: #6ee7b7; }
.fof-vp-delta-card.fof-vp-neg { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.35); }
.fof-vp-delta-card.fof-vp-neg .fof-vp-card-val { color: #fca5a5; }
.fof-vp-delta-card.fof-vp-neu { background: rgba(148,163,184,0.10); }

.fof-vp-table-wrap {
    background: rgba(15,23,42,0.55);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px; padding: 14px 6px 6px;
}
.fof-vp-table-tag {
    font-size: 0.6rem; letter-spacing: 0.14em; color: rgb(148 163 184);
    font-weight: 700; margin: 0 12px 10px;
}
.fof-vp-table-scroll { overflow-x: auto; }
.fof-vp-table {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
}
.fof-vp-table th {
    text-align: right; padding: 8px 12px; color: rgb(148 163 184);
    font-weight: 600; text-transform: uppercase; font-size: 0.62rem;
    letter-spacing: 0.06em; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.fof-vp-table th:first-child { text-align: left; }
.fof-vp-table td {
    text-align: right; padding: 9px 12px; color: rgb(226 232 240);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-variant-numeric: tabular-nums;
}
.fof-vp-table td:first-child { text-align: left; }
.fof-vp-ticker { display: flex; flex-direction: column; }
.fof-vp-link {
    font-weight: 700; color: #c4b5fd; text-decoration: none;
    letter-spacing: 0.01em;
}
.fof-vp-link:hover { color: #fff; text-decoration: underline; }
.fof-vp-nome { font-size: 0.7rem; color: rgb(148 163 184); margin-top: 1px; }
.fof-vp-data-tag {
    display: block; font-size: 0.62rem; color: rgb(100 116 139);
    margin-top: 2px;
}
.fof-vp-na { color: rgb(100 116 139); font-style: italic; }
.fof-vp-na-tag { font-size: 0.6rem; color: rgb(100 116 139); margin-left: 4px; }
.fof-vp-loading { color: rgb(100 116 139); font-style: italic; }
.fof-vp-d { font-weight: 700; }
.fof-vp-d-pos { color: #6ee7b7; }
.fof-vp-d-neg { color: #fca5a5; }
.fof-vp-d-neutro { color: rgb(148 163 184); }
.fof-vp-tfoot td {
    font-weight: 700; color: #fff; border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: none; padding-top: 12px;
}
.fof-vp-footnote {
    font-size: 0.72rem; color: rgb(100 116 139); margin-top: 14px;
    line-height: 1.5;
}
.fof-vp-footnote code {
    background: rgba(255,255,255,0.05); padding: 1px 6px; border-radius: 4px;
    font-size: 0.7rem; color: rgb(148 163 184);
}

/* Classificação do fundo */
.port-v2-tipo {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-left: 4px solid var(--enc-cor);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.port-v2-tipo-tag { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--enc-cor); font-weight: 700; margin-bottom: 4px; }
.port-v2-tipo-titulo { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.port-v2-tipo-desc { font-size: 0.85rem; color: #cbd5e1; }

/* Stats agregadas */
.port-v2-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.port-v2-stat {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
}
.port-v2-stat-val { font-size: 1.3rem; font-weight: 700; line-height: 1.1; }
.port-v2-stat-lbl { font-size: 0.72rem; color: #94a3b8; margin-top: 4px; }

/* Alocação PL */
.port-v2-aloc-list { display: flex; flex-direction: column; gap: 12px; }
.port-v2-aloc-row {  }
.port-v2-aloc-cabec { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.port-v2-aloc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.port-v2-aloc-cat { flex: 1; font-size: 0.9rem; color: #fff; font-weight: 500; }
.port-v2-aloc-pct { font-size: 1.05rem; font-weight: 700; color: #fff; }
.port-v2-aloc-bar { background: rgba(255,255,255,0.04); border-radius: 999px; height: 10px; overflow: hidden; }
.port-v2-aloc-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s; }

/* Ativos — grid */
.port-v2-ativos-grid { display: grid; gap: 16px; }
.port-v2-ativo {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 18px 20px;
}
.port-v2-ativo-imovel { border-left: 4px solid #10b981; }
.port-v2-ativo-fii    { border-left: 4px solid #3b82f6; }
.port-v2-ativo-cri    { border-left: 4px solid #8b5cf6; }
.port-v2-ativo-outro  { border-left: 4px solid #64748b; }

.port-v2-ativo-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.port-v2-ativo-tipo-badge { font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.06em; }
.port-v2-tipo-imovel { background: rgba(16,185,129,0.15); color: #10b981; }
.port-v2-tipo-fii    { background: rgba(59,130,246,0.15); color: #3b82f6; }
.port-v2-tipo-cri    { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.port-v2-tipo-outro  { background: rgba(100,116,139,0.15); color: #94a3b8; }
.port-v2-ativo-titulo { flex: 1; font-size: 1.1rem; font-weight: 700; color: #fff; }
.port-v2-imovel-padrao { font-size: 0.7rem; padding: 3px 8px; background: rgba(245,158,11,0.15); color: #f59e0b; border-radius: 6px; font-weight: 700; }
.port-v2-ativo-end { font-size: 0.85rem; color: #94a3b8; margin-bottom: 12px; }

.port-v2-imovel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.port-v2-imovel-stat { background: rgba(0,0,0,0.25); border-radius: 10px; padding: 10px 12px; text-align: center; }
.port-v2-imovel-stat-val { font-size: 1rem; font-weight: 700; color: #fff; }
.port-v2-imovel-stat-lbl { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; }

/* Locatário */
.port-v2-loc-card {
    background: rgba(0,0,0,0.20);
    border: 1px solid rgba(16,185,129,0.20);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 6px;
}
.port-v2-loc-head { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.port-v2-loc-tag { font-size: 0.65rem; letter-spacing: 0.12em; color: #10b981; font-weight: 700; margin-bottom: 4px; }
.port-v2-loc-nome { font-size: 1.05rem; font-weight: 700; color: #fff; }
.port-v2-loc-setor { font-size: 0.8rem; color: #94a3b8; margin-top: 2px; }

.port-v2-contrato-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 14px; }
.port-v2-contrato-item { display: flex; flex-direction: column; padding: 8px 10px; background: rgba(0,0,0,0.20); border-radius: 8px; }
.port-v2-contrato-item span { font-size: 0.7rem; color: #64748b; }
.port-v2-contrato-item strong { font-size: 0.92rem; color: #fff; font-weight: 600; }

/* Timeline visual do contrato */
.port-v2-contrato-tl { margin-bottom: 12px; }
.port-v2-contrato-tl-bar {
    position: relative;
    height: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}
.port-v2-contrato-tl-fill { height: 100%; border-radius: 999px; opacity: 0.55; }
.port-v2-contrato-tl-now {
    position: absolute;
    top: -3px;
    width: 4px;
    height: 18px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}
.port-v2-contrato-tl-lbl { display: flex; justify-content: space-between; font-size: 0.75rem; color: #94a3b8; }

.port-v2-contrato-multa { font-size: 0.82rem; color: #cbd5e1; padding: 8px 10px; background: rgba(0,0,0,0.20); border-radius: 8px; margin-bottom: 10px; line-height: 1.4; }

.port-v2-renov {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-left: 3px solid var(--enc-cor);
    border-radius: 10px;
    padding: 10px 12px;
}
.port-v2-renov-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.port-v2-renov-tag { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.10em; color: var(--enc-cor); }
.port-v2-renov-prob { font-size: 0.75rem; font-weight: 700; color: var(--enc-cor); padding: 2px 8px; background: rgba(0,0,0,0.30); border-radius: 999px; letter-spacing: 0.06em; }
.port-v2-renov-rac { font-size: 0.85rem; color: #cbd5e1; line-height: 1.45; }
.port-v2-renov-fonte { font-size: 0.7rem; color: #64748b; margin-top: 6px; font-style: italic; }

.port-v2-imovel-foot { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 10px; }
.port-v2-imovel-meta { font-size: 0.82rem; color: #cbd5e1; }
.port-v2-imovel-meta strong { color: #fff; }
.port-v2-ativo-fonte { font-size: 0.7rem; color: #64748b; margin-top: 10px; font-style: italic; }

/* FII */
.port-v2-fii-seg { font-size: 0.85rem; color: #cbd5e1; margin-bottom: 12px; padding: 8px 12px; background: rgba(59,130,246,0.10); border-radius: 8px; }

/* CRI */
.port-v2-cri-status { font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; font-weight: 700; background: var(--enc-bg); border: 1px solid var(--enc-border); color: var(--enc-cor); }
.port-v2-cri-rating { display: flex; gap: 10px; align-items: center; margin: 8px 0 10px 0; font-size: 0.85rem; color: #cbd5e1; flex-wrap: wrap; }
.port-v2-cri-rating strong { color: #fff; font-size: 0.95rem; }
.port-v2-cri-perfil { font-size: 0.72rem; padding: 3px 8px; background: rgba(139,92,246,0.15); color: #a78bfa; border-radius: 6px; font-weight: 600; }
.port-v2-cri-garantias { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.port-v2-cri-garantia { font-size: 0.7rem; padding: 3px 8px; background: rgba(0,0,0,0.25); color: #94a3b8; border-radius: 6px; }

/* Outro */
.port-v2-outro-desc { font-size: 0.88rem; color: #cbd5e1; margin-bottom: 12px; line-height: 1.5; padding: 10px 12px; background: rgba(0,0,0,0.20); border-radius: 8px; }

/* Concentração */
.port-v2-conc-top { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 700px) { .port-v2-conc-top { grid-template-columns: 1fr; } }
.port-v2-hhi {
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    border-radius: 14px;
    padding: 16px 20px;
    text-align: center;
}
.port-v2-hhi-val { font-size: 2.2rem; font-weight: 800; color: var(--enc-cor); line-height: 1; }
.port-v2-hhi-lbl { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; color: var(--enc-cor); margin-top: 6px; }
.port-v2-hhi-hint { font-size: 0.72rem; color: #94a3b8; margin-top: 6px; }

.port-v2-topn { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.port-v2-topn-item { background: rgba(15,23,42,0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 12px 8px; text-align: center; }
.port-v2-topn-val { font-size: 1.3rem; font-weight: 700; color: #fff; }
.port-v2-topn-lbl { font-size: 0.72rem; color: #94a3b8; margin-top: 2px; }

.port-v2-conc-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.port-v2-conc-block { background: rgba(15,23,42,0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px 16px; }
.port-v2-conc-block-tag { font-size: 0.7rem; letter-spacing: 0.10em; color: #94a3b8; font-weight: 700; margin-bottom: 10px; }
.port-v2-conc-row { margin-bottom: 8px; }
.port-v2-conc-row:last-child { margin-bottom: 0; }
.port-v2-conc-row-head { display: flex; justify-content: space-between; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 4px; }
.port-v2-conc-row-head strong { color: #fff; }
.port-v2-conc-bar { background: rgba(255,255,255,0.06); height: 6px; border-radius: 999px; overflow: hidden; }
.port-v2-conc-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); border-radius: 999px; }

/* Portfolio v2 — Timeline de transações */
.port-v2-tl-list { display: flex; flex-direction: column; gap: 12px; position: relative; padding-left: 14px; }
.port-v2-tl-list::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.12), rgba(255,255,255,0.04));
    z-index: 0;
}
.port-v2-tl-item { display: flex; gap: 14px; align-items: flex-start; position: relative; z-index: 1; }
.port-v2-tl-marker {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--enc-bg);
    border: 2px solid var(--enc-cor);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--enc-cor);
    font-weight: 800;
    font-size: 1rem;
    margin-top: 4px;
}
.port-v2-tl-content {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 16px;
}
.port-v2-tl-futuro .port-v2-tl-content { border-style: dashed; opacity: 0.92; }
.port-v2-tl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.port-v2-tl-tipo { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; padding: 3px 9px; background: var(--enc-bg); border: 1px solid var(--enc-border); color: var(--enc-cor); border-radius: 999px; text-transform: uppercase; }
.port-v2-tl-data { font-size: 0.78rem; color: #94a3b8; font-weight: 500; }
.port-v2-tl-titulo { font-size: 0.98rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.port-v2-tl-desc { font-size: 0.85rem; color: #cbd5e1; line-height: 1.5; margin-bottom: 6px; }
.port-v2-tl-valor { font-size: 0.82rem; color: #94a3b8; }
.port-v2-tl-valor strong { color: #fff; }
.port-v2-tl-fonte { font-size: 0.7rem; color: #64748b; font-style: italic; margin-top: 6px; }

/* ===========================================================
   VISÃO GERAL — Gráfico de Preço com Timeline de Eventos
   =========================================================== */
.vg-price-card { position: relative; overflow: visible; }
.vg-price-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.vg-price-tag { font-size: 0.7rem; letter-spacing: 0.10em; color: #94a3b8; font-weight: 700; margin-bottom: 4px; }
.vg-price-titulo { font-size: 1.05rem; font-weight: 600; color: #fff; }

.vg-period-selector {
    display: flex;
    gap: 4px;
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 4px;
}
.vg-period-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
}
.vg-period-btn:hover { color: #fff; background: rgba(255,255,255,0.04); }
.vg-period-btn.is-active { background: rgba(34,211,238,0.15); color: #22d3ee; }

/* Toggle "ajustar por dividendos (reinvestimento)" */
.vg-adjust-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 2px 0 14px;
}
/* Chip destacado — fácil de achar e claramente clicável. */
.vg-adjust-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    color: #d1fae5;
    font-size: 0.84rem;
    font-weight: 600;
    user-select: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16,185,129,0.10);
    border: 1px solid rgba(16,185,129,0.35);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.vg-adjust-toggle::before {
    content: "📈";
    font-size: 0.95rem;
    line-height: 1;
}
.vg-adjust-toggle:hover {
    color: #ecfdf5;
    background: rgba(16,185,129,0.16);
    border-color: rgba(16,185,129,0.55);
}
/* Quando marcado, o chip "acende" pra confirmar o estado ativo. */
.vg-adjust-toggle:has(input:checked) {
    background: rgba(16,185,129,0.20);
    border-color: rgba(16,185,129,0.7);
    box-shadow: 0 0 0 1px rgba(16,185,129,0.25);
    color: #ffffff;
}
.vg-adjust-toggle input {
    accent-color: #10b981;
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}
.vg-adjust-summary { font-size: 0.8rem; color: #94a3b8; font-weight: 600; }
.vg-adjust-summary .vg-pos { color: #10b981; }
.vg-adjust-summary .vg-neg { color: #f87171; }

.vg-price-wrap { position: relative; }
.vg-price-canvas-host {
    position: relative;
    height: 380px;
    width: 100%;
}
.vg-price-canvas-host canvas { width: 100% !important; height: 100% !important; }
.vg-markers-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}
.vg-empty {
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-style: italic;
}

/* Marker — círculo no topo */
.vg-marker {
    position: absolute;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    z-index: 5;
    --mk-cor: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Rótulo curto acima do dot — feedback visual sem precisar passar mouse */
.vg-marker-tip {
    display: inline-block;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.62rem;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--mk-cor);
    opacity: 0.78;
    margin-bottom: 3px;
    padding: 0 2px;
    text-shadow: 0 1px 2px rgba(15,23,42,0.85);
    pointer-events: none;
    transition: opacity 0.15s, max-width 0.2s;
}
.vg-marker:hover .vg-marker-tip {
    opacity: 1;
    max-width: 180px;
}
.vg-marker-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--mk-cor);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 2px rgba(15,23,42,0.95);
    transition: transform 0.15s, box-shadow 0.15s;
}
.vg-marker:hover .vg-marker-dot {
    transform: scale(1.20);
    box-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 0 2px rgba(15,23,42,0.95), 0 0 16px var(--mk-cor);
}
/* Mobile: rótulo menor para caber em telas estreitas */
@media (max-width: 640px) {
    .vg-marker-tip {
        max-width: 64px;
        font-size: 0.55rem;
    }
}
.vg-marker-cluster .vg-marker-dot {
    background: rgba(15,23,42,0.95);
    border: 2px solid var(--mk-cor);
    color: var(--mk-cor);
    width: 26px; height: 26px;
}
.vg-marker-future .vg-marker-dot {
    background: rgba(15,23,42,0.85);
    border: 2px dashed var(--mk-cor);
    color: var(--mk-cor);
}
.vg-marker-vline {
    position: absolute;
    width: 1px;
    background: var(--mk-cor);
    opacity: 0.30;
    pointer-events: none;
    z-index: 1;
    transform: translateX(-50%);
}
.vg-marker-vline-future {
    background: repeating-linear-gradient(0deg, var(--mk-cor) 0 4px, transparent 4px 8px);
    opacity: 0.50;
}

/* Legenda */
.vg-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255,255,255,0.06);
    font-size: 0.78rem;
    color: #94a3b8;
}
.vg-legend-item { display: flex; align-items: center; gap: 6px; }
.vg-legend-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
}
.vg-legend-future {
    background: rgba(15,23,42,0.85) !important;
    border: 2px dashed #ef4444;
    box-sizing: border-box;
}

/* Tooltip — não usado por enquanto (drawer cobre o caso de uso) */
.vg-tooltip { display: none; }

/* Drawer */
.vg-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 998;
    backdrop-filter: blur(2px);
}
.vg-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(440px, 100vw);
    height: 100vh;
    background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(15,23,42,1));
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 999;
    overflow-y: auto;
    padding: 24px 22px;
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
    animation: vgDrawerIn 0.22s ease-out;
}
@keyframes vgDrawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.vg-drawer-close {
    position: absolute;
    top: 12px; right: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
    font-size: 1.4rem;
    width: 36px; height: 36px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
}
.vg-drawer-close:hover { background: rgba(255,255,255,0.08); color: #fff; }

.vg-drawer-tag {
    font-size: 0.7rem; letter-spacing: 0.12em; color: #64748b;
    font-weight: 700; margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.vg-drawer-event {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 4px solid;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.vg-drawer-event-head {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.vg-drawer-icone {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    background: rgba(0,0,0,0.30);
    border-radius: 999px;
    font-size: 0.85rem; font-weight: 800;
}
.vg-drawer-tipo { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.vg-drawer-future { font-size: 0.65rem; padding: 2px 8px; background: rgba(239,68,68,0.15); color: #f87171; border-radius: 999px; font-weight: 700; letter-spacing: 0.06em; }
.vg-drawer-sev { font-size: 0.65rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.vg-drawer-sev.sev-positivo { background: rgba(16,185,129,0.15); color: #34d399; }
.vg-drawer-sev.sev-negativo { background: rgba(239,68,68,0.15); color: #f87171; }
.vg-drawer-sev.sev-neutro   { background: rgba(100,116,139,0.15); color: #94a3b8; }
.vg-drawer-sev.sev-alta     { background: rgba(239,68,68,0.15); color: #f87171; }
.vg-drawer-sev.sev-media    { background: rgba(245,158,11,0.15); color: #fbbf24; }
.vg-drawer-sev.sev-baixa    { background: rgba(16,185,129,0.15); color: #34d399; }

.vg-drawer-event-titulo { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.vg-drawer-event-data { font-size: 0.8rem; color: #94a3b8; margin-bottom: 8px; }
.vg-drawer-origem { color: #64748b; }
.vg-drawer-event-desc { font-size: 0.88rem; color: #cbd5e1; line-height: 1.55; margin-bottom: 10px; }
.vg-drawer-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.vg-drawer-meta-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 6px 8px; background: rgba(0,0,0,0.20); border-radius: 6px; }
.vg-drawer-meta-row span { color: #94a3b8; }
.vg-drawer-meta-row strong { color: #fff; font-weight: 600; }
.vg-drawer-fonte { font-size: 0.72rem; color: #64748b; font-style: italic; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,0.06); }

@media (max-width: 600px) {
    .vg-price-canvas-host { height: 300px; }
    .vg-price-head { flex-direction: column; align-items: stretch; }
    .vg-period-selector { overflow-x: auto; justify-content: flex-start; }
    .vg-drawer { width: 100vw; }
}

/* Pontos de Atenção — grid responsivo (mobile 1 col, tablet 2 col, desktop 3 col) */
.pa-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .pa-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .pa-grid { grid-template-columns: repeat(3, 1fr); }
}
.pa-grid > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===========================================================
   VISÃO GERAL — Drag-to-compare no gráfico de preço
   =========================================================== */
.vg-price-canvas-host { user-select: none; -webkit-user-select: none; }
.vg-price-canvas-host canvas { cursor: crosshair; }

.vg-range-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    border-radius: 2px;
    transition: background-color 0.12s, border-color 0.12s;
}
.vg-range-emerald { background: rgba(16,185,129,0.18);  border-left: 2px solid rgba(16,185,129,0.9);  border-right: 2px solid rgba(16,185,129,0.9); }
.vg-range-red     { background: rgba(239,68,68,0.18);   border-left: 2px solid rgba(239,68,68,0.9);   border-right: 2px solid rgba(239,68,68,0.9); }
.vg-range-slate   { background: rgba(148,163,184,0.16); border-left: 2px solid rgba(148,163,184,0.9); border-right: 2px solid rgba(148,163,184,0.9); }

.vg-range-anchor {
    position: absolute;
    pointer-events: none;
    z-index: 4;
    width: 2px;
}
.vg-range-anchor.vg-range-emerald { background: linear-gradient(180deg, transparent, #10b981, transparent); }
.vg-range-anchor.vg-range-red     { background: linear-gradient(180deg, transparent, #ef4444, transparent); }
.vg-range-anchor.vg-range-slate   { background: linear-gradient(180deg, transparent, #94a3b8, transparent); }
.vg-range-anchor::before, .vg-range-anchor::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px; height: 12px;
    border-radius: 50%;
    background: inherit;
    box-shadow: 0 0 0 2px rgba(15,23,42,0.95), 0 2px 6px rgba(0,0,0,0.4);
}
.vg-range-anchor::before { top: -6px; }
.vg-range-anchor::after  { bottom: -6px; }
.vg-range-anchor.vg-range-emerald::before, .vg-range-anchor.vg-range-emerald::after { background: #10b981; }
.vg-range-anchor.vg-range-red::before,     .vg-range-anchor.vg-range-red::after     { background: #ef4444; }
.vg-range-anchor.vg-range-slate::before,   .vg-range-anchor.vg-range-slate::after   { background: #94a3b8; }

.vg-range-label {
    position: absolute;
    pointer-events: none;
    z-index: 6;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    font-size: 0.82rem;
    color: #cbd5e1;
}
.vg-range-label.vg-range-emerald { border-color: rgba(16,185,129,0.5); }
.vg-range-label.vg-range-red     { border-color: rgba(239,68,68,0.5); }
.vg-range-label.vg-range-slate   { border-color: rgba(148,163,184,0.5); }

.vg-range-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.vg-range-label-row + .vg-range-label-row { margin-top: 4px; padding-top: 4px; border-top: 1px dashed rgba(255,255,255,0.08); }
.vg-range-dates { color: #94a3b8; font-size: 0.78rem; }
.vg-range-days  { color: #fff; font-weight: 600; font-size: 0.78rem; }
.vg-range-label-main { color: #fff; font-weight: 600; }
.vg-range-delta { font-size: 0.92rem; font-weight: 800; }
.vg-range-emerald .vg-range-delta { color: #34d399; }
.vg-range-red     .vg-range-delta { color: #f87171; }
.vg-range-slate   .vg-range-delta { color: #cbd5e1; }

.vg-range-hint {
    margin-top: 8px;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}
.vg-hint-mobile { display: none; }
@media (hover: none) and (pointer: coarse) {
    .vg-hint-desktop { display: none; }
    .vg-hint-mobile  { display: inline; }
}
@media (max-width: 600px) {
    .vg-range-hint { font-size: 0.72rem; }
    .vg-range-label { font-size: 0.74rem; padding: 6px 10px; }
    .vg-price-canvas-host canvas { cursor: default; }
}

/* ===========================================================
   PORTFOLIO v2 — Análise interpretativa do portfólio
   =========================================================== */
.port-analise {
    border-left: 4px solid var(--enc-cor);
}
.port-analise-head { margin-bottom: 12px; }
.port-analise-tag-top { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--enc-cor); font-weight: 700; margin-bottom: 4px; }
.port-analise-rotulo { font-size: 1.4rem; font-weight: 700; color: #fff; line-height: 1.3; }

.port-analise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.port-analise-tag {
    font-size: 0.72rem;
    padding: 4px 10px;
    background: var(--enc-bg);
    border: 1px solid var(--enc-border);
    color: var(--enc-cor);
    border-radius: 999px;
    font-weight: 600;
}

.port-analise-veredicto {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.65;
    padding: 14px 16px;
    background: rgba(0,0,0,0.20);
    border-radius: 10px;
    margin-bottom: 16px;
}
.port-analise-veredicto strong { color: #fff; }

.port-analise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.port-analise-bloco {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px 14px;
}
.port-analise-bloco-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.port-analise-tag-emerald { color: #34d399; }
.port-analise-tag-red     { color: #f87171; }

.port-analise-lista {
    list-style: disc;
    padding-left: 20px;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}
.port-analise-lista li { margin-bottom: 4px; }

.port-analise-perfil {
    background: rgba(0,0,0,0.20);
    border-radius: 10px;
    padding: 10px 14px;
    border-left: 3px solid var(--enc-cor);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.port-analise-perfil-tag {
    font-size: 0.65rem;
    letter-spacing: 0.10em;
    color: var(--enc-cor);
    font-weight: 700;
}
.port-analise-perfil-txt {
    font-size: 0.88rem;
    color: #fff;
    line-height: 1.5;
}

/* ===========================================================
   FOOTER — Card de transparência da análise por IA
   =========================================================== */
.footer-ai-card {
    border: 1px solid rgba(34, 211, 238, 0.18);
    background: linear-gradient(135deg, rgba(34,211,238,0.04), rgba(139,92,246,0.04));
}
.footer-ai-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.footer-ai-icon {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(139,92,246,0.15));
    border-radius: 12px;
    color: #22d3ee;
    flex-shrink: 0;
}
.footer-ai-tag {
    font-size: 0.7rem; letter-spacing: 0.12em;
    color: #22d3ee; font-weight: 700;
    margin-bottom: 4px;
}
.footer-ai-title {
    font-size: 1.05rem; font-weight: 600;
    color: #fff;
    line-height: 1.35;
}
.footer-ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.footer-ai-stat {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
}
.footer-ai-stat-lbl {
    font-size: 0.7rem; letter-spacing: 0.06em;
    color: #94a3b8; font-weight: 600;
    margin-bottom: 4px;
}
.footer-ai-stat-val {
    font-size: 1.15rem; font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.footer-ai-stat-sub {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 4px;
}
.footer-ai-disclaimer {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.55;
    padding: 12px 14px;
    background: rgba(0,0,0,0.20);
    border-radius: 10px;
    margin-bottom: 12px;
}
.footer-ai-sub {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.55;
    text-align: center;
    font-style: italic;
}

/* Legend note (texto descritivo abaixo das cores na Visão Geral) */
.vg-legend-note {
    flex-basis: 100%;
    text-align: center;
    margin-top: 6px;
    color: #64748b;
    font-style: italic;
    font-size: 0.72rem;
}

/* ===========================================================
   RELAÇÕES — vínculos com outros FIIs / conflito de interesse
   =========================================================== */
.rel-resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}
.rel-resumo-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rel-resumo-val { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.rel-resumo-lbl { font-size: 0.65rem; letter-spacing: 0.06em; color: #94a3b8; text-transform: uppercase; }

.rel-cards { display: flex; flex-direction: column; gap: 14px; }
.rel-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 4px solid var(--rel-sev-cor, #64748b);
    border-radius: 14px;
    padding: 16px 18px;
}
.rel-card.rel-sev-red    { --rel-sev-cor: #ef4444; }
.rel-card.rel-sev-amber  { --rel-sev-cor: #f59e0b; }
.rel-card.rel-sev-emerald{ --rel-sev-cor: #10b981; }
.rel-card.rel-sev-slate  { --rel-sev-cor: #64748b; }

.rel-card-head {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    justify-content: space-between; margin-bottom: 10px;
}
.rel-card-titulo { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rel-tipo-pill {
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.30);
    padding: 4px 10px; border-radius: 8px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.rel-cp-wrap { font-size: 0.95rem; color: #cbd5e1; }
.rel-cp-link { font-weight: 800; color: #c4b5fd; text-decoration: none; }
.rel-cp-link:hover { color: #fff; text-decoration: underline; }
.rel-cp-ext { font-weight: 700; color: #cbd5e1; }
.rel-cp-gest { font-size: 0.72rem; color: #94a3b8; margin-left: 6px; font-style: italic; }

.rel-card-sev {
    font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.rel-sev-pill-red    { background: rgba(239,68,68,0.18); color: #fca5a5; border: 1px solid rgba(239,68,68,0.35); }
.rel-sev-pill-amber  { background: rgba(245,158,11,0.18); color: #fcd34d; border: 1px solid rgba(245,158,11,0.35); }
.rel-sev-pill-emerald{ background: rgba(16,185,129,0.18); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.35); }
.rel-sev-pill-slate  { background: rgba(100,116,139,0.18); color: #cbd5e1; border: 1px solid rgba(100,116,139,0.35); }

.rel-card-meta {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin-bottom: 12px; font-size: 0.78rem;
}
.rel-fluxo {
    padding: 3px 10px; border-radius: 6px;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em;
}
.rel-fluxo-red    { background: rgba(239,68,68,0.18); color: #fca5a5; }
.rel-fluxo-emerald{ background: rgba(16,185,129,0.18); color: #6ee7b7; }
.rel-fluxo-blue   { background: rgba(59,130,246,0.18); color: #93c5fd; }
.rel-fluxo-slate  { background: rgba(100,116,139,0.18); color: #cbd5e1; }
.rel-data, .rel-valor {
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
}
.rel-data::before { content: "·"; margin-right: 8px; opacity: 0.4; }
.rel-valor { font-weight: 700; color: #fff; }
.rel-valor::before { content: "·"; margin-right: 8px; opacity: 0.4; font-weight: 400; }

.rel-flag {
    padding: 3px 8px; border-radius: 5px;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em;
}
.rel-flag-gest   { background: rgba(139,92,246,0.18); color: #c4b5fd; }
.rel-flag-aberto { background: rgba(245,158,11,0.18); color: #fcd34d; }

.rel-agio {
    display: flex; gap: 12px; align-items: baseline;
    margin: 12px 0;
    padding: 12px 14px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 10px;
    flex-wrap: wrap;
}
.rel-agio-pct { font-size: 1.6rem; font-weight: 800; color: #fca5a5; line-height: 1; }
.rel-agio-tag { font-size: 0.6rem; letter-spacing: 0.10em; color: #fca5a5; font-weight: 700; }
.rel-agio-leitura { font-size: 0.78rem; color: #cbd5e1; flex-basis: 100%; line-height: 1.5; }

.rel-desc { font-size: 0.85rem; color: #cbd5e1; line-height: 1.55; margin-bottom: 8px; }
.rel-desc p { margin: 0 0 6px; }
.rel-leitura { font-size: 0.82rem; color: #94a3b8; line-height: 1.5; padding: 8px 12px; background: rgba(255,255,255,0.025); border-radius: 8px; }
.rel-leitura strong { color: #cbd5e1; }

.rel-fontes-wrap { margin-top: 10px; }
.rel-fontes-wrap summary {
    cursor: pointer; font-size: 0.75rem; color: #94a3b8; font-weight: 600;
}
.rel-fontes { list-style: none; padding: 0; margin: 8px 0 0; font-size: 0.78rem; color: #cbd5e1; }
.rel-fontes li { padding: 6px 10px; background: rgba(255,255,255,0.03); border-radius: 6px; margin-bottom: 4px; }
.rel-doc-id { font-size: 0.66rem; color: #64748b; font-weight: 600; }
.rel-fonte-trecho { font-style: italic; color: #94a3b8; margin-top: 4px; font-size: 0.74rem; }

.rel-link-mapa { margin-top: 22px; text-align: center; }
.rel-link-mapa-btn {
    display: inline-block; padding: 12px 22px;
    background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(59,130,246,0.15));
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 12px;
    color: #c4b5fd; font-weight: 700; font-size: 0.88rem;
    text-decoration: none;
    transition: all .15s ease;
}
.rel-link-mapa-btn:hover {
    background: linear-gradient(135deg, rgba(139,92,246,0.30), rgba(59,130,246,0.22));
    color: #fff; transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER v2 — classificação tipológica + DY do fundo vs média da categoria
   + tag de último dividendo no canto direito
   ═══════════════════════════════════════════════════════════════════════ */

/* Linha única abaixo do título: tag de classificação + chips DY/Categoria.
   Fica na mesma linha em desktop; quebra natural em telas estreitas. */
.hd-classif-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.hd-classif-tag {
    display: inline-block;
    padding: 4px 11px;
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 999px;
    color: rgb(191, 219, 254);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: help;
}
.hd-dy-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: help;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hd-dy-chip strong {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0;
    text-transform: none;
}
.hd-dy-fund-chip {
    background: rgba(16, 185, 129, 0.13);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: rgb(167, 243, 208);
}
.hd-dy-fund-chip strong { color: #fff; }
.hd-dy-cat-chip {
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: rgb(203, 213, 225);
}
.hd-dy-cat-chip strong { color: #fff; }

/* Bloco direito: tag DPS + data da cotação (DESKTOP). Fica numa única linha
   abaixo do preço, com DPS à esquerda e data à direita. */
.hd-meta-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.hd-cot-date {
    font-size: 0.75rem;
    color: rgb(148 163 184);
    font-variant-numeric: tabular-nums;
}
.hd-dps-tag {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.30);
    font-size: 0.72rem;
    line-height: 1.4;
    color: rgb(187, 247, 208);
    cursor: help;
}
.hd-dps-label {
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgb(134, 239, 172);
}
.hd-dps-val {
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.hd-dps-date {
    color: rgb(148 163 184);
    font-variant-numeric: tabular-nums;
}

/* MOBILE: caption agora flex (DPS + data); classif-row já flex herda. */
.hm2-price-caption {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin-top: 6px;
}
.hm2-cot-date {
    font-size: 0.75rem;
    color: rgb(148 163 184);
    font-variant-numeric: tabular-nums;
}

/* Espaçamento da hd-classif-row entre topline e cota no MOBILE */
.hero-mobile .hd-classif-row {
    margin-top: 4px;
    margin-bottom: 14px;
}

@media (max-width: 720px) {
    .hd-classif-row { gap: 6px; }
    .hd-classif-tag { font-size: 0.7rem; padding: 3px 9px; }
    .hd-dy-chip { font-size: 0.65rem; padding: 2px 8px; gap: 4px; }
    .hd-dy-chip strong { font-size: 0.78rem; }
}
@media (max-width: 480px) {
    /* Em telas muito estreitas, classif quebra para a próxima linha mas
       fica organizado: tag fica numa linha, os 2 chips na próxima.        */
    .hd-classif-tag { width: 100%; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO MOBILE v3 — redesign mobile-first (substitui .hero-mobile/.hm2-*)
   ═══════════════════════════════════════════════════════════════════════ */
.fii-hero-m3 {
    display: none;
    background: linear-gradient(180deg, rgba(13, 21, 34, 0.96) 0%, rgba(15, 23, 42, 0.92) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 16px 22px;
    color: #fff;
    position: relative;
    z-index: 10;
}
@media (max-width: 1023px) {
    .fii-hero-m3 { display: block; }
    /* Esconde o hero antigo do mobile pra não duplicar */
    .hero-mobile { display: none !important; }
}

/* Zona 1: identidade (ticker + nota) */
.fhm3-id {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.fhm3-ticker {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1;
    margin: 0;
}
.fhm3-nota {
    display: inline-flex;
    align-items: baseline;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}
.fhm3-nota-num { font-size: 1.05rem; font-weight: 900; }
.fhm3-nota-den { font-size: 0.7rem; opacity: 0.7; margin-left: 1px; font-weight: 600; }
.fhm3-nota-emerald { background: rgba(16,185,129,0.16); border-color: rgba(16,185,129,0.45); color: rgb(110,231,183); }
.fhm3-nota-amber   { background: rgba(245,158,11,0.16); border-color: rgba(245,158,11,0.45); color: rgb(252,211,77); }
.fhm3-nota-red,
.fhm3-nota-orange  { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.45); color: rgb(252,165,165); }
.fhm3-nota-blue    { background: rgba(59,130,246,0.16); border-color: rgba(59,130,246,0.45); color: rgb(147,197,253); }

/* Zona 2: classificação + chips DY */
.fhm3-classif {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.fhm3-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 5px 11px;
    background: rgba(96, 165, 250, 0.13);
    border: 1px solid rgba(96, 165, 250, 0.32);
    border-radius: 999px;
    color: rgb(191, 219, 254);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: help;
    max-width: 100%;
}
.fhm3-dy-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fhm3-dy-chip {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 11px;
    border-radius: 10px;
    cursor: help;
    line-height: 1.2;
}
.fhm3-dy-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.fhm3-dy-val {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.fhm3-dy-fund {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
}
.fhm3-dy-fund .fhm3-dy-label { color: rgb(110, 231, 183); }
.fhm3-dy-cat {
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid rgba(148, 163, 184, 0.26);
}
.fhm3-dy-cat .fhm3-dy-label { color: rgb(203, 213, 225); }

/* Zona 3: cotação */
.fhm3-cota {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.fhm3-cota-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgb(147, 197, 253);
}
.fhm3-cota-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}
.fhm3-cota-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgb(148, 163, 184);
}
.fhm3-cota-amount {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.025em;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.fhm3-cota-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin-top: 8px;
    font-size: 0.73rem;
    color: rgb(148, 163, 184);
}
.fhm3-cota-date {
    font-variant-numeric: tabular-nums;
}
.fhm3-dps {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.28);
    cursor: help;
    color: rgb(187, 247, 208);
}
.fhm3-dps-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(134, 239, 172);
}
.fhm3-dps-val {
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
}
.fhm3-dps-date {
    color: rgb(148, 163, 184);
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem;
}

/* Telas muito pequenas: dy-row ainda fica em duas colunas, mas ticker reduz */
@media (max-width: 380px) {
    .fhm3-ticker { font-size: 1.7rem; }
    .fhm3-cota-amount { font-size: 2.3rem; }
    .fhm3-dy-val { font-size: 0.95rem; }
}

/* Garantir que padding lateral do conteúdo abaixo do hero respeite o container.
   O bug do menu de tabs cortando "Visão Geral" vem de .max-w-7xl com padding 14px
   mas alguma criança extrapola. Reforço aqui. */
@media (max-width: 1023px) {
    .max-w-7xl > nav,
    .max-w-7xl > .nav-tabs,
    .max-w-7xl > [role="tablist"] {
        padding-left: 14px !important;
        padding-right: 14px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   COMPARATIVO PEER-TO-PEER (recomendacao.comparativo)
   Card abaixo da Visão Geral mostrando posição do FII no bucket
   ═══════════════════════════════════════════════════════════════ */

.comp-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.comp-delta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.comp-antes-depois {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    margin-top: 10px;
    font-size: 0.9rem;
}

.comp-ad-label {
    color: rgb(148, 163, 184);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.comp-ad-old {
    color: rgb(148, 163, 184);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: line-through;
    text-decoration-color: rgba(148, 163, 184, 0.5);
    text-decoration-thickness: 1.5px;
}

.comp-ad-arrow {
    color: rgb(100, 116, 139);
    font-size: 1rem;
}

.comp-ad-new {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    padding: 2px 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.7);
}
.comp-ad-emerald { color: rgb(52, 211, 153); }
.comp-ad-red { color: rgb(248, 113, 113); }
.comp-ad-slate { color: rgb(203, 213, 225); }

.comp-ad-veredicto {
    color: rgb(148, 163, 184);
    font-size: 0.85rem;
    margin-left: auto;
}
.comp-ad-veredicto strong {
    color: rgb(226, 232, 240);
    font-weight: 700;
}

.comp-justificativa p { margin-bottom: 0.6rem; }
.comp-justificativa p:last-child { margin-bottom: 0; }
.comp-justificativa strong { color: rgb(226, 232, 240); }

.comp-peers-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.comp-peer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}
.comp-peer:hover {
    border-color: rgba(96, 165, 250, 0.45);
    transform: translateY(-1px);
}

.comp-peer-pos {
    font-size: 0.72rem;
    color: rgb(148, 163, 184);
    font-weight: 700;
    background: rgba(148, 163, 184, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 22px;
    text-align: center;
}

.comp-peer-tk {
    font-weight: 700;
    color: rgb(96, 165, 250);
    font-size: 0.88rem;
    flex: 1;
    min-width: 0;
}

.comp-peer-nt {
    font-weight: 700;
    color: rgb(226, 232, 240);
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
}

.comp-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding-top: 12px;
}

@media (max-width: 640px) {
    .comp-peers-row { grid-template-columns: 1fr; }
    .comp-ad-veredicto { margin-left: 0; width: 100%; }
}

/* ────────────────────────────────────────────────────────────
   Chat (ex-Discussão) — sub-abas Chat livre / Tópicos / Enquetes (V1)
   Espelha o bloco do fii-page-v4.css. Mantida aqui pra evitar pop-in
   visual antes do chat.css carregar.
   ──────────────────────────────────────────────────────────── */
.rap-chat-root { width: 100%; }
.rap-chat-tabs {
  display: flex; gap: 6px; padding: 6px;
  margin: 0 0 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  position: sticky; top: 0; z-index: 2;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.rap-chat-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 10px;
  border-radius: 999px; border: 0;
  background: transparent;
  color: #94a3b8;
  font-family: inherit; font-size: 0.84rem; font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.rap-chat-tab:hover { color: #e2e8f0; background: rgba(255,255,255,0.04); }
.rap-chat-tab.is-active {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,211,102,0.25);
}
.rap-chat-panel { animation: rap-chat-panel-in .22s ease; }
.rap-chat-panel[hidden] { display: none; }
@keyframes rap-chat-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FII Status Banner — fundo descontinuado
   (renomeado / liquidação / incorporação / cisão / delistado / suspenso)
   Renderizado por fii-template.js (V1 desktop) e fii-template-v4.js (V4 mobile)
   ========================================================================== */
.fii-status-banner {
  width: 100%;
  margin: 0;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 30;
}
.fii-status-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.fii-status-banner-icon {
  flex: 0 0 auto;
  font-size: 1.6rem;
  line-height: 1;
  padding-top: 2px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.fii-status-banner-body {
  flex: 1 1 auto;
  min-width: 0;
}
.fii-status-banner-headline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.fii-status-banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.fii-status-banner-date {
  font-size: 0.78rem;
  opacity: 0.85;
  font-weight: 500;
}
.fii-status-banner-text {
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0 0 8px;
  color: rgba(255,255,255,0.92);
}
.fii-status-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.fii-status-banner-cta strong { font-weight: 800; letter-spacing: 0.02em; }
.fii-status-banner-cta:hover,
.fii-status-banner-cta:focus,
.fii-status-banner-cta:visited { color: #fff; background: rgba(255,255,255,0.28); transform: translateX(2px); }

/* Tons por evento */
.fii-status-banner--amber {
  background: linear-gradient(135deg, rgba(217,119,6,0.20) 0%, rgba(180,83,9,0.12) 100%);
  border-top: 2px solid #f59e0b;
  color: #fde68a;
}
.fii-status-banner--amber .fii-status-banner-icon { color: #fbbf24; }
.fii-status-banner--amber .fii-status-banner-cta { background: rgba(245,158,11,0.30); }
.fii-status-banner--amber .fii-status-banner-cta:hover { background: rgba(245,158,11,0.50); }

.fii-status-banner--red {
  background: linear-gradient(135deg, rgba(220,38,38,0.22) 0%, rgba(153,27,27,0.14) 100%);
  border-top: 2px solid #ef4444;
  color: #fecaca;
}
.fii-status-banner--red .fii-status-banner-icon { color: #f87171; }
.fii-status-banner--red .fii-status-banner-cta { background: rgba(239,68,68,0.30); }
.fii-status-banner--red .fii-status-banner-cta:hover { background: rgba(239,68,68,0.50); }

.fii-status-banner--gray {
  background: linear-gradient(135deg, rgba(75,85,99,0.30) 0%, rgba(55,65,81,0.18) 100%);
  border-top: 2px solid #9ca3af;
  color: #e5e7eb;
}
.fii-status-banner--gray .fii-status-banner-icon { color: #9ca3af; }

/* Quando FII é inativo, esconder ações irrelevantes (carteira/alerta/fav).
   data-fii-inativo é setado por fii-template.js e fii-template-v4.js no <body>. */
body[data-fii-inativo="true"] .fii-actions-bar,
body[data-fii-inativo="true"] [data-fii-watchlist-btn],
body[data-fii-inativo="true"] [data-rap-portfolio-btn],
body[data-fii-inativo="true"] .v4-fav-btn { display: none !important; }

/* EXCEÇÃO: quem JÁ favoritou um FII descontinuado precisa conseguir REMOVER
   dos favoritos aqui na própria página (não dá pra adicionar — já não é
   negociado — mas dá pra retirar). Mostramos o coração só quando está ativo;
   ao desfavoritar, o estado-ativo cai e o botão some de novo (volta a esconder).
   V4 mobile: .v4-fav-btn.is-fav  /  V1 desktop: .fii-action-btn.is-watch.is-active */
body[data-fii-inativo="true"] .v4-fav-btn.is-fav { display: inline-flex !important; }
body[data-fii-inativo="true"] .fii-actions-bar:has(.fii-action-btn.is-watch.is-active) { display: flex !important; }
body[data-fii-inativo="true"] .fii-actions-bar .fii-action-btn.is-port,
body[data-fii-inativo="true"] .fii-actions-bar .fii-action-btn.is-watch:not(.is-active) { display: none !important; }

@media (max-width: 720px) {
  .fii-status-banner { padding: 14px 12px; }
  .fii-status-banner-inner { gap: 10px; }
  .fii-status-banner-icon { font-size: 1.4rem; }
  .fii-status-banner-title { font-size: 0.95rem; }
  .fii-status-banner-text { font-size: 0.88rem; }
  .fii-status-banner-cta { font-size: 0.85rem; padding: 5px 12px; }
}

/* ────────────────────────────────────────────────────────────
   FICHA DO FUNDO — dados objetivos (badge "DADOS")
   Bloco "porto seguro" no topo da Visão Geral.
   Visual neutro pra distinguir de blocos de análise IA.
   ──────────────────────────────────────────────────────────── */
.ficha-card { border: 1px solid rgba(148, 163, 184, 0.12); }
.ficha-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-bottom: 4px;
}
.ficha-head-titulo-wrap { display: flex; align-items: center; gap: 10px; }
.ficha-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 999px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ficha-badge-dados {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.28);
}
.ficha-badge-analise {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.30);
}
.ficha-titulo {
    font-size: 1.15rem; font-weight: 700; color: #fff;
}
.ficha-head-fonte {
    font-size: 0.78rem; color: #64748b;
}
.ficha-fonte { margin-left: 6px; opacity: 0.8; cursor: help; }
.ficha-sub {
    font-size: 0.82rem; color: #94a3b8;
    margin: 0 0 16px 0; line-height: 1.5;
}
.ficha-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.ficha-tile {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 76px;
    display: flex; flex-direction: column; justify-content: center;
}
.ficha-tile-label {
    font-size: 0.7rem; color: #94a3b8;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 4px;
    line-height: 1.2;
}
.ficha-tile-valor {
    font-size: 1.05rem; color: #fff;
    font-weight: 700; line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.ficha-tile-sub {
    font-size: 0.7rem; color: #64748b;
    margin-top: 3px; line-height: 1.25;
}
@media (max-width: 640px) {
    .ficha-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .ficha-tile { min-height: 68px; padding: 8px 10px; }
    .ficha-tile-valor { font-size: 0.98rem; }
    .ficha-titulo { font-size: 1.02rem; }
    .ficha-sub { font-size: 0.78rem; }
}

/* Badge "ANÁLISE IA" colado no canto superior de cards interpretativos */
.dark-card .ficha-badge-analise {
    position: absolute; top: 14px; right: 14px; z-index: 5;
}

/* Separador "ANÁLISE IA" entre blocos de dados e cards interpretativos */
.analise-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 28px 0 16px;
    padding: 0 4px;
}
.analise-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right,
        rgba(245, 158, 11, 0.35) 0%,
        rgba(148, 163, 184, 0.12) 60%,
        transparent 100%);
}
.analise-divider-meta {
    font-size: 0.72rem;
    color: #64748b;
    font-style: italic;
    text-align: right;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .analise-divider-meta {
        font-size: 0.66rem;
        max-width: 50%;
        line-height: 1.3;
    }
}

/* ────────────────────────────────────────────────────────────
   FICHA MODAL — clique nos tiles abre detalhes
   ──────────────────────────────────────────────────────────── */
.ficha-tile {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.10);
    color: inherit;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.ficha-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.40);
    background: rgba(30, 41, 59, 0.65);
}
.ficha-tile:hover .ficha-tile-zoom { opacity: 0.85; }
.ficha-tile:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}
.ficha-tile-zoom {
    position: absolute; top: 8px; right: 10px;
    font-size: 0.8rem; color: #94a3b8;
    opacity: 0.25;
    transition: opacity 0.16s ease;
}

.ficha-modal-bd {
    position: fixed; inset: 0;
    background: rgba(2, 6, 23, 0.72);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.ficha-modal-bd.is-open { opacity: 1; }
.ficha-modal {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.ficha-modal.is-open { opacity: 1; }
.ficha-modal-panel {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.22s ease;
}
.ficha-modal.is-open .ficha-modal-panel { transform: translateY(0) scale(1); }
.ficha-modal-head {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}
.ficha-modal-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1;
}
.ficha-modal-close {
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}
.ficha-modal-close:hover { background: rgba(148, 163, 184, 0.20); color: #fff; }
.ficha-modal-body {
    padding: 18px 22px 24px;
    overflow-y: auto;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.55;
}
.ficha-modal-body h4 {
    color: #fff;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 18px 0 6px;
}
.ficha-modal-body p { margin: 0 0 10px; }
.ficha-modal-grande {
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.ficha-modal-grande.gain { color: #34d399; }
.ficha-modal-grande.loss { color: #f87171; }
.ficha-modal-grande.mute { color: #64748b; }
.ficha-modal-sub {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 6px;
}
.ficha-modal-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.10);
    gap: 12px;
}
.ficha-modal-row:last-child { border-bottom: none; }
.ficha-modal-row-label { color: #94a3b8; font-size: 0.85rem; }
.ficha-modal-row-val { color: #fff; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ficha-modal-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 6px;
}
.ficha-modal-tabela td {
    padding: 6px 4px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.10);
    color: #cbd5e1;
}
.ficha-modal-tabela td.num {
    text-align: right;
    color: #fff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ficha-modal-tabela tr:last-child td { border-bottom: none; }
.ficha-modal-aside {
    margin-top: 18px;
    font-size: 0.82rem;
    color: #94a3b8;
    font-style: italic;
}

/* ── Tabela de dividendos (alternativa ao gráfico) ───────────────── */
.divid-tabela-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.divid-tabela-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(148,163,184,0.08);
    border: 1px solid rgba(148,163,184,0.22);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.divid-tabela-toggle:hover {
    color: #fff;
    background: rgba(148,163,184,0.14);
    border-color: rgba(148,163,184,0.4);
}
.divid-tabela-toggle-ico {
    display: inline-block;
    transition: transform .2s ease;
    font-size: 0.8rem;
}
.divid-tabela-toggle.is-open .divid-tabela-toggle-ico { transform: rotate(180deg); }
.divid-tabela-wrap { margin-top: 14px; }
/* Tabela mostra 6 meses por padrão; o botão expande os demais */
.divid-tabela-extra { display: none; }
.divid-tabela-wrap.is-open .divid-tabela-extra { display: table-row; }
.divid-tabela-scroll {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 12px;
}
.divid-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.divid-tabela thead th {
    position: sticky;
    top: 0;
    background: #131a2a;
    color: #94a3b8;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148,163,184,0.2);
    white-space: nowrap;
    z-index: 1;
}
.divid-tabela th.num, .divid-tabela td.num { text-align: right; font-variant-numeric: tabular-nums; }
.divid-tabela tbody td {
    padding: 9px 12px;
    border-bottom: 1px dashed rgba(148,163,184,0.10);
    color: #e2e8f0;
}
.divid-tabela tbody tr:hover td { background: rgba(148,163,184,0.05); }
.divid-tabela tbody tr:last-child td { border-bottom: none; }
.divid-tabela-dy { color: #34d399 !important; font-weight: 600; }
.divid-tabela-pg { color: #94a3b8 !important; font-weight: 500; }
.divid-tabela-fonte {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
}
.divid-tabela-vazia { color: #94a3b8; text-align: center; padding: 16px; }
@media (max-width: 640px) {
    .divid-tabela { font-size: 0.8rem; }
    .divid-tabela thead th, .divid-tabela tbody td { padding: 8px 8px; }
    .divid-tabela-pg { display: none; } /* economia de espaço no celular */
}
.ficha-modal-link {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.30);
    color: #93c5fd;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
}
.ficha-modal-link:hover { background: rgba(59, 130, 246, 0.25); color: #bfdbfe; }
.ficha-modal-breve {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 10px;
    display: flex; gap: 10px;
    align-items: flex-start;
}
.ficha-modal-breve-ico { font-size: 1.2rem; flex-shrink: 0; }
.ficha-modal-breve-txt {
    color: #fde68a;
    font-size: 0.85rem;
    line-height: 1.45;
}
.ficha-modal-breve-txt strong { color: #fff; }

@media (max-width: 640px) {
    .ficha-modal { padding: 8px; align-items: flex-end; }
    .ficha-modal-panel { max-height: 92vh; border-radius: 16px 16px 8px 8px; }
    .ficha-modal-grande { font-size: 1.55rem; }
    .ficha-modal-body { padding: 16px 18px 22px; }
}
