/* ══════════════════════════════════════════════════════════════
   INVEST-GLASS.CSS — tema "liquid glass" para a área de Investimentos
   Inspirado no design system Positiv+ (glassmorphism / fundo líquido).
   Escopo: tudo dentro de #invest-view (não afeta o Planejamento).
   Mantém a essência: rendimento positivo VERDE, negativo LARANJA.
   ══════════════════════════════════════════════════════════════ */

#invest-view {
    --g-bg: #070d1a;
    --g-bg2: #0a1224;
    --g-panel: rgba(255, 255, 255, 0.045);
    --g-panel-hover: rgba(255, 255, 255, 0.07);
    --g-brd: rgba(255, 255, 255, 0.10);
    --g-brd-top: rgba(255, 255, 255, 0.16);
    --g-accent: #29c5f6;
    --g-accent2: #3b82f6;
    --g-text: #eaf0fb;
    --g-text2: #9fb0c9;
    --g-text3: #66748e;
    --g-pos: #16c784;
    --g-neg: #fb6340;
    position: relative;
    min-height: 100vh;
    background: radial-gradient(1200px 700px at 15% -10%, #10203f 0%, var(--g-bg) 55%),
                radial-gradient(900px 600px at 110% 10%, #131a36 0%, var(--g-bg) 60%),
                var(--g-bg);
    color: var(--g-text);
    font-family: 'Open Sans', 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Blobs líquidos ambientes */
.inv-liquid-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.inv-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .22; }
.inv-blob.b1 { width: 480px; height: 480px; top: -120px; left: -100px; background: #1e73ff; animation: invFloat 16s ease-in-out infinite alternate; }
.inv-blob.b2 { width: 420px; height: 420px; top: 35%; right: -120px; background: #29c5f6; opacity: .15; animation: invFloat 22s ease-in-out -4s infinite alternate; }
.inv-blob.b3 { width: 560px; height: 560px; bottom: -200px; left: 25%; background: #7c3aed; opacity: .13; animation: invFloat 26s ease-in-out -8s infinite alternate; }
@keyframes invFloat { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(40px, 60px) scale(1.12); } }

#invest-view .inv-header, #invest-view .inv-main { position: relative; z-index: 1; }

/* Tipografia de destaque */
#invest-view .inv-title, #invest-view .inv-title2, #invest-view .inv-card-head h3,
#invest-view .inv-kpi-v, #invest-view .rb-value, #invest-view .inv-tab {
    font-family: 'Montserrat', 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

/* ══════ HEADER (barra de vidro) ══════ */
#invest-view .inv-header {
    background: rgba(9, 15, 28, 0.55);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--g-brd);
}
#invest-view .inv-logo {
    background: linear-gradient(135deg, var(--g-accent), var(--g-accent2));
    box-shadow: 0 6px 18px rgba(41, 197, 246, .35);
    color: #fff;
}
#invest-view .inv-title { color: #fff; }
#invest-view .inv-title2 { color: var(--g-accent); letter-spacing: .16em; text-transform: uppercase; font-size: .62rem; }
#invest-view .inv-icon-btn, #invest-view .inv-switch {
    background: var(--g-panel); border: 1px solid var(--g-brd); color: var(--g-text);
    backdrop-filter: blur(10px); border-radius: 999px; transition: all .25s cubic-bezier(.4,0,.2,1);
}
#invest-view .inv-icon-btn:hover, #invest-view .inv-switch:hover { background: #fff; color: #06101f; border-color: #fff; }

/* ══════ PAINEL DE VIDRO base (.inv-card) ══════ */
#invest-view .inv-card {
    background: var(--g-panel);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--g-brd);
    border-top-color: var(--g-brd-top);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
    position: relative;
    overflow: hidden;
    transition: all .5s cubic-bezier(.4, 0, .2, 1);
}
#invest-view .inv-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
    transition: .6s; pointer-events: none; z-index: 3;
}
#invest-view .inv-card:hover::before { left: 100%; }
#invest-view .inv-card-head h3 { color: #fff; font-weight: 700; }
#invest-view .inv-card-head { border-bottom: 1px solid var(--g-brd); }

/* ══════ KPIs ══════ */
#invest-view .inv-kpi {
    background: var(--g-panel); border: 1px solid var(--g-brd); border-top-color: var(--g-brd-top);
    border-radius: 18px; backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
#invest-view .inv-kpi-l { color: var(--g-text3); text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; font-weight: 700; }
#invest-view .inv-kpi-v { color: #fff; font-weight: 800; }
#invest-view .inv-kpi-result.res-up { background: linear-gradient(135deg, rgba(22,199,132,.20), rgba(22,199,132,.03)); border-color: rgba(22,199,132,.5); }
#invest-view .inv-kpi-result.res-down { background: linear-gradient(135deg, rgba(251,99,64,.20), rgba(251,99,64,.03)); border-color: rgba(251,99,64,.5); }

/* ══════ ABAS (Meus ativos / Rentabilidade) ══════ */
#invest-view .inv-tab {
    background: var(--g-panel); border: 1px solid var(--g-brd); color: var(--g-text2);
    border-radius: 999px; backdrop-filter: blur(10px); text-transform: uppercase; letter-spacing: .06em;
    font-size: .72rem; transition: all .25s;
}
#invest-view .inv-tab:hover { color: #fff; }
#invest-view .inv-tab.on {
    background: linear-gradient(135deg, var(--g-accent2), var(--g-accent)); color: #fff; border-color: transparent;
    box-shadow: 0 6px 18px rgba(41, 197, 246, .3);
}

/* ══════ PAINÉIS aporte (verde) / resgate (laranja) ══════ */
#invest-view .launch-buy { border-top: 2px solid var(--g-pos); }
#invest-view .launch-sell { border-top: 2px solid var(--g-neg); }
#invest-view .launch-buy .inv-card-head h3 { color: var(--g-pos); }
#invest-view .launch-sell .inv-card-head h3 { color: var(--g-neg); }

/* ══════ CAMPOS / INPUTS ══════ */
#invest-view .inline-input {
    background: rgba(255,255,255,.05); border: 1px solid var(--g-brd); color: var(--g-text);
    border-radius: 12px; transition: all .25s;
}
#invest-view .inline-input::placeholder { color: var(--g-text3); }
#invest-view .inline-input:focus { border-color: var(--g-accent); background: rgba(41,197,246,.07); outline: none; box-shadow: 0 0 0 3px rgba(41,197,246,.12); }
#invest-view .field label { color: var(--g-text2); text-transform: uppercase; letter-spacing: .06em; font-size: .64rem; font-weight: 700; }
#invest-view .wallet-search-wrap input { background: rgba(255,255,255,.05); border: 1px solid var(--g-brd); color: var(--g-text); border-radius: 14px; }
#invest-view .wallet-results { background: rgba(12,18,32,.92); backdrop-filter: blur(18px); border: 1px solid var(--g-brd); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
#invest-view .wl-res { color: var(--g-text); }
#invest-view .wl-res:hover { background: rgba(41,197,246,.10); }
#invest-view .wl-res-sym { color: #fff; }
#invest-view .wl-res-name { color: var(--g-text2); }
#invest-view .wl-res-type { color: var(--g-accent); }
#invest-view .wl-hint { color: var(--g-text3); }
#invest-view .wl-fx-hint { color: var(--g-accent); }
#invest-view .wl-change-btn { color: var(--g-text2); }
#invest-view .wl-change-btn:hover { color: #fff; }
#invest-view .wl-manual-link { color: var(--g-accent); }
#invest-view .wl-picked { color: var(--g-text); }

/* ══════ BOTÕES (pill de vidro / CTAs) ══════ */
#invest-view .cards-cta {
    border-radius: 14px; font-family: 'Montserrat','Inter',sans-serif; font-weight: 700;
    letter-spacing: .03em; text-transform: uppercase; font-size: .74rem;
    box-shadow: 0 8px 22px rgba(0,0,0,.3); transition: all .25s cubic-bezier(.4,0,.2,1);
}
#invest-view .cards-cta:hover { transform: translateY(-2px); filter: brightness(1.08); }
#invest-view .cta-buy { background: linear-gradient(135deg, #12a56b, #16c784) !important; box-shadow: 0 8px 22px rgba(22,199,132,.28); }
#invest-view .cta-sell { background: linear-gradient(135deg, #e04a2a, #fb6340) !important; box-shadow: 0 8px 22px rgba(251,99,64,.28); }

/* ══════ FILTROS (período / categoria) ══════ */
#invest-view .inv-per {
    background: var(--g-panel); border: 1px solid var(--g-brd); color: var(--g-text2);
    border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; font-size: .68rem;
}
#invest-view .inv-per.on { background: linear-gradient(135deg, var(--g-accent2), var(--g-accent)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(41,197,246,.28); }
#invest-view .inv-catchip { border-radius: 999px; }

/* ══════ TABELAS ══════ */
#invest-view .purchases-table thead th { color: var(--g-text3); text-transform: uppercase; letter-spacing: .06em; font-size: .64rem; border-bottom: 1px solid var(--g-brd); }
#invest-view .purchases-table td { border-bottom: 1px solid rgba(255,255,255,.05); color: var(--g-text); }
#invest-view .purchases-table tbody tr:hover td { background: rgba(255,255,255,.03); }
#invest-view .wl-name { color: var(--g-text3); }
#invest-view .inv-cat-chip { background: rgba(255,255,255,.04); }
#invest-view .item-action-btn { background: rgba(255,255,255,.05); border: 1px solid var(--g-brd); color: var(--g-text2); border-radius: 10px; }
#invest-view .item-action-btn:hover { color: #fff; background: rgba(255,255,255,.12); }
#invest-view .tx-badge.buy { background: rgba(22,199,132,.16); color: var(--g-pos); }
#invest-view .tx-badge.sell { background: rgba(251,99,64,.16); color: var(--g-neg); }

/* Linha de ativo expansível + histórico */
#invest-view .hold-row:hover { background: rgba(41,197,246,.07); }
#invest-view .hold-chev { color: var(--g-accent); }
#invest-view .hold-detail > td { background: rgba(255,255,255,.02) !important; }
#invest-view .hold-hist-title { color: var(--g-text3); }

/* Alocação / legenda */
#invest-view .inv-leg-name { color: var(--g-text); }
#invest-view .inv-leg-pct { color: var(--g-text2); }
#invest-view .inv-leg-val { color: var(--g-text3); }
#invest-view .inv-empty2, #invest-view .cm-empty { color: var(--g-text3); }

/* ══════ Banner de rentabilidade ══════ */
#invest-view .inv-rent-banner { border-radius: 18px; backdrop-filter: blur(12px); }
#invest-view .inv-rent-banner .rb-label { color: var(--g-text3); }
#invest-view .inv-rent-banner.res-up { background: linear-gradient(135deg, rgba(22,199,132,.18), rgba(22,199,132,.03)); border-color: rgba(22,199,132,.45); }
#invest-view .inv-rent-banner.res-down { background: linear-gradient(135deg, rgba(251,99,64,.18), rgba(251,99,64,.03)); border-color: rgba(251,99,64,.45); }
#invest-view .inv-chart-note { color: var(--g-text3); }

/* ══════ Acordeão por categoria ══════ */
#invest-view .cat-acc-head-labels { color: var(--g-text3); }
#invest-view .cat-acc-item { background: rgba(255,255,255,.03); border: 1px solid var(--g-brd); border-radius: 14px; }
#invest-view .cat-acc-head { color: var(--g-text); }
#invest-view .cat-acc-head:hover { background: rgba(41,197,246,.07); }
#invest-view .cat-chev { color: var(--g-accent); }
#invest-view .cat-acc-body { border-top: 1px solid var(--g-brd); }
#invest-view .cat-sub { border-bottom: 1px dashed var(--g-brd); }
#invest-view .cat-sub-name { color: var(--g-text2); }

/* ══════ ESSÊNCIA: positivo verde, negativo laranja (reforço) ══════ */
#invest-view .wl-up, #invest-view .res-up-t { color: var(--g-pos) !important; }
#invest-view .wl-down, #invest-view .res-down-t { color: var(--g-neg) !important; }

/* ══════ Modal de movimentações ══════ */
#invest-tx-modal .modal-dialog {
    background: rgba(10, 16, 30, .92); backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--g-brd); border-radius: 20px; color: #eaf0fb;
}
