/* ============================================================
   Pense Mercado — CSS Principal
   Tema claro (default) + escuro via classe .tema-escuro no body
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ===== VARIÁVEIS — TEMA CLARO (default) ===== */
:root {
  --azul:       #41a1df;
  --azul-md:    #327ec0;
  --azul-dark:  #322d80;
  --laranja:    #eb9c27;
  --positivo:   #16a34a;
  --negativo:   #dc2626;
  --neutro:     #64748b;
  --radius:     10px;
  --fonte:      'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;

  /* Claro */
  --bg:         #f8fafc;
  --bg-card:    #ffffff;
  --bg-card-2:  #f1f5f9;
  --borda:      #e2e8f0;
  --texto:      #0f172a;
  --texto-sub:  #64748b;
  --navbar-bg:  rgba(255,255,255,.95);
  --shadow:     0 2px 16px rgba(0,0,0,.08);
  --ticker-bg:  #ffffff;
  --modal-bg-c: rgba(15,23,42,.5);
  --overlay-bg: rgba(248,250,252,0);
  --overlay-end:rgba(248,250,252,.96);
}

/* ===== VARIÁVEIS — TEMA ESCURO ===== */
body.tema-escuro {
  --bg:         #0e1117;
  --bg-card:    #161b26;
  --bg-card-2:  #1c2333;
  --borda:      #252d3d;
  --texto:      #e2e8f0;
  --texto-sub:  #8b97b3;
  --navbar-bg:  rgba(14,17,23,.92);
  --shadow:     0 4px 24px rgba(0,0,0,.35);
  --ticker-bg:  #161b26;
  --modal-bg-c: rgba(0,0,0,.7);
  --overlay-bg: rgba(14,17,23,0);
  --overlay-end:rgba(14,17,23,.95);
  --positivo:   #22c55e;
  --negativo:   #ef4444;
  --neutro:     #94a3b8;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--fonte);
  background: var(--bg);
  color: var(--texto);
  min-height: 100vh;
  line-height: 1.6;
  transition: background .2s, color .2s;
}

a { color: var(--azul); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

/* ===== LAYOUT ===== */
.wrapper { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borda);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
}
.navbar-row {
  width: 100%;
  padding: 0 20px;
  display: flex;
}
.navbar-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.navbar-row-1 {
  align-items: center;
  min-height: 60px;
}
.navbar-row-2 {
  align-items: center;
  min-height: 40px;
  background: var(--bg-card-2);
  border-top: 1px solid var(--borda);
}
.tema-escuro .navbar-row-2 {
  background: rgba(255,255,255,.025);
  border-top-color: rgba(255,255,255,.04);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--texto);
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand span { color: var(--laranja); }

/* ===== BUSCA COM AUTOCOMPLETE ===== */
.navbar-search {
  flex: 1;
  max-width: 460px;
  position: relative;
}
.navbar-search input {
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--borda);
  color: var(--texto);
  padding: 9px 14px 9px 38px;
  border-radius: 8px;
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
  font-family: var(--fonte);
}
.navbar-search input:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.navbar-search input::placeholder { color: var(--texto-sub); }
.navbar-search .icon-search {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--texto-sub);
  font-size: .85rem;
  pointer-events: none;
}

.busca-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
  max-height: 380px;
  overflow-y: auto;
  z-index: 200;
}
.busca-dropdown.aberto { display: block; }
.busca-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--texto);
  border-bottom: 1px solid var(--borda);
  transition: background .12s;
}
.busca-dropdown-item:last-child { border-bottom: none; }
.busca-dropdown-item:hover,
.busca-dropdown-item.destaque {
  background: var(--bg-card-2);
}
.busca-dropdown-item .bdi-ticker {
  font-weight: 700;
  font-size: .92rem;
  color: var(--azul);
  min-width: 70px;
  flex-shrink: 0;
}
.busca-dropdown-item .bdi-nome {
  font-size: .82rem;
  color: var(--texto-sub);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.busca-dropdown-item .bdi-tipo {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-card-2);
  color: var(--texto-sub);
  flex-shrink: 0;
}
.busca-dropdown-item.destaque .bdi-tipo,
.busca-dropdown-item:hover .bdi-tipo {
  background: var(--azul);
  color: #fff;
}
.busca-dropdown-empty {
  padding: 18px 14px;
  text-align: center;
  color: var(--texto-sub);
  font-size: .85rem;
}
.busca-dropdown-loading {
  padding: 12px 14px;
  text-align: center;
  color: var(--texto-sub);
  font-size: .8rem;
}

/* ===== NAV LINKS ===== */
.navbar-nav { display: flex; align-items: center; gap: 6px; }
.navbar-nav-primary { margin-left: auto; }
.navbar-nav-secondary {
  width: 100%;
  justify-content: flex-start;
  overflow: visible; /* visible permite que o dropdown escape do container */
  gap: 2px;
  flex-wrap: wrap; /* se sobrar item, vai pra próxima linha em vez de cortar */
  row-gap: 4px;
}
.navbar-nav a {
  color: var(--texto-sub);
  font-size: .87rem;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
  font-weight: 500;
}
.navbar-nav-primary a:hover, .navbar-nav-primary a.ativo {
  background: var(--bg-card-2);
  color: var(--texto);
}
.navbar-nav-secondary a {
  font-size: .82rem;
  padding: 6px 12px;
  font-weight: 600;
}
.navbar-nav-secondary a:hover, .navbar-nav-secondary a.ativo {
  background: var(--bg-card);
  color: var(--azul);
}
.nav-perfil { display: flex; align-items: center; gap: 6px; }

/* Ícone discreto antes de cada item de menu */
.nav-icone {
  display: inline-block;
  margin-right: 5px;
  font-size: .85em;
  vertical-align: -1px;
  opacity: .85;
}
@media (max-width: 768px) {
  /* No mobile (dentro do hamburger), ícones maiores e alinhados */
  .navbar-nav-primary .nav-icone {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    margin-right: 8px;
    opacity: 1;
  }
}

/* ===== LABEL DE GRUPO NA LINHA 2 ===== */
.navbar-group-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-sub);
  padding: 0 4px 0 0;
  white-space: nowrap;
}
.navbar-group-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--borda);
  margin: 0 8px;
  flex-shrink: 0;
}

/* ===== CONFIRMAÇÃO GLOBAL (pmConfirm) ===== */
#pm-confirm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
  animation: pm-confirm-fade .15s ease;
}
#pm-confirm[hidden] { display: none; }
.pm-confirm-box {
  background: var(--bg-card);
  border-radius: 14px;
  max-width: 380px;
  width: 100%;
  padding: 26px 24px 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: pm-confirm-scale .18s cubic-bezier(.34, 1.56, .64, 1);
}
.pm-confirm-icone {
  font-size: 2rem;
  margin-bottom: 6px;
  line-height: 1;
}
.pm-confirm-titulo {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--texto);
}
.pm-confirm-msg {
  font-size: .88rem;
  color: var(--texto-sub);
  line-height: 1.5;
  margin: 0 0 20px;
}
.pm-confirm-btns {
  display: flex;
  gap: 8px;
}
.pm-confirm-btns button {
  flex: 1;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.pm-confirm-cancel {
  background: var(--bg-card-2);
  color: var(--texto);
}
.pm-confirm-cancel:hover { background: var(--borda); }
.pm-confirm-ok {
  background: var(--azul);
  color: #fff;
}
.pm-confirm-ok:hover { background: var(--azul-dark); transform: translateY(-1px); }
/* Variação tipo=perigo (botão OK vermelho) */
#pm-confirm.tipo-perigo .pm-confirm-ok {
  background: #dc2626;
}
#pm-confirm.tipo-perigo .pm-confirm-ok:hover { background: #b91c1c; }
@keyframes pm-confirm-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pm-confirm-scale {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ===== LOADING OVERLAY GLOBAL =====
   Usado em qualquer página que precisa buscar dados pesados (cotações, fundamentos).
   Invocar via JS: window.pmLoading.mostrar('Título', 'Subtítulo')
   E ocultar com: window.pmLoading.ocultar() */
#pm-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 99999;
  animation: pm-loading-fade-in .2s ease;
}
.tema-escuro #pm-loading-overlay {
  background: rgba(14, 17, 23, 0.92);
}
#pm-loading-overlay[hidden] { display: none; }
.pm-loading-spinner { animation: spin 1s linear infinite; flex-shrink: 0; }
.pm-loading-titulo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--texto);
}
.pm-loading-sub {
  font-size: .82rem;
  color: var(--texto-sub);
  max-width: 360px;
  text-align: center;
  padding: 0 16px;
}
@keyframes pm-loading-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== DROPDOWN NA NAV LINHA 2 ===== */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  background: transparent;
  border: 0;
  color: var(--texto-sub);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-dropdown-trigger:hover,
.nav-dropdown.aberto .nav-dropdown-trigger {
  background: var(--bg-card-2);
  color: var(--texto);
}
.nav-dropdown-arrow {
  width: 12px;
  height: 8px;
  margin-left: 4px;
  color: var(--azul);
  flex-shrink: 0;
  transition: transform .2s ease;
}
.nav-dropdown.aberto .nav-dropdown-arrow,
.nav-dropdown:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 4px 8px rgba(0,0,0,.08);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 9999;
}
/* Pseudo-elemento invisível pra "preencher" o gap entre trigger e menu —
   evita que o hover saia quando o mouse passa pelo espaço de 6px. */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
/* O .nav-dropdown precisa ter z-index pra "ganhar" do ticker bar
   que cria stacking context via transform. */
.nav-dropdown.aberto,
.nav-dropdown:hover {
  position: relative;
  z-index: 9999;
}
.nav-dropdown.aberto .nav-dropdown-menu {
  display: flex;
  animation: dropdown-fade-in .15s ease;
}
/* Hover só em devices com mouse (desktop) — mobile mantém click */
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown-menu {
    display: flex;
    animation: dropdown-fade-in .15s ease;
  }
  .nav-dropdown:hover .nav-dropdown-trigger {
    background: var(--bg-card-2);
    color: var(--texto);
  }
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--texto);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-dropdown-menu a:hover {
  background: var(--bg-card-2);
  color: var(--azul);
}
@keyframes dropdown-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== STATUS DE MERCADOS (B3 + NYSE) ===== */
.mercados-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: 12px;
  flex-shrink: 0;
}
.mercado-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--borda);
  background: var(--bg-card);
  transition: transform .15s;
  cursor: default;
}
.mercado-status:hover {
  transform: translateY(-1px);
}
.mercado-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.mercado-aberto {
  color: #0f9d4c;
  border-color: rgba(34, 197, 94, .35);
  background: rgba(34, 197, 94, .08);
}
.mercado-aberto .mercado-dot {
  background: #22c55e;
  box-shadow:
    0 0 4px #22c55e,
    0 0 10px rgba(34, 197, 94, .8),
    0 0 16px rgba(34, 197, 94, .4);
  animation: mercado-pulse 1.6s ease-in-out infinite;
}
.mercado-fechado {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, .3);
  background: rgba(220, 38, 38, .06);
}
.mercado-fechado .mercado-dot {
  background: #dc2626;
  box-shadow: 0 0 2px rgba(220, 38, 38, .6);
}
@keyframes mercado-pulse {
  0%, 100% {
    box-shadow:
      0 0 4px #22c55e,
      0 0 10px rgba(34, 197, 94, .8),
      0 0 16px rgba(34, 197, 94, .4);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 6px #22c55e,
      0 0 14px rgba(34, 197, 94, .95),
      0 0 22px rgba(34, 197, 94, .55);
    transform: scale(1.15);
  }
}
/* Tema escuro */
.tema-escuro .mercado-aberto {
  color: #4ade80;
  background: rgba(34, 197, 94, .12);
}
.tema-escuro .mercado-fechado {
  color: #f87171;
  background: rgba(220, 38, 38, .1);
}

/* ===== SINO DE NOTIFICAÇÕES ===== */
.notif-wrap { position: relative; display: inline-flex; align-items: center; }
.notif-btn {
  background: var(--bg-card-2);
  border: 1px solid var(--borda);
  color: var(--texto-sub);
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s, color .2s;
  flex-shrink: 0;
}
.notif-btn:hover { border-color: var(--azul); background: var(--bg-card); color: var(--texto); }
.notif-btn.tem-nao-lidas { color: var(--azul); }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--negativo);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--navbar-bg);
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 30px);
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  z-index: 250;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--borda);
}
.notif-header strong { font-size: .95rem; font-weight: 700; }
.notif-marcar-todas {
  background: none; border: none; cursor: pointer;
  font-size: .72rem; font-weight: 600; color: var(--azul);
  padding: 4px 6px; border-radius: 4px;
}
.notif-marcar-todas:hover { background: var(--bg-card-2); }
.notif-lista { flex: 1; overflow-y: auto; max-height: 360px; }
.notif-item {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--borda);
  text-decoration: none;
  color: var(--texto);
  transition: background .12s;
  cursor: pointer;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-card-2); }
.notif-item.nao-lida { background: rgba(65, 161, 223, .06); }
.notif-item.nao-lida::before {
  content: "";
  position: absolute;
  left: 6px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--azul);
}
.notif-item .ni-icone {
  font-size: 1.1rem; flex-shrink: 0;
  margin-top: 1px;
}
.notif-item .ni-corpo { flex: 1; min-width: 0; }
.notif-item .ni-titulo {
  font-size: .85rem; font-weight: 600;
  line-height: 1.35;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notif-item .ni-msg {
  font-size: .78rem; color: var(--texto-sub);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notif-item .ni-tempo {
  font-size: .7rem; color: var(--texto-sub);
  margin-top: 4px;
}
.notif-vazio {
  padding: 28px 16px;
  text-align: center;
  color: var(--texto-sub);
  font-size: .85rem;
}
.notif-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--borda);
  text-align: center;
}
.notif-footer a { font-size: .8rem; color: var(--azul); }

@media (max-width: 480px) {
  .notif-dropdown { right: -20px; width: calc(100vw - 20px); }
}

/* ===== COOKIE CONSENT (LGPD) ===== */
/* CRÍTICO: garante que [hidden] funcione mesmo quando display:flex é aplicado */
[hidden] { display: none !important; }

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--borda);
  box-shadow: 0 -4px 20px rgba(0,0,0,.10);
  padding: 14px 20px;
  z-index: 9000;
  transform: translateY(110%);
  transition: transform .3s ease-out;
}
.cookie-banner.aberto { transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.cookie-banner-text {
  flex: 1;
  min-width: 280px;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--texto-sub);
}
.cookie-banner-text strong {
  display: block;
  color: var(--texto);
  font-size: .9rem;
  margin-bottom: 2px;
}
.cookie-banner-text a {
  color: var(--azul);
  font-weight: 500;
  text-decoration: underline;
}
.cookie-banner-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cookie-btn {
  font-family: var(--fonte);
  font-size: .82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--borda);
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.cookie-btn-outline {
  background: transparent;
  color: var(--texto);
}
.cookie-btn-outline:hover {
  background: var(--bg-card-2);
  border-color: var(--azul);
}
.cookie-btn-primary {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
}
.cookie-btn-primary:hover {
  background: var(--azul-md);
  border-color: var(--azul-md);
}

/* ===== MODAL DE PREFERÊNCIAS ===== */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s;
}
.cookie-modal.aberto { opacity: 1; }
.cookie-modal-bg {
  position: absolute;
  inset: 0;
  background: var(--modal-bg-c);
}
.cookie-modal-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  transform: translateY(10px);
  transition: transform .2s;
}
.cookie-modal.aberto .cookie-modal-box { transform: translateY(0); }
.cookie-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--borda);
}
.cookie-modal-header h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.cookie-modal-fechar {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--texto-sub);
  padding: 4px 8px; border-radius: 6px;
}
.cookie-modal-fechar:hover { background: var(--bg-card-2); }
.cookie-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}
.cookie-modal-desc {
  font-size: .85rem;
  color: var(--texto-sub);
  line-height: 1.55;
  margin: 0 0 18px;
}
.cookie-cat {
  background: var(--bg-card-2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.cookie-cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 6px;
}
.cookie-cat-head input[type="checkbox"] {
  width: 18px; height: 18px;
  cursor: pointer;
  accent-color: var(--azul);
}
.cookie-cat-head input:disabled { cursor: not-allowed; opacity: .7; }
.cookie-cat-head strong { font-size: .92rem; }
.cookie-cat-tag {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--positivo);
  color: #fff;
}
.cookie-cat p {
  font-size: .8rem;
  color: var(--texto-sub);
  line-height: 1.5;
  margin: 4px 0 0 30px;
}
.cookie-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--borda);
  background: var(--bg-card-2);
}

@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-acoes { justify-content: stretch; }
  .cookie-banner-acoes .cookie-btn { flex: 1; }
}

/* ============================================================
   PENSE E COMPARTILHE — Feed social
   ============================================================ */

/* Container do feed */
.feed-wrap { max-width: 640px; margin: 0 auto; }
.feed-header { padding: 16px 0 12px; border-bottom: 1px solid var(--borda); margin-bottom: 0; }
.feed-header h1 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.feed-header p { font-size: .82rem; color: var(--texto-sub); margin: 4px 0 0; }

/* Compose box (criar post) */
.compose-box {
  background: var(--bg-card);
  border-bottom: 1px solid var(--borda);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
}
.compose-box .compose-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--borda);
}
.compose-box .compose-corpo { flex: 1; min-width: 0; }
.compose-textarea {
  width: 100%;
  min-height: 60px;
  border: none;
  background: transparent;
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 1.05rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  padding: 6px 0;
}
.compose-textarea::placeholder { color: var(--texto-sub); }
.compose-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--borda);
  gap: 10px;
}
.compose-contador {
  font-size: .8rem;
  color: var(--texto-sub);
  font-variant-numeric: tabular-nums;
}
.compose-contador.warn { color: var(--laranja); }
.compose-contador.over { color: var(--negativo); font-weight: 700; }
.compose-postar {
  background: var(--azul);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.compose-postar:hover { background: var(--azul-md); }
.compose-postar:disabled { opacity: .5; cursor: not-allowed; }
.compose-feedback {
  font-size: .78rem;
  color: var(--texto-sub);
  margin-top: 6px;
}
.compose-feedback.erro { color: var(--negativo); }

/* Card de post */
.post-card {
  background: var(--bg-card);
  border-bottom: 1px solid var(--borda);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.post-card:hover { background: var(--bg-card-2); }
.post-card .post-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--borda);
}
.post-card .post-corpo { flex: 1; min-width: 0; }
.post-header {
  display: flex; align-items: baseline; gap: 6px;
  flex-wrap: wrap;
  font-size: .9rem;
}
.post-header .nome { font-weight: 700; color: var(--texto); }
.post-header .nome:hover { text-decoration: underline; }
.post-header .username { color: var(--texto-sub); font-size: .85rem; }
.post-header .sep { color: var(--texto-sub); }
.post-header .tempo { color: var(--texto-sub); font-size: .85rem; }
.post-header .badge-plano { font-size: .58rem; padding: 1px 6px; }

.post-conteudo {
  margin-top: 4px;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--texto);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.post-conteudo a { color: var(--azul); }

/* Card de URL preview */
.post-url {
  display: block;
  margin-top: 10px;
  border: 1px solid var(--borda);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: background .12s, border-color .12s;
}
.post-url:hover { background: var(--bg-card-2); border-color: var(--azul); }
.post-url img {
  width: 100%; height: 180px; object-fit: cover;
  display: block;
  background: var(--bg-card-2);
}
.post-url .pu-body { padding: 10px 14px; }
.post-url .pu-dominio { font-size: .72rem; color: var(--texto-sub); text-transform: lowercase; }
.post-url .pu-titulo { font-size: .9rem; font-weight: 600; margin-top: 2px; line-height: 1.35; }
.post-url .pu-desc {
  font-size: .8rem; color: var(--texto-sub); margin-top: 4px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.post-url .pu-warn {
  margin-top: 6px; padding: 4px 8px; border-radius: 4px;
  font-size: .72rem; font-weight: 700;
  background: rgba(234, 88, 12, .12); color: var(--laranja);
  display: inline-block;
}

/* Quote do post original (no caso de repost) */
.post-quote {
  margin-top: 10px;
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--bg-card-2);
}
.post-quote .pq-header { display: flex; gap: 6px; align-items: center; font-size: .82rem; }
.post-quote .pq-header img { width: 22px; height: 22px; border-radius: 50%; }
.post-quote .pq-header .nome { font-weight: 700; }
.post-quote .pq-header .username { color: var(--texto-sub); }
.post-quote .pq-conteudo { font-size: .88rem; margin-top: 4px; color: var(--texto); }
.post-repost-label {
  font-size: .78rem; color: var(--texto-sub);
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}

/* Actions (curtir / comentar / repostar / compartilhar) */
.post-actions {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  max-width: 380px;
  justify-content: space-between;
}
.post-action {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--texto-sub);
  font-size: .82rem;
  transition: background .12s, color .12s;
  font-family: var(--fonte);
}
.post-action svg { width: 16px; height: 16px; }
.post-action:hover { background: rgba(65, 161, 223, .1); color: var(--azul); }
.post-action.curtir.ativo { color: #ef4444; }
.post-action.curtir.ativo:hover { background: rgba(239, 68, 68, .1); }
.post-action.repostar.ativo { color: var(--positivo); }
.post-action.repostar:hover { background: rgba(22, 163, 74, .1); color: var(--positivo); }
.post-action .pa-num { font-variant-numeric: tabular-nums; }

/* Menu de opções (deletar) */
.post-menu-btn {
  position: absolute;
  top: 14px; right: 14px;
  background: none; border: none;
  cursor: pointer; padding: 4px 8px;
  color: var(--texto-sub);
  border-radius: 50%;
  font-size: 1rem; line-height: 1;
}
.post-menu-btn:hover { background: var(--bg-card-2); color: var(--texto); }

/* Sidebar widget na home */
.pec-widget {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 12px;
  overflow: hidden;
}
.pec-widget-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; justify-content: space-between;
}
.pec-widget-header h3 { font-size: .95rem; font-weight: 800; margin: 0; }
.pec-widget-header .pec-ver-todos { font-size: .75rem; color: var(--azul); text-decoration: none; }
.pec-widget-lista .post-card { padding: 10px 14px; }
.pec-widget-lista .post-card .post-avatar { width: 36px; height: 36px; }
.pec-widget-lista .post-conteudo { font-size: .85rem; }
.pec-widget-lista .post-actions { display: none; }
.pec-widget-cta {
  padding: 12px 16px;
  text-align: center;
  font-size: .82rem;
  border-top: 1px solid var(--borda);
  background: var(--bg-card-2);
}
.pec-widget-cta a { color: var(--azul); font-weight: 600; }

/* Perfil de usuário */
.perfil-pec-header {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.perfil-pec-header .ph-top { display: flex; gap: 16px; align-items: flex-start; }
.perfil-pec-header .ph-foto {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--borda);
}
.perfil-pec-header h1 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.perfil-pec-header .ph-username { font-size: .9rem; color: var(--texto-sub); }
.perfil-pec-header .ph-bio { margin-top: 10px; font-size: .9rem; line-height: 1.5; color: var(--texto); }
.perfil-pec-header .ph-meta { margin-top: 10px; font-size: .82rem; color: var(--texto-sub); display: flex; gap: 16px; flex-wrap: wrap; }

/* Empty state */
.feed-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--texto-sub);
}
.feed-empty .icon { font-size: 2.5rem; margin-bottom: 10px; }

/* Responsive */
@media (max-width: 768px) {
  .feed-wrap { max-width: 100%; }
  .compose-box, .post-card { padding: 12px 14px; }
  .post-url img { height: 140px; }
}

/* Contador de caracteres (genérico para forms) */
.char-counter {
  font-size: .72rem;
  color: var(--texto-sub);
  text-align: right;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.char-counter.warn { color: var(--laranja); }
.char-counter.over { color: var(--negativo); font-weight: 700; }

/* Toast (snack-bar) reutilizável */
.pm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 100px);
  background: #0f172a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 9500;
  opacity: 0;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s;
  pointer-events: none;
}
.pm-toast.visivel {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Abas do feed (Para você | Seguindo | Novidades) */
.feed-tabs {
  display: flex;
  border-bottom: 1px solid var(--borda);
  background: var(--bg-card);
  position: sticky;
  top: 100px;
  z-index: 10;
}
.feed-tab {
  flex: 1;
  padding: 14px 12px;
  text-align: center;
  font-size: .88rem;
  font-weight: 600;
  color: var(--texto-sub);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.feed-tab:hover { background: var(--bg-card-2); color: var(--texto); }
.feed-tab.ativa { color: var(--azul); border-bottom-color: var(--azul); }

/* Botão seguir */
.btn-seguir { min-width: 100px; transition: all .15s; }
.btn-seguir[data-seguindo="1"]:hover {
  background: rgba(220, 38, 38, .1);
  color: var(--negativo);
  border-color: var(--negativo);
}
.btn-seguir[data-seguindo="1"]:hover::after { content: " ✕"; }

/* Grid da home com sidebar Pense e Compartilhe */
.home-grid {
  /* Antes era 2 colunas com sidebar de 320px. Agora P&C foi pro topo,
     então o grid colapsa pra uma coluna única ocupando toda a largura. */
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: flex-start;
}
.home-main { min-width: 0; }
/* .home-side mantido pra compat caso alguma página antiga ainda use */
.home-side:empty { display: none; }

/* ===== TOGGLE TEMA ===== */
.btn-tema {
  background: var(--bg-card-2);
  border: 1px solid var(--borda);
  color: var(--texto-sub);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-tema:hover { border-color: var(--azul); background: var(--bg-card); }

/* Tooltip do botão de tema */
.btn-tema::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  right: 0;
  background: var(--texto);
  color: var(--bg-card);
  font-size: .7rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 200;
}
/* Setinha do tooltip */
.btn-tema::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  right: 10px;
  border: 5px solid transparent;
  border-top-color: var(--texto);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 200;
}
.btn-tema:hover::after,
.btn-tema:hover::before { opacity: 1; }

/* Badge plano */
.badge-plano {
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-plano.gratuito { background: var(--bg-card-2); color: var(--texto-sub); border: 1px solid var(--borda); }
.badge-plano.premium  { background: linear-gradient(135deg, var(--laranja), #f59e0b); color: #000; }
.badge-plano.ultra {
  background: linear-gradient(135deg, #41a1df 0%, #322d80 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(50, 45, 128, .3);
}

/* ===== TICKER BAR ===== */
.ticker-bar {
  background: var(--ticker-bg);
  border-bottom: 1px solid var(--borda);
  padding: 8px 20px;
  overflow: hidden;
}
.ticker-bar-inner {
  display: flex;
  gap: 28px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .ticker-bar-inner { animation-duration: 19s; gap: 20px; }
}
@media (max-width: 480px) {
  .ticker-bar-inner { animation-duration: 16s; }
}
.ticker-bar-inner:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
}
.ticker-item .symbol { font-weight: 600; color: var(--texto); }
.ticker-item .price  { color: var(--texto-sub); }
.ticker-item .var    { font-weight: 600; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--borda);
  margin-bottom: 28px;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-header p  { color: var(--texto-sub); margin-top: 4px; font-size: .92rem; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-sub);
  margin-bottom: 8px;
  font-weight: 600;
}
.card-valor { font-size: 1.4rem; font-weight: 700; color: var(--texto); }

/* ===== GRID DE ATIVOS ===== */
.ativos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.ativo-card {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow);
}
.ativo-card:hover {
  border-color: var(--azul);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(65,161,223,.15);
  opacity: 1;
}
.ativo-card .ticker   { font-size: .85rem; font-weight: 700; color: var(--azul); }
.ativo-card .nome     { font-size: .78rem; color: var(--texto-sub); margin: 2px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ativo-card .preco    { font-size: 1.3rem; font-weight: 700; color: var(--texto); }
.ativo-card .variacao { font-size: .82rem; font-weight: 600; margin-top: 3px; }

/* ===== VARIAÇÃO CORES ===== */
.positivo { color: var(--positivo) !important; }
.negativo { color: var(--negativo) !important; }
.neutro   { color: var(--neutro) !important; }

/* ===== INDICADORES ===== */
.indicadores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.indicador-item {
  background: var(--bg-card-2);
  border: 1px solid var(--borda);
  border-radius: 8px;
  padding: 14px;
}
.indicador-item .label { font-size: .73rem; color: var(--texto-sub); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.indicador-item .valor { font-size: 1.05rem; font-weight: 700; color: var(--texto); }
.indicador-item .desc  { font-size: .72rem; color: var(--texto-sub); margin-top: 3px; }

/* ===== BLOQUEIO PREMIUM ===== */
.premium-lock { position: relative; overflow: hidden; border-radius: var(--radius); }
.premium-lock-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--overlay-bg) 0%, var(--overlay-end) 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  text-align: center;
}
.premium-lock-overlay .lock-icon { font-size: 2rem; margin-bottom: 8px; }
.premium-lock-overlay p { font-size: .88rem; color: var(--texto-sub); margin-bottom: 12px; }

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
  text-decoration: none;
  font-family: var(--fonte);
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary { background: var(--azul); color: #fff; }
.btn-laranja { background: var(--laranja); color: #000; }
.btn-outline { background: transparent; border: 1px solid var(--borda); color: var(--texto); }
.btn-outline:hover { border-color: var(--azul); opacity: 1; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-bloco { display: flex; width: 100%; justify-content: center; }

/* ===== FORMULÁRIOS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; color: var(--texto-sub); margin-bottom: 6px; font-weight: 500; }
.form-control {
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--borda);
  color: var(--texto);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .9rem;
  font-family: var(--fonte);
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--azul); }

/* ===== ALERTAS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 16px;
  border-left: 3px solid;
}
.alert-erro  { background: rgba(220,38,38,.08);  border-color: var(--negativo); color: var(--negativo); }
.alert-ok    { background: rgba(22,163,74,.08);   border-color: var(--positivo); color: var(--positivo); }
.alert-info  { background: rgba(65,161,223,.08);  border-color: var(--azul);     color: var(--azul-md); }
.alert-aviso { background: rgba(235,156,39,.08);  border-color: var(--laranja);  color: var(--laranja); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 16px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--texto-sub);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  font-family: var(--fonte);
}
.tab-btn.ativo { color: var(--azul); border-bottom-color: var(--azul); }
.tab-painel { display: none; }
.tab-painel.ativo { display: block; }

/* ===== SECTION TITLE ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--borda);
  color: var(--texto);
}
.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 18px;
  background: var(--azul);
  border-radius: 2px;
}

/* ===== SCORE BADGE ===== */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
  border: 3px solid;
}
.score-alto  { border-color: var(--positivo); color: var(--positivo); }
.score-medio { border-color: var(--laranja);  color: var(--laranja);  }
.score-baixo { border-color: var(--negativo); color: var(--negativo); }

/* ===== FOOTER ===== */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--borda);
  padding: 28px 20px;
  text-align: center;
  font-size: .8rem;
  color: var(--texto-sub);
}
.footer a { color: var(--azul); }
.footer .disclaimer { margin-top: 8px; font-size: .72rem; max-width: 700px; margin-left: auto; margin-right: auto; }

/* ===== MODAL ===== */
.modal-bg {
  position: fixed;
  inset: 0;
  background: var(--modal-bg-c);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.aberto { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow);
}
.modal-fechar {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--texto-sub);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ===== LOADING ===== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--borda);
  border-top-color: var(--azul);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== GRAFICO PLACEHOLDER ===== */
.grafico-placeholder {
  background: var(--bg-card-2);
  border: 1px solid var(--borda);
  border-radius: 8px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--texto-sub);
  font-size: .85rem;
  gap: 8px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  .ativos-grid { grid-template-columns: repeat(2, 1fr); }
  .indicadores-grid { grid-template-columns: repeat(2, 1fr); }
  .page-header h1 { font-size: 1.3rem; }
  /* .btn-tema span removido — botão só tem ícone */
}
@media (max-width: 480px) {
  .ativos-grid { grid-template-columns: 1fr; }
  .indicadores-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== NAVBAR HAMBURGER MOBILE ===== */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--borda);
  border-radius: 6px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.navbar-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--texto);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.navbar-hamburger.aberto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-hamburger.aberto span:nth-child(2) { opacity: 0; }
.navbar-hamburger.aberto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Items que só aparecem no menu mobile (replicam a linha 2 dentro do hamburger) */
.nav-mobile-only { display: none; }

@media (max-width: 768px) {
  .navbar-hamburger { display: flex; }
  .navbar-row-1 .navbar-inner { gap: 10px; }
  .navbar-search { max-width: none; }
  .navbar-search input { padding: 8px 12px 8px 34px; font-size: .85rem; }
  .navbar-search .icon-search { left: 10px; font-size: .8rem; }

  /* Mobile: esconde a linha 2 inteira — itens vão pro hamburger */
  .navbar-row-2 { display: none; }

  /* Nav primária = menu hamburger inteiro com TUDO organizado */
  .navbar-nav-primary {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--borda);
    flex-direction: column;
    padding: 8px 0 16px;
    gap: 0;
    z-index: 99;
    box-shadow: var(--shadow);
    margin-left: 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .navbar-nav-primary.aberto { display: flex; align-items: stretch; }

  /* Items dentro do hamburger */
  .navbar-nav-primary a,
  .navbar-nav-primary .nav-perfil {
    padding: 12px 20px;
    border-radius: 0;
    font-size: .95rem;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--borda);
  }
  .navbar-nav-primary a:hover { background: var(--bg-card-2); }

  /* Labels de grupo dentro do hamburger */
  .nav-mobile-only { display: flex; }
  .nav-mobile-mercados {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
  }
  .nav-mobile-group-label {
    display: block;
    padding: 14px 20px 8px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--texto-sub);
    background: var(--bg-card-2);
    border-bottom: 1px solid var(--borda);
  }

  /* Botões dentro do hamburger ocupam linha inteira */
  .navbar-nav-primary .btn,
  .navbar-nav-primary .btn-tema {
    width: calc(100% - 32px);
    margin: 8px 16px 0;
    justify-content: center;
  }
  .navbar-nav-primary .btn-tema { padding: 10px; font-size: 1.05rem; }

  /* Sino de notificações: posiciona inline com flex */
  .navbar-nav-primary .notif-wrap {
    padding: 12px 20px;
    border-bottom: 1px solid var(--borda);
    display: flex;
    align-items: center;
    width: 100%;
  }
  .navbar-nav-primary .notif-btn::after {
    content: "Notificações";
    margin-left: 12px;
    font-size: .95rem;
    color: var(--texto);
    font-weight: 500;
  }
  .navbar-nav-primary .notif-dropdown { position: fixed; }
}

/* ===== TABELA ESTILO FUNDAMENTUS ===== */
.fund-tabela-wrapper {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.fund-bloco {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  overflow: hidden;
}
.fund-bloco-titulo {
  background: var(--azul);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 7px 12px;
}
.fund-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.fund-table tr {
  border-bottom: 1px solid var(--borda);
  transition: background .15s;
}
.fund-table tr:last-child { border-bottom: none; }
.fund-table tr:hover { background: var(--bg-card-2); }
.fund-table td {
  padding: 7px 12px;
  color: var(--texto);
}
.fund-table td:first-child {
  color: var(--texto-sub);
  font-size: .78rem;
  width: 55%;
}
.fund-table td:last-child {
  font-weight: 600;
  text-align: right;
}

@media (max-width: 768px) {
  .fund-bloco { min-width: calc(50% - 6px); }
}
@media (max-width: 480px) {
  .fund-bloco { min-width: 100%; }
}

/* ============================================================
   LISTA DE ATIVOS (/acoes, /acoes-usa, /fiis…)
   ============================================================ */
.lista-filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.lista-info {
  font-size: .78rem;
  color: var(--texto-sub);
  margin-left: auto;
}
.lista-info-lazy {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--texto-sub);
  margin: 12px 0;
}
.lista-info-lazy strong { color: var(--texto); }

.tabela-ativos {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.tabela-ativos thead tr {
  border-bottom: 2px solid var(--borda);
}
.tabela-ativos th {
  padding: 10px 12px;
  color: var(--texto-sub);
  font-weight: 600;
  white-space: nowrap;
}
.tabela-ativos tbody tr {
  border-bottom: 1px solid var(--borda);
  transition: background .15s;
}
.tabela-ativos tbody tr:hover {
  background: var(--bg-card-2);
}
.tabela-ativos td {
  padding: 10px 12px;
}
.tabela-ativos tr.sem-cotacao {
  opacity: .72;
}
.tabela-ativos tr.sem-cotacao td[data-preco-slot],
.tabela-ativos tr.sem-cotacao td[data-var-slot] {
  color: var(--texto-sub);
}
.tabela-ativos tr.atualizado-flash {
  animation: flash-bg .9s ease;
}
@keyframes flash-bg {
  0%   { background: rgba(34, 197, 94, .25); }
  100% { background: transparent; }
}

.lista-logo {
  width: 24px; height: 24px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--bg-card-2);
  padding: 2px;
  flex-shrink: 0;
}
.lista-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--texto-sub);
  font-weight: 700;
  font-size: .9rem;
}
.lista-ticker {
  color: var(--texto);
  font-weight: 700;
}
.lista-nome {
  font-size: .75rem;
  color: var(--texto-sub);
}

/* ===== Headers sortable ===== */
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--texto-sub);
  text-decoration: none;
  transition: color .15s;
}
.sort-link:hover { color: var(--azul); }
.sort-link.sort-ativo {
  color: var(--azul);
  font-weight: 700;
}

/* ===== Paginação ===== */
.paginacao {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 24px 0 16px;
  flex-wrap: wrap;
}
.pag-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--borda);
  background: var(--bg-card);
  color: var(--texto);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.pag-btn:hover {
  background: var(--azul);
  color: #fff;
  border-color: var(--azul);
  transform: translateY(-1px);
}
.pag-atual {
  padding: 7px 13px;
  font-size: .82rem;
  color: var(--texto-sub);
  font-weight: 600;
}

/* ===== Spinner mini ===== */
.spinner-mini {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--borda);
  border-top-color: var(--azul);
  border-radius: 50%;
  animation: spin-mini .7s linear infinite;
}
@keyframes spin-mini {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .lista-filtros { flex-direction: column; align-items: stretch; }
  .lista-info { margin-left: 0; }
  .tabela-ativos { font-size: .8rem; }
  .tabela-ativos th, .tabela-ativos td { padding: 8px 6px; }
  .lista-nome { display: none; }
}

/* ============================================================
   LOCK BANNER — paywall compacto inline (não ocupa scroll)
   ============================================================ */
.lock-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(235, 156, 39, .08), rgba(235, 156, 39, .03));
  border: 1px solid rgba(235, 156, 39, .35);
  border-radius: 10px;
  text-decoration: none;
  color: var(--texto);
  margin-bottom: 32px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.lock-banner:hover {
  transform: translateY(-1px);
  border-color: var(--laranja);
  box-shadow: 0 3px 10px rgba(235, 156, 39, .15);
}
.lock-banner-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.lock-banner-txt {
  flex: 1;
  font-size: .88rem;
  line-height: 1.4;
  color: var(--texto);
}
.lock-banner-txt strong {
  color: var(--laranja);
  font-weight: 700;
}
.lock-banner-extra {
  display: block;
  font-size: .72rem;
  color: var(--texto-sub);
  margin-top: 2px;
}
.lock-banner-cta {
  font-size: 1.4rem;
  color: var(--laranja);
  font-weight: 700;
  flex-shrink: 0;
  transition: transform .15s;
}
.lock-banner:hover .lock-banner-cta { transform: translateX(3px); }

@media (max-width: 600px) {
  .lock-banner { padding: 10px 12px; gap: 10px; margin-bottom: 20px; }
  .lock-banner-txt { font-size: .82rem; }
  .lock-banner-icon { font-size: 1.2rem; }
}

/* ============================================================
   HOME — topo com ThinkAI + PEC lado a lado (com toggle)
   ============================================================ */
.home-topo { margin-bottom: 28px; }
.home-topo-toggle-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.home-topo-toggle {
  background: transparent;
  border: 1px solid var(--borda);
  color: var(--texto-sub);
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.home-topo-toggle:hover { background: var(--bg-card-2); color: var(--texto); border-color: var(--azul); }
.home-topo-chev { transition: transform .2s; }
.home-topo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.home-topo-col { min-width: 0; }
.home-topo-col .chat-ia-wrapper,
.home-topo-col .pec-widget { margin-bottom: 0; height: 100%; display: flex; flex-direction: column; }
.home-topo-col .pec-widget.pec-widget-scroll .pec-widget-lista {
  max-height: 480px;
  overflow-y: auto;
}
.home-topo-col .chat-ia-mensagens { max-height: 360px; }

@media (max-width: 900px) {
  .home-topo-grid { grid-template-columns: 1fr; }
  .home-topo-col .chat-ia-mensagens { max-height: 280px; }
  .home-topo-col .pec-widget.pec-widget-scroll .pec-widget-lista { max-height: 380px; }
}

/* ============================================================
   THINKAI — layout estilo ChatGPT
   ============================================================ */
.thinkai-app {
  display: flex;
  height: calc(100vh - 130px); /* header navbar + ticker bar */
  margin: -28px -20px -40px; /* anula padding do wrapper */
  background: var(--bg-card);
  border-top: 1px solid var(--borda);
}
.thinkai-sidebar {
  width: 60px;
  background: var(--bg-card-2);
  border-right: 1px solid var(--borda);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
}
.ti-side-btn {
  background: transparent;
  border: 0;
  width: 38px; height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--texto-sub);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ti-side-btn:hover { background: var(--bg-card); color: var(--texto); }
.ti-side-novo { color: var(--azul); }

/* Slide panel das conversas */
.ti-side-panel {
  position: absolute;
  top: 0; left: 60px;
  width: 280px;
  height: 100%;
  background: var(--bg-card);
  border-right: 1px solid var(--borda);
  box-shadow: 4px 0 12px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.ti-side-panel[hidden] { display: none; }
.ti-side-panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--borda);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
}
.ti-side-fechar {
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--texto-sub);
  cursor: pointer;
  padding: 0 4px;
}
.ti-side-panel-body { flex: 1; overflow-y: auto; padding: 8px; }
.ti-side-vazio {
  padding: 32px 16px;
  text-align: center;
  color: var(--texto-sub);
  font-size: .8rem;
}
.ti-side-conv-wrap {
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background .15s;
}
.ti-side-conv-wrap:hover, .ti-side-conv-wrap.ativa { background: var(--bg-card-2); }
.ti-side-conv {
  flex: 1;
  display: block;
  padding: 10px 8px 10px 12px;
  text-decoration: none;
  color: var(--texto);
  min-width: 0;
}
.ti-side-conv-del {
  background: transparent;
  border: 0;
  width: 32px;
  color: var(--texto-sub);
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s, color .15s, background .15s;
  flex-shrink: 0;
}
.ti-side-conv-wrap:hover .ti-side-conv-del,
.ti-side-conv-wrap.ativa .ti-side-conv-del { opacity: 1; }
.ti-side-conv-del:hover { color: #dc2626; background: rgba(220, 38, 38, .08); }
.ti-side-conv-titulo {
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ti-side-conv-data {
  font-size: .68rem;
  color: var(--texto-sub);
  margin-top: 2px;
}

/* Área principal */
.thinkai-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.thinkai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--borda);
  flex-shrink: 0;
}
.ti-head-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
}
.ti-head-titulo strong {
  background: linear-gradient(135deg, #41a1df 0%, #322d80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.ti-logo {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 4px rgba(65, 161, 223, .3));
}
.ti-modelo {
  font-size: .65rem;
  background: var(--bg-card-2);
  color: var(--texto-sub);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--borda);
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: help;
}
.ti-head-acoes {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--texto-sub);
}
.ti-upgrade-link {
  background: linear-gradient(135deg, #41a1df 0%, #322d80 100%);
  color: #fff;
  padding: 5px 12px;
  border-radius: 14px;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 700;
  transition: transform .15s;
}
.ti-upgrade-link:hover { transform: translateY(-1px); }

/* Área de chat / boas-vindas */
.thinkai-chat {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.ti-welcome {
  margin: auto;
  width: 100%;
  max-width: 720px;
  padding: 32px 24px;
  text-align: center;
}
.ti-welcome-titulo {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--texto);
  margin: 0 0 30px;
  line-height: 1.3;
}

/* Input — central (boas-vindas) */
.ti-input-wrap {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 28px;
  padding: 8px 8px 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
  transition: box-shadow .15s, border-color .15s;
}
.ti-input-wrap:focus-within {
  border-color: var(--azul);
  box-shadow: 0 4px 24px rgba(65, 161, 223, .15);
}
.ti-input-centro { margin: 0 auto; }
.ti-input-rodape {
  margin: 16px 24px;
  max-width: none;
}
.ti-input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--texto);
  font-size: 1rem;
  padding: 10px 4px;
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 200px;
}
.ti-input::placeholder { color: var(--texto-sub); }
.ti-input-anexo, .ti-input-enviar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.ti-input-anexo {
  background: transparent;
  color: var(--texto-sub);
  font-size: 1.4rem;
  font-weight: 300;
}
.ti-input-anexo:hover { background: var(--bg-card-2); }
.ti-input-anexo:disabled { opacity: .4; cursor: not-allowed; }
.ti-input-enviar {
  background: #1a1a1a;
  color: #fff;
}
.ti-input-enviar:hover { background: var(--azul); }
.tema-escuro .ti-input-enviar { background: var(--azul); }

/* Chips de sugestão */
.ti-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.ti-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: 18px;
  padding: 8px 16px;
  font-size: .85rem;
  color: var(--texto);
  cursor: pointer;
  transition: all .15s;
}
.ti-chip:hover {
  background: var(--bg-card-2);
  border-color: var(--azul);
  color: var(--azul);
  transform: translateY(-1px);
}
.ti-chip span { font-size: 1rem; }

/* Mensagens */
.ti-msgs {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}
.ti-msg {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.ti-msg-user { justify-content: flex-end; }
.ti-msg-user .ti-msg-body {
  background: var(--bg-card-2);
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 80%;
  font-size: .92rem;
  line-height: 1.5;
}
.ti-msg-assistant .ti-msg-body {
  flex: 1;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--texto);
}
.ti-msg-body > br + br { display: none; } /* colapsa quebras duplas */
.ti-msg-body p { margin: 6px 0; }
.ti-msg-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #41a1df 0%, #322d80 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(65, 161, 223, .25);
}
.ti-msg-body h2, .ti-msg-body h3, .ti-msg-body h4 {
  margin: 10px 0 4px;
  line-height: 1.25;
  font-weight: 700;
}
.ti-msg-body h2 { font-size: 1.05rem; }
.ti-msg-body h3 { font-size: .98rem; }
.ti-msg-body h4 { font-size: .92rem; }
.ti-msg-body code {
  background: var(--bg-card-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .85em;
}
.ti-msg-body ul { margin: 4px 0 8px 18px; padding: 0; }
.ti-msg-body li { margin: 1px 0; line-height: 1.45; }
.ti-msg-body a { color: var(--azul); }
.ti-msg-body strong { font-weight: 700; color: var(--texto); }
.ti-cursor {
  display: inline-block;
  animation: ti-blink 1s infinite;
}
@keyframes ti-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.ti-limite-aviso {
  margin-top: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(65, 161, 223, .08), rgba(37, 99, 235, .08));
  border-left: 3px solid #7c3aed;
  border-radius: 6px;
  font-size: .82rem;
  color: var(--texto-sub);
}
.ti-limite-aviso a {
  color: #41a1df;
  font-weight: 700;
  text-decoration: none;
  margin-left: 6px;
}
.ti-limite-aviso a:hover { text-decoration: underline; }
.ti-disclaimer {
  text-align: center;
  font-size: .72rem;
  color: var(--texto-sub);
  padding: 6px 24px 14px;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .thinkai-app { height: calc(100vh - 110px); }
  .thinkai-sidebar { width: 50px; }
  .ti-side-panel { width: 240px; left: 50px; }
  .ti-welcome-titulo { font-size: 1.3rem; }
  .ti-msgs { padding: 16px; }
  .ti-input-rodape { margin: 10px 12px; }
  .ti-chip { font-size: .78rem; padding: 6px 12px; }
  .ti-head-contador { display: none; } /* esconde contador no mobile pra economizar espaço */
}

/* Item ThinkAI em destaque no menu Ferramentas */
.nav-dropdown-menu a.ti-menu-destaque {
  background: linear-gradient(135deg, rgba(65, 161, 223, .08), rgba(37, 99, 235, .08));
  font-weight: 700;
  color: #41a1df;
  border: 1px solid rgba(65, 161, 223, .2);
}
.nav-dropdown-menu a.ti-menu-destaque:hover {
  background: linear-gradient(135deg, rgba(65, 161, 223, .15), rgba(37, 99, 235, .15));
  color: #322d80;
}
