/* Ajustes finos do webapp KRW (complementa o Tailwind via CDN). */
[x-cloak] { display: none !important; }

/* Paleta de apoio (premium Rector Wealth Management) */
:root {
  --rw-navy: #13315c;
  --rw-navy-dark: #0e2747;
  --rw-brandblue: #2f6db0;
  --rw-gold: #c9a24e;
  --rw-gold-soft: #e4cd93;
  /* Dourado mais escuro (== tailwind.config gold.dark em base.html) para texto
     pequeno sobre fundo claro -- o --rw-gold puro fica com contraste fraco
     demais em uppercase 11px sobre branco. */
  --rw-gold-dark: #a8842f;
  /* Dourado mais rico/saturado (tom central dos brilhos/linhas douradas do
     sidebar e do login) -- mais presenca que --rw-gold sozinho. */
  --rw-gold-rich: #c69214;
  --rw-line: #e6ebf2;
  --rw-muted: #5b6b7b;
  /* Off-white premium exclusivo da tela de login (a area de conteudo comum do
     app continua em --rw-soft/bg-soft, mais azulado; nao alterado aqui). */
  --rw-cream: #f7f4ee;
}

/* ---------------------------------------------------------------------------
   Tabulator com a cara do tema
--------------------------------------------------------------------------- */
.tabulator { border: none; font-size: 13px; }
.tabulator .tabulator-header { background: #f3f6fa; border-bottom: 1px solid var(--rw-line); }
.tabulator .tabulator-header .tabulator-col { background: #f3f6fa; border-right: none; font-weight: 700; color: #3a4a5b; }
.tabulator .tabulator-row:nth-child(even) { background: #f9fbfd; }
.tabulator .tabulator-row .tabulator-cell { border-right: none; }
.tabulator .tabulator-row:hover { background: #eef4fb; }

/* ---------------------------------------------------------------------------
   Badges (acabamento premium: pill com anel sutil, mais legivel)
--------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1.2;
  letter-spacing: .01em; border: 1px solid transparent; white-space: nowrap;
}
.badge-ok   { background: #e6f4ec; color: #1f7a4d; border-color: #bfe3cd; }
.badge-warn { background: #fdf1de; color: #b9740f; border-color: #f3dcae; }
.badge-bad  { background: #fde7e4; color: #b23020; border-color: #f4c9c2; }
.badge-mut  { background: #eef2f7; color: #5b6b7b; border-color: #dde5ee; }
/* ponto de status opcional: <span class="badge badge-ok"><i class="dot"></i>...</span> */
.badge .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; display: inline-block; }

/* ---------------------------------------------------------------------------
   Botoes padronizados (primitivas reutilizaveis; nao alteram comportamento)
--------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 18px; border-radius: 10px; font-size: 14px; font-weight: 700;
  line-height: 1; cursor: pointer; transition: all .15s ease; border: 1px solid transparent;
}
.btn-primary {
  color: #fff; background: linear-gradient(180deg, #2f6db0 0%, var(--rw-navy) 100%);
  box-shadow: 0 1px 2px rgba(14,39,71,.25); border-color: rgba(201,162,78,.35);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 3px 10px rgba(14,39,71,.28); }
.btn-ghost { color: var(--rw-navy); background: #fff; border-color: var(--rw-line); }
.btn-ghost:hover { background: #f4f7fb; border-color: #cfdaea; }
.btn-disabled, .btn:disabled {
  color: #94a3b8; background: #eef2f7; border-color: #e2e8f0;
  cursor: not-allowed; box-shadow: none; filter: none;
}

/* ---------------------------------------------------------------------------
   Tabelas HTML "premium" (opt-in via .rw-thead no thead / .rw-row nas linhas)
--------------------------------------------------------------------------- */
.rw-thead th {
  background: #f3f6fa; color: #3a4a5b; font-weight: 700; letter-spacing: .01em;
  border-bottom: 1px solid var(--rw-line);
}
.rw-row:hover { background: #f6f9fd; }

/* ---------------------------------------------------------------------------
   Cards de KPI (primitiva unica, usada por components/kpi.html)

   Regra central: o valor NUNCA e cortado. A fonte e fluida (clamp) e valores
   financeiros longos quebram em 2 linhas em vez de vazar. Por isso o card nao
   tem overflow:hidden -- a barra do accent e recortada pelo proprio border-radius
   do ::before, e nao por um clip no container.
--------------------------------------------------------------------------- */
.kpi-grid {
  display: grid;
  gap: 12px;
  /* responsivo sem contagem fixa de colunas: cada card tem um piso de leitura */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 104px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--rw-line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(14, 39, 71, .06);
  transition: box-shadow .15s ease;
}
.kpi:hover { box-shadow: 0 3px 10px rgba(14, 39, 71, .10); }

/* Destaque opcional (antigo accent=1): anel sutil + fio dourado no topo. */
.kpi-accent { box-shadow: inset 0 0 0 1px rgba(201, 162, 78, .22), 0 1px 2px rgba(14, 39, 71, .06); }
.kpi-accent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--rw-gold), var(--rw-gold-soft));
}

.kpi-label {
  font-size: 11px; font-weight: 600; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--rw-muted);
}
.kpi-value {
  margin-top: 6px;
  font-size: clamp(17px, 1.2vw + 8px, 26px);
  font-weight: 900; line-height: 1.15;
  color: var(--rw-navy);
  /* valor textual longo quebra em 2 linhas em vez de estourar/ser cortado.
     Valores monetarios NAO usam isto -- ver .kpi-money abaixo. */
  overflow-wrap: anywhere;
}

/* KPI monetario (moeda=1). O numero NUNCA pode quebrar no meio
   ("R$ 154.681.602," / "67"), entao o valor fica em linha unica:
     - white-space: nowrap  -> proibe qualquer quebra, inclusive no espaco do "R$";
     - overflow-wrap: normal -> desliga a quebra no meio do token herdada de .kpi-value;
     - tabular-nums          -> digitos de mesma largura, valor nao "dança" ao atualizar;
     - clamp mais agressivo + tracking negativo -> a fonte encolhe ANTES de faltar espaco.
   O par disso e o span de 2 colunas abaixo, que garante a largura necessaria. */
.kpi-money .kpi-value {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
  font-size: clamp(15px, 1.05vw + 6px, 26px);
  letter-spacing: -.02em;
  line-height: 1.1;
}
/* A partir de md o card monetario ocupa 2 colunas: e nas larguras intermediarias
   (card ~190px) que o valor nao cabia em uma linha. Abaixo de md a grade ja cai
   para 1-2 cards por linha, e o card e largo o bastante sozinho. */
@media (min-width: 768px) {
  .kpi-money { grid-column: span 2; }
}

/* Numero monetario fora do card de KPI (tabelas/cards proprios): mesma regra. */
.rw-money {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
/* margin-top:auto encosta o subtitulo na base, alinhando-o entre cards da linha */
.kpi-sub {
  margin-top: auto; padding-top: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.3;
  color: var(--rw-brandblue);
}

/* ---------------------------------------------------------------------------
   Bloco de marca (sidebar + login): SO o logo oficial da Rector + o fio/brilho
   dourado abaixo dele (Opcao A aprovada). "Consolidar" NAO fica mais empilhado
   sob o logo em lugar nenhum -- ele aparece como eyebrow (.app-eyebrow) perto
   do titulo funcional, no topbar das telas logadas e no card de login.
--------------------------------------------------------------------------- */
.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.brand-logo {
  width: 100%;
  max-width: 168px;
  height: auto;
  display: block;
}
/* Fio/brilho dourado curto abaixo do logo (sidebar). A versao anterior (3
   stops, sem tom rico no meio) ficava quase apagada sobre o navy -- o degrade
   agora tem um nucleo mais saturado (--rw-gold-rich) ladeado por gold-soft
   antes de esmaecer, e o box-shadow da um leve halo, lendo como acabamento
   premium em vez de linha fraca. Uso exclusivo do sidebar a partir de agora --
   o login usa .login-gold-glow (mais abaixo), posicionado sobre a curva. */
.brand-glow-line {
  display: block;
  width: 132px;
  max-width: 100%;
  height: 2px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(201, 162, 78, 0),
    rgba(228, 205, 147, .95),
    rgba(198, 146, 20, .95),
    rgba(228, 205, 147, .95),
    rgba(201, 162, 78, 0));
  box-shadow: 0 0 10px rgba(201, 162, 78, .35);
}

/* Eyebrow "Consolidar": pequeno, dourado, uppercase, bem espacado -- usado
   acima do titulo funcional no topbar (fundo branco) e no card de login
   (fundo cream). Usa --rw-gold-dark (nao --rw-gold puro) para nao perder
   contraste em texto pequeno sobre fundo claro. */
.app-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rw-gold-dark);
}

/* Titulo funcional da tela (Visao Geral, Posicoes, Clientes...): peso mais
   elegante que o font-black/extrabold anterior, para nao competir com o
   eyebrow "Consolidar" acima nem soar gritante. Usado por layout/topbar.html. */
.page-title {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--rw-navy);
}

/* ---------------------------------------------------------------------------
   Tela de login (Opcao A): fundo off-white, card premium com topo azul-marinho
   (logo + curva + brilho dourado na divisa) e area clara com eyebrow + titulo
   + formulario. Nomes de classe seguem a estrutura combinada:
     .login-shell / .login-card / .login-brand-top / .login-logo /
     .login-curve / .login-gold-glow / .login-body / .login-eyebrow /
     .login-title / .login-form
--------------------------------------------------------------------------- */
.login-shell { background: var(--rw-cream); }

.login-card {
  width: 100%;
  max-width: 408px; /* dentro da faixa 380-430px pedida */
  background: var(--rw-cream);
  border-radius: 28px;
  overflow: hidden; /* clip do topo azul nos cantos arredondados do card */
  box-shadow: 0 20px 50px -12px rgba(6, 20, 33, .28), 0 6px 16px -6px rgba(6, 20, 33, .16);
}

/* Topo azul-marinho profundo: logo centralizado + curva + brilho na divisa.
   position:relative + overflow:hidden e o que permite a .login-curve (um
   circulo/elipse bem maior que o proprio painel, quase toda "afundada" abaixo
   da borda) revelar so o arco superior -- a curva fica suave porque so a
   parte mais rasa (proxima ao topo) da elipse aparece. */
.login-brand-top {
  position: relative;
  overflow: hidden;
  min-height: 190px; /* dentro da faixa 170-210px pedida */
  padding: 40px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--rw-navy-dark), var(--rw-navy));
}
.login-logo {
  max-width: 168px;
}
/* Elipse bem mais larga/alta que o painel: fica quase toda abaixo da borda
   inferior (overflow:hidden corta o resto) e revela so os ~34px do topo,
   onde a curvatura de uma elipse grande e naturalmente suave. */
.login-curve {
  position: absolute;
  left: 50%;
  bottom: -86px;
  width: 160%;
  height: 120px;
  transform: translateX(-50%);
  background: var(--rw-cream);
  border-radius: 50%;
}
/* Brilho dourado exatamente na divisa da curva (mesma receita do sidebar,
   com halo um pouco mais forte por estar sobre uma area maior). z-index
   garante que fique por cima da curva, nao encoberto por ela. */
.login-gold-glow {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 1;
  width: 150px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    transparent, var(--rw-gold-soft), var(--rw-gold-rich), var(--rw-gold-soft), transparent);
  box-shadow: 0 0 16px rgba(201, 162, 78, .45);
}

/* Area clara: eyebrow + titulo + formulario, com padding generoso. */
.login-body {
  padding: 40px 36px 36px;
}
.login-eyebrow {
  text-align: center;
}
.login-title {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-align: center;
  color: var(--rw-navy);
}

/* Formulario: campos com borda suave, altura confortavel, radius 8-10px, foco
   dourado (nao azul -- o login usa a linguagem dourada, nao a azul do app). */
.login-form .field { margin-bottom: 18px; }
.login-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rw-navy);
}
.login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rw-line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--rw-navy-dark);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-form input:focus {
  outline: none;
  border-color: var(--rw-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 78, .18);
}

/* Botao principal do login: skin dourado sobre a primitiva .btn existente
   (mesmo padrao de .btn-primary/.btn-ghost), distinto do azul usado dentro
   do app -- reforca que o login e a "porta" da marca, nao uma tela operacional. */
.btn-gold {
  color: var(--rw-navy-dark);
  background: linear-gradient(180deg, var(--rw-gold-soft) 0%, var(--rw-gold) 100%);
  border-color: rgba(14, 39, 71, .1);
  box-shadow: 0 4px 14px -4px rgba(201, 162, 78, .55);
}
.btn-gold:hover { filter: brightness(1.05); box-shadow: 0 6px 18px -4px rgba(201, 162, 78, .65); }

/* Telas bem estreitas: card ja encolhe por max-width:408px + width:100%,
   so aperta um pouco o padding lateral da area clara para nao ficar apertado. */
@media (max-width: 380px) {
  .login-body { padding-left: 24px; padding-right: 24px; }
}

/* ---------------------------------------------------------------------------
   Scrollbar discreta (conteineres com overflow interno)
--------------------------------------------------------------------------- */
.rw-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.rw-scroll::-webkit-scrollbar-thumb { background: #cbd6e4; border-radius: 999px; border: 2px solid #fff; }
.rw-scroll::-webkit-scrollbar-thumb:hover { background: #b3c2d6; }
.rw-scroll::-webkit-scrollbar-track { background: transparent; }

/* Feedback honesto para operacoes sincronas: movimento, sem porcentagem falsa. */
.rw-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: .45em;
  vertical-align: -.15em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: rw-spin .75s linear infinite;
}
@keyframes rw-spin { to { transform: rotate(360deg); } }


/* ==========================================================================
   Dashboard patrimonial
   docs/projeto/spec-ux-dashboard-patrimonial.md

   Sem canvas: composicao, rankings e listas sao HTML/CSS. Rotulo sobreposto,
   legenda flutuante e label amontoado nao existem fora de grafico em canvas.
   ========================================================================== */

.rw-topbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px; padding: 16px 20px 14px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--rw-line); border-radius: 16px;
}
.rw-eyebrow {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; color: var(--rw-muted);
}
.rw-title {
  margin-top: 2px; font-size: clamp(19px, 1.4vw + 10px, 25px);
  font-weight: 800; line-height: 1.2; color: var(--rw-navy);
}
.rw-topbar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.rw-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.rw-chip-mut { background: var(--rw-soft); color: var(--rw-muted); border: 1px solid var(--rw-line); }
.rw-chip-date {
  background: #fff; color: var(--rw-navy);
  border: 1px solid var(--rw-line); border-left: 3px solid var(--rw-gold);
}
.rw-chip-filtro { background: var(--rw-navy); color: #fff; padding-right: 4px; }
.rw-chip-k { opacity: .68; font-weight: 500; }
.rw-chip-x {
  display: inline-grid; place-items: center; width: 17px; height: 17px;
  border-radius: 50%; background: rgba(255,255,255,.2); color: #fff;
  font-size: 13px; line-height: 1; text-decoration: none;
}
.rw-chip-x:hover { background: rgba(255,255,255,.36); }

/* Filtros ativos: sempre visiveis, cada um removivel sozinho. */
.rw-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--rw-line); border-radius: 12px;
}
.rw-chips-rotulo {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--rw-muted);
}
.rw-chips-limpar { margin-left: auto; font-size: 12px; color: var(--rw-muted); text-decoration: underline; }
.rw-chips-limpar:hover { color: var(--rw-navy); }

/* Filtros recolhidos quando ha chip: o contexto ja esta dito acima. */
.rw-filtros-box {
  margin-bottom: 16px; background: #fff;
  border: 1px solid var(--rw-line); border-radius: 12px;
}
.rw-filtros-resumo {
  padding: 10px 16px; cursor: pointer;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--rw-muted);
}
.rw-filtros { padding: 0 16px 16px; }
.rw-filtros-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.rw-label {
  display: block; margin-bottom: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--rw-muted);
}
.rw-select {
  width: 100%; padding: 7px 10px; font-size: 14px; color: var(--rw-navy);
  background: #fff; border: 1px solid var(--rw-line); border-radius: 8px;
}
.rw-select:focus-visible, .rw-chip-x:focus-visible, .btn:focus-visible,
.rw-faixa-seg:focus-visible, .rw-legenda-nome:focus-visible,
.rw-lista-nome:focus-visible, .rw-toggle input:focus-visible,
.rw-filtros-resumo:focus-visible, .rw-operacional > summary:focus-visible {
  outline: 2px solid var(--rw-gold); outline-offset: 2px;
}

.rw-alert { padding: 10px 14px; margin-bottom: 14px; font-size: 14px; border-radius: 10px; border: 1px solid; }
.rw-alert-warn { background: #FFF8E8; border-color: #E8D6A8; color: #6B551F; }

/* Cards */
.rw-duas-colunas {
  display: grid; gap: 16px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}
.rw-bloco { margin-bottom: 16px; }
.rw-meia { max-width: 640px; }
.rw-card {
  padding: 18px 20px; background: #fff;
  border: 1px solid var(--rw-line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(14,39,71,.05);
}
.rw-card-head, .rw-card-head-simples { margin-bottom: 14px; }
.rw-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rw-card-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--rw-navy);
}
.rw-card-sub { margin-top: 3px; font-size: 12px; color: var(--rw-muted); }
.rw-card-nota { margin: -6px 0 12px; font-size: 11px; color: var(--rw-muted); }

/* Faixa 100% segmentada: a composicao inteira em 26px de altura. */
.rw-faixa {
  display: flex; width: 100%; height: 26px; overflow: hidden;
  border-radius: 6px; background: var(--rw-soft);
}
.rw-faixa-fina { height: 14px; }
.rw-faixa-seg { display: block; height: 100%; min-width: 2px; transition: filter .12s ease; }
a.rw-faixa-seg:hover { filter: brightness(1.18); }

/* Legenda ABAIXO da faixa, em grade alinhada. Nunca sobre o grafico. */
.rw-legenda { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.rw-legenda-item {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) 52px auto;
  align-items: center; gap: 10px; padding: 5px 0;
  border-top: 1px solid var(--rw-line); font-size: 13px;
}
.rw-legenda-item:first-child { border-top: 0; }
.rw-legenda-cor { width: 10px; height: 10px; border-radius: 3px; }
.rw-legenda-nome {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--rw-navy); text-decoration: none;
}
a.rw-legenda-nome:hover { text-decoration: underline; }
.rw-legenda-pct {
  text-align: right; font-weight: 700; color: var(--rw-navy);
  font-variant-numeric: tabular-nums;
}
.rw-legenda-valor {
  text-align: right; color: var(--rw-muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Concentracao: um numero e uma frase respondem melhor que um grafico. */
.rw-destaque {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline;
  gap: 4px 12px; padding: 12px 14px; margin-bottom: 14px;
  background: var(--rw-soft); border-radius: 12px;
  border-left: 3px solid var(--rw-navy);
}
.rw-destaque-alerta { border-left-color: var(--rw-gold); background: rgba(201,162,95,.09); }
.rw-destaque-num {
  font-size: clamp(22px, 1.8vw + 8px, 30px); font-weight: 900;
  color: var(--rw-navy); font-variant-numeric: tabular-nums; line-height: 1;
}
.rw-destaque-txt { font-size: 13px; color: var(--rw-navy); }
.rw-destaque-sub { grid-column: 1 / -1; font-size: 12px; color: var(--rw-muted); }

/* Lista editorial: parece informacao financeira, nao eixo de grafico. */
.rw-lista { display: flex; flex-direction: column; }
.rw-lista-item {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center; gap: 14px; padding: 11px 0;
  border-top: 1px solid var(--rw-line);
}
.rw-lista-item:first-child { border-top: 0; }
.rw-lista-rank {
  font-size: 12px; font-weight: 700; color: var(--rw-muted);
  font-variant-numeric: tabular-nums; text-align: right;
}
.rw-lista-corpo { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rw-lista-nome {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--rw-navy); text-decoration: none;
}
a.rw-lista-nome:hover { text-decoration: underline; }
.rw-lista-ctx {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rw-muted);
}
.rw-lista-barra {
  display: block; height: 4px; border-radius: 2px; background: var(--rw-soft);
  overflow: hidden;
}
.rw-lista-barra > span { display: block; height: 100%; background: #3B7BB0; border-radius: 2px; }
.rw-lista-num { text-align: right; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.rw-lista-valor {
  font-size: 14px; font-weight: 700; color: var(--rw-navy);
  font-variant-numeric: tabular-nums;
}
.rw-lista-pct { font-size: 12px; color: var(--rw-muted); font-variant-numeric: tabular-nums; }
.rw-lista-compacta .rw-lista-item { padding: 8px 0; }

/* Estados */
.rw-vazio {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 110px; padding: 20px 0; font-size: 13px; color: var(--rw-muted);
}
.rw-vazio-traco { width: 40px; height: 2px; background: var(--rw-line); border-radius: 2px; }
.rw-resumo {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
  padding: 14px 16px; border-radius: 12px;
  background: var(--rw-soft); border: 1px solid var(--rw-line);
}
.rw-resumo-nome {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--rw-navy);
}
.rw-resumo-valor {
  font-size: clamp(18px, 1.4vw + 8px, 24px); font-weight: 900;
  color: var(--rw-navy); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rw-resumo-pct {
  padding: 3px 10px; border-radius: 999px;
  background: rgba(201,162,95,.14); color: #8A6D2F; font-size: 12px; font-weight: 600;
}
.rw-vazio-grande {
  padding: 52px 24px; margin-bottom: 16px; text-align: center;
  background: #fff; border: 1px dashed var(--rw-line); border-radius: 16px;
}
.rw-vazio-titulo { font-size: 18px; font-weight: 800; color: var(--rw-navy); }
.rw-vazio-texto { max-width: 460px; margin: 6px auto 0; font-size: 14px; color: var(--rw-muted); }

/* Tabelas */
.rw-tabela-wrap { overflow-x: auto; }
.rw-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.rw-tabela thead th {
  padding: 8px 10px; text-align: left; white-space: nowrap;
  background: var(--rw-soft); color: var(--rw-muted);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.rw-tabela tbody td { padding: 9px 10px; border-top: 1px solid var(--rw-line); color: var(--rw-navy); }
.rw-tabela tbody tr:nth-child(even) { background: #F9FBFD; }
.rw-tabela tbody tr:hover { background: #F3F6FA; }
.rw-tabela .rw-num { text-align: right; font-variant-numeric: tabular-nums; }
.rw-linha-apagada td:not(:last-child) { color: var(--rw-muted); }

.rw-card-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rw-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--rw-muted); cursor: pointer; user-select: none;
}
.rw-toggle input { width: 15px; height: 15px; accent-color: var(--rw-navy); cursor: pointer; }

.rw-operacional {
  margin-bottom: 16px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--rw-line); border-radius: 10px;
}
.rw-operacional > summary {
  cursor: pointer; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--rw-muted);
}
.rw-operacional-body { margin-top: 8px; font-size: 13px; color: var(--rw-navy); }

.rw-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 900px) {
  .rw-duas-colunas { grid-template-columns: 1fr; }
  .rw-meia { max-width: none; }
}
@media (max-width: 640px) {
  .rw-topbar { flex-direction: column; align-items: flex-start; }
  .rw-card { padding: 15px; }
  .rw-resumo { flex-direction: column; align-items: flex-start; }
  .rw-legenda-item { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .rw-legenda-valor { display: none; }
  .rw-lista-item { gap: 10px; }
}

/* Interatividade do dashboard (Alpine) -------------------------------------- */

[x-cloak] { display: none !important; }

/* Segmentos e nomes viram <button>: reset para nao herdar cara de formulario. */
button.rw-faixa-seg, button.rw-legenda-nome, button.rw-lista-nome,
button.rw-chip-x, button.rw-chips-limpar {
  font: inherit; color: inherit; background: none; border: 0;
  padding: 0; margin: 0; cursor: pointer; text-align: left;
}
button.rw-faixa-seg { cursor: pointer; }
button.rw-faixa-seg[aria-pressed="true"] { outline: 2px solid var(--rw-gold); outline-offset: -2px; }
button.rw-faixa-seg:disabled, button.rw-legenda-nome:disabled { cursor: default; }
button.rw-legenda-nome:hover:not(:disabled),
button.rw-lista-nome:hover { text-decoration: underline; }
button.rw-chips-limpar { text-decoration: underline; }

/* Item selecionado: marcado por fundo E por peso, nunca so por cor. */
.rw-legenda-ativa { background: rgba(29,77,124,.06); border-radius: 6px; }
.rw-legenda-ativa .rw-legenda-nome { font-weight: 700; }
.rw-lista-ativa { background: rgba(29,77,124,.05); border-radius: 8px; }
.rw-lista-ativa .rw-lista-nome { font-weight: 800; }
.rw-lista-ativa .rw-lista-barra > span { background: var(--rw-gold); }

/* Experiencia A — Executiva Premium -----------------------------------------
   Linguagem compartilhada pelas visoes global e de cliente. O fundo, a
   hierarquia editorial e o espacamento vieram do prototipo A; limites,
   historico global e alertas sinteticos nao vieram. */
.rw-premium {
  --rwp-bg: #070b12;
  --rwp-bg-soft: #0c1220;
  --rwp-line: rgba(255,255,255,.075);
  --rwp-text: #e8ecf3;
  --rwp-muted: #8793a6;
  --rwp-gold: #c9a961;
  --rwp-green: #69c49a;
  min-height: calc(100vh - 68px);
  width: calc(100% + 20px);
  margin: -20px 0 -20px -20px;
  padding: 0 clamp(24px, 4vw, 64px) 72px;
  color: var(--rwp-text);
  background:
    radial-gradient(circle at 78% 9%, rgba(37,64,96,.13), transparent 28rem),
    var(--rwp-bg);
  box-shadow: 20px 0 var(--rwp-bg);
}
.rw-premium .rw-topbar {
  margin: 0; padding: 28px 0 24px; border: 0; border-bottom: 1px solid var(--rwp-line);
  border-radius: 0; background: transparent; box-shadow: none;
}
.rw-premium .rw-eyebrow, .rwp-kicker {
  display: block; color: var(--rwp-muted); font-size: 10px; font-weight: 650;
  letter-spacing: .22em; text-transform: uppercase;
}
.rw-premium .rw-title {
  color: var(--rwp-text); font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(22px, 2vw, 30px); font-weight: 400; letter-spacing: -.015em;
}
.rw-premium .rw-chip-mut, .rw-premium .rw-chip-date {
  color: var(--rwp-muted); background: var(--rwp-bg-soft); border-color: var(--rwp-line);
}
.rw-premium .rw-chip-date { border-left-color: var(--rwp-gold); }
.rw-premium .rw-alert-warn {
  margin-top: 18px; background: rgba(201,169,97,.09); border-color: rgba(201,169,97,.3);
  color: #e4cf9e;
}
.rw-premium .rw-chips, .rw-premium .rw-filtros-box {
  margin: 18px 0 0; color: var(--rwp-text); background: rgba(12,18,32,.72);
  border-color: var(--rwp-line); box-shadow: none;
}
.rw-premium .rw-chips-rotulo, .rw-premium .rw-filtros-resumo,
.rw-premium .rw-label { color: var(--rwp-muted); }
.rw-premium .rw-chip-filtro {
  color: var(--rwp-gold); background: rgba(201,169,97,.08);
  border: 1px solid rgba(201,169,97,.28);
}
.rw-premium .rw-select {
  color: var(--rwp-text); background: #101827; border-color: var(--rwp-line);
}
.rw-premium .rw-select option { color: #1c2733; background: #fff; }
.rw-premium .btn-primary {
  color: #121820; background: var(--rwp-gold); border-color: var(--rwp-gold);
  box-shadow: none;
}
.rw-premium .btn-ghost {
  color: var(--rwp-text); background: transparent; border-color: var(--rwp-line);
}

.rwp-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: clamp(40px, 6vw, 88px); align-items: end; padding: 68px 0 54px;
}
.rwp-patrimonio {
  margin-top: 18px; color: var(--rwp-text); font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(48px, 6.1vw, 88px); font-weight: 400; line-height: .95;
  letter-spacing: -.055em; font-variant-numeric: tabular-nums;
}
.rwp-hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px;
  color: var(--rwp-muted); font-size: 12px;
}
.rwp-hero-meta span:first-child { color: var(--rwp-gold); }
.rwp-global-coverage { min-width: 0; padding: 2px 0 4px; }
.rwp-global-coverage dl {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px;
  margin-top: 18px;
}
.rwp-global-coverage dl > div {
  padding: 14px 0; border-top: 1px solid var(--rwp-line);
  border-bottom: 1px solid var(--rwp-line);
}
.rwp-global-coverage dt { color: var(--rwp-muted); font-size: 11px; }
.rwp-global-coverage dd {
  margin-top: 5px; color: var(--rwp-text); font-family: Georgia, serif;
  font-size: 27px; font-variant-numeric: tabular-nums;
}
.rwp-global-coverage > p { margin-top: 16px; color: var(--rwp-muted); font-size: 11px; }
.rwp-spark-wrap { min-width: 0; padding-bottom: 4px; }
.rwp-spark { width: 100%; height: 86px; margin-top: 9px; }
.rwp-spark-single {
  display: flex; align-items: center; gap: 10px; min-height: 70px; margin-top: 8px;
  color: var(--rwp-muted); font-size: 13px; border-bottom: 1px solid var(--rwp-line);
}
.rwp-spark-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rwp-gold); }

.rwp-section { padding: 46px 0; border-top: 1px solid var(--rwp-line); }
.rwp-section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px;
}
.rwp-section-head h2 {
  margin-top: 6px; color: var(--rwp-text); font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(23px, 2.2vw, 31px); font-weight: 400; letter-spacing: -.025em;
}
.rwp-section-head > p { color: var(--rwp-muted); font-size: 11px; letter-spacing: .08em; }
.rwp-evolucao { width: 100%; height: 310px; }
.rwp-footnote { margin-top: 12px; color: var(--rwp-muted); font-size: 11px; }
.rwp-temporal-state {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; align-items: baseline;
  min-height: 170px; padding: 36px; background: rgba(255,255,255,.025);
  border: 1px solid var(--rwp-line);
}
.rwp-temporal-state .rwp-temporal-date { color: var(--rwp-gold); font-size: 12px; }
.rwp-temporal-state strong {
  color: var(--rwp-text); font-family: Georgia, serif; font-size: 28px; font-weight: 400;
}
.rwp-temporal-state p { grid-column: 1 / -1; max-width: 620px; color: var(--rwp-muted); font-size: 13px; }

.rwp-allocation { display: flex; flex-direction: column; }
.rwp-allocation li { border-bottom: 1px solid var(--rwp-line); }
.rwp-allocation li > a, .rwp-allocation li > span {
  display: grid; grid-template-columns: minmax(130px, 200px) minmax(120px, 1fr) 80px 92px;
  gap: 24px; align-items: center; min-height: 54px; color: inherit; text-decoration: none;
  transition: padding .16s ease, background .16s ease;
}
.rwp-allocation li > a:hover { padding-left: 8px; background: rgba(255,255,255,.018); }
.rwp-allocation li > a:focus-visible { outline: 2px solid var(--rwp-gold); outline-offset: 3px; }
.rwp-allocation-name {
  overflow: hidden; color: var(--rwp-text); font-size: 14px; font-weight: 600;
  text-overflow: ellipsis; white-space: nowrap;
}
.rwp-allocation-track { height: 3px; overflow: hidden; background: rgba(255,255,255,.055); }
.rwp-allocation-track i { display: block; height: 100%; min-width: 2px; }
.rwp-allocation strong {
  color: var(--rwp-text); font-family: Georgia, serif; font-size: 18px; font-weight: 400;
  text-align: right; font-variant-numeric: tabular-nums;
}
.rwp-allocation small { color: var(--rwp-muted); text-align: right; white-space: nowrap; }
.rwp-allocation-single {
  display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid var(--rwp-line);
}
.rwp-allocation-single strong { color: var(--rwp-text); font-size: 16px; }
.rwp-allocation-single span { color: var(--rwp-gold); font-family: Georgia, serif; font-size: 26px; }
.rwp-allocation-single small { color: var(--rwp-muted); }
.rwp-inline-empty { min-height: 120px; color: var(--rwp-muted); }

.rwp-concentrations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.rwp-concentrations article { min-width: 0; padding: 8px 0 18px; border-bottom: 1px solid var(--rwp-line); }
.rwp-concentrations strong {
  display: block; margin: 15px 0 8px; color: var(--rwp-text); font-family: Georgia, serif;
  font-size: clamp(30px, 3.4vw, 46px); font-weight: 400; line-height: 1;
}
.rwp-concentrations p { overflow: hidden; color: var(--rwp-text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rwp-concentrations small { display: block; margin-top: 5px; color: var(--rwp-muted); }

.rwp-ranking { display: flex; flex-direction: column; }
.rwp-ranking li {
  display: grid; grid-template-columns: 42px minmax(0,1fr) minmax(120px,auto);
  gap: 20px; align-items: center; min-height: 68px; border-bottom: 1px solid var(--rwp-line);
}
.rwp-ranking-index {
  color: var(--rwp-muted); font-family: Georgia, serif; font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.rwp-ranking-main { min-width: 0; }
.rwp-ranking-main > strong, .rwp-ranking-main > a {
  display: block; overflow: hidden; color: var(--rwp-text); font-size: 14px;
  font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap;
}
.rwp-ranking-main > a:hover { color: var(--rwp-gold); }
.rwp-ranking-main > a:focus-visible { outline: 2px solid var(--rwp-gold); outline-offset: 3px; }
.rwp-ranking-main > small { display: block; margin-top: 4px; color: var(--rwp-muted); }
.rwp-ranking-main > i {
  display: block; height: 2px; margin-top: 9px; overflow: hidden;
  background: rgba(255,255,255,.05);
}
.rwp-ranking-main > i > b { display: block; height: 100%; background: #5794c7; }
.rwp-ranking-values { display: flex; align-items: baseline; gap: 14px; justify-content: flex-end; }
.rwp-ranking-values > strong {
  color: var(--rwp-text); font-family: Georgia, serif; font-size: 17px;
  font-weight: 400; white-space: nowrap;
}
.rwp-ranking-values > small { min-width: 48px; color: var(--rwp-muted); text-align: right; }

.rwp-attention ul { display: flex; flex-direction: column; }
.rwp-attention li {
  display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 18px; align-items: center;
  min-height: 68px; border-bottom: 1px solid var(--rwp-line);
}
.rwp-attention-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rwp-gold); }
.rwp-attention li strong { display: block; color: var(--rwp-text); font-size: 14px; font-weight: 550; }
.rwp-attention li small { display: block; margin-top: 4px; color: var(--rwp-muted); }
.rwp-attention li b { color: var(--rwp-muted); font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.rwp-attention-clear {
  padding: 24px 0; color: var(--rwp-muted); border-bottom: 1px solid var(--rwp-line);
}
.rwp-empty {
  min-height: 58vh; padding: 80px 0; border-bottom: 1px solid var(--rwp-line);
}
.rwp-empty h2 { margin-top: 15px; font: 400 clamp(34px,5vw,66px)/1 Georgia,serif; }
.rwp-empty p { margin-top: 18px; color: var(--rwp-muted); }
.rwp-link { display: inline-block; margin-top: 24px; color: var(--rwp-gold); }

/* Conteudo operacional abaixo da experiencia executiva fica subordinado. */
.rw-premium > .rw-card, .rw-premium > .rw-operacional {
  color: var(--rwp-text); background: rgba(12,18,32,.78); border-color: var(--rwp-line);
  box-shadow: none;
}
.rw-premium .rw-card-title, .rw-premium .rw-tabela tbody td,
.rw-premium .rw-operacional-body { color: var(--rwp-text); }
.rw-premium .rw-card-sub, .rw-premium .rw-card-nota,
.rw-premium .rw-operacional > summary { color: var(--rwp-muted); }
.rw-premium .rw-tabela thead th { color: var(--rwp-muted); background: rgba(255,255,255,.035); }
.rw-premium .rw-tabela tbody td { border-color: var(--rwp-line); }
.rw-premium .rw-tabela tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
.rw-premium .rw-tabela tbody tr:hover { background: rgba(255,255,255,.045); }
.rw-premium .tabulator { color: var(--rwp-text); background: transparent; }
.rw-premium .tabulator .tabulator-header,
.rw-premium .tabulator .tabulator-header .tabulator-col { color: var(--rwp-muted); background: #101827; border-color: var(--rwp-line); }
.rw-premium .tabulator .tabulator-row { color: var(--rwp-text); background: transparent; border-color: var(--rwp-line); }
.rw-premium .tabulator .tabulator-row:nth-child(even) { background: rgba(255,255,255,.018); }
.rw-premium .tabulator .tabulator-footer { color: var(--rwp-muted); background: #101827; border-color: var(--rwp-line); }

@media (max-width: 1050px) {
  .rwp-hero { grid-template-columns: 1fr; gap: 34px; padding-top: 54px; }
  .rwp-spark-wrap { max-width: 560px; }
  .rwp-patrimonio { font-size: clamp(44px, 7.3vw, 70px); }
}
@media (max-width: 760px) {
  .rw-premium { padding-left: 20px; padding-right: 20px; }
  .rwp-section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .rwp-allocation li > a, .rwp-allocation li > span {
    grid-template-columns: minmax(0,1fr) 68px; gap: 8px 16px; padding: 12px 0;
  }
  .rwp-allocation-track { grid-column: 1; grid-row: 2; }
  .rwp-allocation small { grid-column: 2; grid-row: 2; }
  .rwp-concentrations { grid-template-columns: 1fr; }
  .rwp-global-coverage dl { grid-template-columns: repeat(3, 1fr); }
  .rwp-ranking li { grid-template-columns: 30px minmax(0,1fr); gap: 12px; padding: 12px 0; }
  .rwp-ranking-values { grid-column: 2; justify-content: space-between; }
}

/* Hub Patrimonial ---------------------------------------------------------
   Camada de arquitetura sobre a experiencia premium existente. Reutiliza
   tokens, tabelas, filtros, badges e hierarquia do Rector UI Foundation. */
.rw-hub,.rw-hub *,.rw-hub *::before,.rw-hub *::after { box-sizing: border-box; }
.rw-hub { --rwh-panel: rgba(12,18,32,.72); }
.rwh-view-nav {
  position: sticky; top: 0; z-index: 15; display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr)); margin: 16px 0 0;
  background: rgba(7,11,18,.92); border: 1px solid var(--rwp-line);
  border-radius: var(--rui-radius-md); backdrop-filter: blur(14px);
}
.rwh-view-tab {
  position: relative; display: flex; min-width: 0; min-height: 44px;
  flex-direction: column; justify-content: center; gap: 0; padding: 8px 14px;
  color: var(--rwp-muted); text-decoration: none; border-left: 1px solid var(--rwp-line);
  transition: color var(--rui-motion-fast),background var(--rui-motion-fast);
}
.rwh-view-tab:first-child { border-left: 0; border-radius: var(--rui-radius-md) 0 0 var(--rui-radius-md); }
.rwh-view-tab:last-child { border-radius: 0 var(--rui-radius-md) var(--rui-radius-md) 0; }
.rwh-view-tab strong { overflow: hidden; color: inherit; font-family: var(--rui-font-navigation); font-size: 16px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.rwh-view-tab span { display: none; }
.rwh-view-tab:hover { color: var(--rwp-text); background: rgba(255,255,255,.025); }
.rwh-view-tab.is-active { color: var(--rwp-text); background: rgba(255,255,255,.045); }
.rwh-view-tab.is-active::after { position: absolute; right: 16px; bottom: -1px; left: 16px; height: 2px; content: ""; background: var(--rwp-gold); }
.rwh-view-tab:focus-visible { z-index: 1; outline: 2px solid var(--rwp-gold); outline-offset: 3px; }
.rwh-view { outline: none; }
.rwh-first-section { margin-top: 38px; border-top: 0; }

.rwh-glance { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(24px,4vw,56px); padding: 26px 0 34px; border-top: 1px solid var(--rwp-line); }
.rwh-glance article { min-width: 0; padding-bottom: 14px; border-bottom: 1px solid var(--rwp-line); }
.rwh-glance strong { display: block; margin-top: 10px; font-family: var(--rui-font-editorial); font-size: clamp(25px,2.7vw,38px); font-weight: 400; }
.rwh-glance p { overflow: hidden; margin-top: 5px; color: var(--rwp-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-glance small { color: var(--rwp-muted); }
.rwh-summary-grid,.rwh-analysis-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(34px,5vw,70px); border-top: 1px solid var(--rwp-line); }
.rwh-summary-grid > .rwp-section,.rwh-analysis-grid > .rwp-section { border-top: 0; }
.rwh-inline-link { color: var(--rwp-gold); font-size: 11px; text-decoration: none; }
.rwh-inline-link:hover { text-decoration: underline; }
.rwh-inline-link:focus-visible { outline: 2px solid var(--rwp-gold); outline-offset: 3px; }
.rwh-segmented { display: flex; height: 13px; overflow: hidden; background: rgba(255,255,255,.05); border-radius: var(--rui-radius-pill); }
.rwh-segmented i { display: block; min-width: 2px; border-right: 1px solid var(--rwp-bg); }
.rwh-compact-list { margin-top: 18px; }
.rwh-compact-list li { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; color: var(--rwp-muted); border-bottom: 1px solid var(--rwp-line); }
.rwh-compact-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rwh-compact-list strong { color: var(--rwp-text); font-family: var(--rui-font-editorial); font-size: 17px; font-weight: 400; }
.rwh-attention-list li { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 14px; align-items: center; min-height: 58px; border-bottom: 1px solid var(--rwp-line); }
.rwh-attention-list strong,.rwh-attention-list small { display: block; }
.rwh-attention-list small { margin-top: 3px; color: var(--rwp-muted); }
.rwh-attention-list b { font-family: var(--rui-font-editorial); font-size: 22px; font-weight: 400; }

.rwh-treemap { display: flex; min-height: 230px; gap: 7px; align-items: stretch; }
.rwh-treemap > a,.rwh-treemap > span { position: relative; display: flex; min-width: 118px; flex: var(--share) 1 0; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 20px; color: var(--rwp-text); text-decoration: none; background: color-mix(in srgb,var(--tone) 28%,var(--rwp-bg-soft)); border: 1px solid color-mix(in srgb,var(--tone) 48%,transparent); }
.rwh-treemap > a::before,.rwh-treemap > span::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: var(--tone); }
.rwh-treemap strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-treemap b { margin-top: 9px; font-family: var(--rui-font-editorial); font-size: clamp(23px,2.4vw,34px); font-weight: 400; }
.rwh-treemap small { margin-top: 4px; color: var(--rwp-muted); }
.rwh-treemap > a:hover { filter: brightness(1.15); }
.rwh-treemap > a:focus-visible { outline: 2px solid var(--rwp-gold); outline-offset: 3px; }
.rwh-reading { margin: -8px 0 22px; color: var(--rwp-muted); }
.rwh-reading strong { color: var(--rwp-text); font-family: var(--rui-font-editorial); font-size: 27px; font-weight: 400; }
.rwh-bars li a { display: grid; grid-template-columns: minmax(90px,140px) minmax(100px,1fr) 58px; gap: 14px; align-items: center; min-height: 45px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--rwp-line); }
.rwh-bars span { overflow: hidden; color: var(--rwp-text); text-overflow: ellipsis; white-space: nowrap; }
.rwh-bars i { height: 4px; overflow: hidden; background: rgba(255,255,255,.055); }
.rwh-bars i b { display: block; height: 100%; min-width: 2px; }
.rwh-bars li strong { font-family: var(--rui-font-editorial); font-size: 16px; font-weight: 400; text-align: right; }

.rwh-bullets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(28px,4vw,64px); }
.rwh-bullets article { min-width: 0; }
.rwh-bullets article > strong { display: block; margin: 14px 0 7px; font-family: var(--rui-font-editorial); font-size: clamp(30px,3.3vw,46px); font-weight: 400; }
.rwh-bullets article > p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rwh-bullets article > i { display: block; height: 4px; margin: 15px 0 8px; overflow: hidden; background: rgba(255,255,255,.055); }
.rwh-bullets article > i b { display: block; height: 100%; background: var(--rwp-gold); }
.rwh-bullets small { color: var(--rwp-muted); }
.rwh-limitations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 12px 0 42px; }
.rwh-limitations article { display: flex; min-height: 190px; flex-direction: column; padding: 22px; background: var(--rwh-panel); border: 1px solid var(--rwp-line); border-radius: var(--rui-radius-md); }
.rwh-limitations h3 { margin-top: 12px; font-family: var(--rui-font-editorial); font-size: 21px; font-weight: 400; }
.rwh-limitations p { margin-top: 9px; color: var(--rwp-muted); font-size: 12px; line-height: 1.55; }
.rwh-state { align-self: flex-start; margin-top: auto; padding: 4px 9px; color: var(--rwp-muted); font-size: 10px; border: 1px solid var(--rwp-line); border-radius: var(--rui-radius-pill); }
.rwh-accounts { margin-bottom: 28px; }
.rwh-table-card { margin: 0; }
.rw-premium .rwh-accounts,.rw-premium .rwh-table-card { color: var(--rwp-text); background: var(--rwh-panel); border-color: var(--rwp-line); box-shadow: none; }
.rw-premium .rwh-accounts .rw-tabela thead th,.rw-premium .rwh-table-card .rw-tabela thead th { color: var(--rwp-muted); background: rgba(255,255,255,.035); }
.rw-premium .rwh-accounts .rw-tabela tbody td,.rw-premium .rwh-table-card .rw-tabela tbody td { color: var(--rwp-text); border-color: var(--rwp-line); }
.rw-premium .rwh-accounts .rw-tabela tbody tr:nth-child(even),.rw-premium .rwh-table-card .rw-tabela tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
#rw-evolucao-cliente:empty { display: none; }
#rw-spark-cliente:empty::after { display: flex; min-height: 70px; align-items: center; color: var(--rwp-muted); font-size: 12px; content: "Série real disponível"; border-bottom: 1px solid var(--rwp-line); }
.rwh-series-fallback { display: flex; min-height: 190px; align-items: flex-end; gap: 1px; padding: 20px 0; border-bottom: 1px solid var(--rwp-line); }
.rwh-series-fallback li { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 5px; padding: 16px 8px; color: var(--rwp-muted); border-top: 2px solid var(--rwp-gold); }
.rwh-series-fallback li::before { position: absolute; top: -5px; left: 50%; width: 8px; height: 8px; content: ""; background: var(--rwp-gold); border-radius: 50%; transform: translateX(-50%); }
.rwh-series-fallback strong { overflow: hidden; color: var(--rwp-text); font-family: var(--rui-font-editorial); font-size: 14px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.rwh-series-fallback span { font-size: 10px; }
.rwh-table-card #tabela:empty { display: none; }

/* Visao Completa: cockpit patrimonial de alta densidade. Os paineis usam a
   mesma superficie, tipografia e estados do Foundation; nao formam um novo
   sistema de cards. */
.rwh-complete-overview {
  display: grid; grid-template-columns: minmax(300px,5fr) minmax(290px,4fr) minmax(220px,3fr);
  gap: clamp(24px,3vw,48px); align-items: center; padding: 46px 0 34px;
  border-bottom: 1px solid var(--rwp-line);
}
.rwh-complete-value h2 { margin: 8px 0 6px; overflow: hidden; font-family: var(--rui-font-editorial); font-size: clamp(36px,3vw,48px); font-weight: 400; line-height: 1; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.rwh-complete-value p,.rwh-complete-trajectory p { color: var(--rwp-muted); font-size: 11px; }
.rwh-complete-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.rwh-complete-kpis div { min-width: 0; padding-left: 14px; border-left: 1px solid var(--rwp-line); }
.rwh-complete-kpis dt { overflow: hidden; color: var(--rwp-muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.rwh-complete-kpis dd { margin-top: 7px; font-family: var(--rui-font-editorial); font-size: clamp(24px,2.6vw,36px); }
.rwh-complete-trajectory { min-width: 0; padding-left: 18px; border-left: 1px solid var(--rwp-line); }
.rwh-complete-trajectory > strong { display: block; margin: 9px 0 1px; font-family: var(--rui-font-editorial); font-size: 36px; font-weight: 400; }
.rwh-complete-trajectory .rwp-spark { height: 72px; margin-top: 4px; }
.rwh-complete-trajectory .rwp-spark-single { min-height: 48px; padding-top: 14px; }
.rwh-complete-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 14px; padding-top: 14px; }
.rwh-complete-grid--secondary { padding-bottom: 14px; }
.rwh-complete-span-3 { grid-column: span 3; }
.rwh-complete-span-4 { grid-column: span 4; }
.rwh-complete-span-5 { grid-column: span 5; }
.rwh-complete-panel { min-width: 0; padding: 20px; background: var(--rwh-panel); border: 1px solid var(--rwp-line); border-radius: var(--rui-radius-md); }
.rwh-complete-panel > header { display: flex; min-height: 42px; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.rwh-complete-panel h2 { margin-top: 4px; font-family: var(--rui-font-editorial); font-size: clamp(20px,2vw,27px); font-weight: 400; line-height: 1.05; }
.rwh-panel-meta { color: var(--rwp-muted); font-size: 10px; line-height: 1.4; text-align: right; }
.rwh-bars--dense li a,.rwh-bar-row { display: grid; grid-template-columns: minmax(90px,140px) minmax(72px,1fr) 52px; min-height: 36px; gap: 10px; align-items: center; color: inherit; text-decoration: none; border-bottom: 1px solid var(--rwp-line); }
.rwh-bars--dense span { font-size: 11px; }
.rwh-complete-bullets { display: grid; gap: 8px; }
.rwh-complete-bullets article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 12px; padding-bottom: 9px; border-bottom: 1px solid var(--rwp-line); }
.rwh-complete-bullets article > span { overflow: hidden; color: var(--rwp-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.rwh-complete-bullets strong { grid-row: span 2; font-family: var(--rui-font-editorial); font-size: 22px; font-weight: 400; }
.rwh-complete-bullets small { overflow: hidden; color: var(--rwp-text); text-overflow: ellipsis; white-space: nowrap; }
.rwh-complete-bullets i { grid-column: 1 / -1; height: 2px; overflow: hidden; background: rgba(255,255,255,.05); }
.rwh-complete-bullets i b { display: block; height: 100%; background: var(--rwp-gold); }
.rwh-complete-ranking li { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 9px; align-items: center; min-height: 42px; border-bottom: 1px solid var(--rwp-line); }
.rwh-complete-ranking li > span { color: var(--rwp-muted); font-family: var(--rui-font-mono); font-size: 9px; }
.rwh-complete-ranking div { min-width: 0; }
.rwh-complete-ranking div strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-complete-ranking div i { display: block; height: 2px; margin-top: 6px; overflow: hidden; background: rgba(255,255,255,.05); }
.rwh-complete-ranking div i b { display: block; height: 100%; background: var(--rwp-gold); }
.rwh-complete-ranking li > small { max-width: 112px; overflow: hidden; color: var(--rwp-muted); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.rwh-delta-hero { color: var(--rwp-gold); font-variant-numeric: tabular-nums; }
.rwh-delta-strip { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-bottom: 1px solid var(--rwp-line); }
.rwh-delta-strip article { min-width: 0; padding: 18px 16px 17px; border-left: 1px solid var(--rwp-line); }
.rwh-delta-strip article:first-child { padding-left: 0; border-left: 0; }
.rwh-delta-strip span,.rwh-delta-strip small { display: block; overflow: hidden; color: var(--rwp-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-delta-strip span { letter-spacing: .1em; text-transform: uppercase; }
.rwh-delta-strip strong { display: block; margin: 6px 0 3px; font-family: var(--rui-font-editorial); font-size: clamp(18px,2vw,26px); font-weight: 400; font-variant-numeric: tabular-nums; }
.rwh-delta-strip article[data-direction="alta"] strong { color: var(--rwp-gold); }
.rwh-delta-strip article[data-direction="baixa"] strong { color: var(--rui-color-info); }
.rwh-index-stack { display: flex; height: 8px; overflow: hidden; background: rgba(255,255,255,.04); border-radius: var(--rui-radius-pill); }
.rwh-index-stack i { display: block; min-width: 2px; height: 100%; }
.rwh-index-legend { display: grid; gap: 0; margin-top: 15px; }
.rwh-index-legend li { display: grid; grid-template-columns: 7px minmax(0,1fr) 42px 62px; min-height: 34px; gap: 8px; align-items: center; border-bottom: 1px solid var(--rwp-line); }
.rwh-index-legend li > i { width: 7px; height: 7px; border-radius: 50%; }
.rwh-index-legend span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-index-legend strong,.rwh-index-legend small { font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.rwh-index-legend small { color: var(--rwp-muted); }
.rwh-missing-note { margin-top: 12px; padding-top: 10px; color: var(--rwp-muted); font-size: 9px; border-top: 1px solid var(--rwp-line); }
.rwh-maturity { display: grid; grid-template-columns: repeat(auto-fit,minmax(42px,1fr)); min-height: 210px; gap: 7px; align-items: end; }
.rwh-maturity li { display: grid; grid-template-rows: 116px auto minmax(25px,auto) auto; min-width: 0; gap: 5px; text-align: center; }
.rwh-maturity li > div { display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--rwp-line); }
.rwh-maturity li > div i { display: block; width: min(26px,70%); min-height: 2px; background: linear-gradient(180deg,var(--rwp-gold),rgba(201,162,74,.34)); border-radius: 3px 3px 0 0; }
.rwh-maturity li.is-undated > div i { background: var(--rwp-muted); opacity: .65; }
.rwh-maturity strong { font-family: var(--rui-font-editorial); font-size: 16px; font-weight: 400; font-variant-numeric: tabular-nums; }
.rwh-maturity span { color: var(--rwp-text); font-size: 9px; line-height: 1.25; }
.rwh-maturity small { color: var(--rwp-muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.rwh-custody-legend { display: grid; margin-top: 15px; }
.rwh-custody-legend li { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rwp-line); }
.rwh-custody-legend span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-custody-legend strong { font-family: var(--rui-font-editorial); font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums; }
.rwh-dotplot { display: grid; }
.rwh-dotplot li { display: grid; grid-template-columns: minmax(82px,1fr) minmax(70px,1.2fr) 42px 62px; min-height: 38px; gap: 9px; align-items: center; border-bottom: 1px solid var(--rwp-line); }
.rwh-dotplot li > span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-dotplot li > i { position: relative; height: 1px; background: rgba(255,255,255,.1); }
.rwh-dotplot li > i b { position: absolute; top: 50%; width: 7px; height: 7px; background: var(--rwp-gold); border: 2px solid var(--rwh-panel); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 0 1px var(--rwp-gold); }
.rwh-dotplot strong,.rwh-dotplot small { font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.rwh-dotplot small { color: var(--rwp-muted); }
.rwh-movements { margin: 0 0 14px; }
.rwh-diverging { display: grid; }
.rwh-diverging li { display: grid; grid-template-columns: minmax(150px,1.2fr) minmax(180px,2fr) 110px 62px; min-height: 39px; gap: 12px; align-items: center; border-bottom: 1px solid var(--rwp-line); }
.rwh-diverging li > span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-diverging li > div { position: relative; height: 12px; background: linear-gradient(90deg,transparent 49.8%,rgba(255,255,255,.18) 50%,transparent 50.2%); }
.rwh-diverging li > div i { position: absolute; top: 4px; display: block; width: 50%; height: 4px; background: var(--rwp-gold); }
.rwh-diverging li.is-positivo > div i { left: 50%; transform-origin: left; }
.rwh-diverging li.is-negativo > div i { right: 50%; background: var(--rui-color-info); transform-origin: right; }
.rwh-diverging li > strong { font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.rwh-diverging li > small { color: var(--rwp-muted); font-size: 9px; text-transform: capitalize; }
.rwh-entity-list li,.rwh-entity-list li > a { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 18px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--rwp-line); }
.rwh-entity-list li > a { width: 100%; border-bottom: 0; }
.rwh-entity-list span { min-width: 0; }
.rwh-entity-list strong,.rwh-entity-list small,.rwh-entity-list b { display: block; }
.rwh-entity-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rwh-entity-list small { margin-top: 2px; color: var(--rwp-muted); font-size: 9px; }
.rwh-entity-list b { font-family: var(--rui-font-editorial); font-size: 14px; font-weight: 400; text-align: right; white-space: nowrap; }
.rwh-compact-list--dense { margin-top: 12px; }
.rwh-compact-list--dense li { padding: 6px 0; font-size: 10px; }
.rwh-compact-list--dense strong { font-size: 14px; }
.rwh-complete-grid-preview { margin: 0 0 34px; }
.rwh-complete-grid-preview > header { align-items: center; margin-bottom: 6px; }
.rwh-complete-actions { display: flex; align-items: center; gap: 14px; }
.rwh-complete-grid-preview .rui-data-grid { margin-top: 14px; }
.rwh-complete-grid-preview .rw-tabela-wrap { margin-top: 14px; }

@media (max-width: 1100px) {
  .rwh-view-tab span { display: none; }
  .rwh-view-tab { min-height: 52px; }
  .rwh-view-tab strong { font-size: 15px; }
  .rwh-summary-grid,.rwh-analysis-grid { grid-template-columns: 1fr; gap: 0; }
  .rwh-treemap { min-height: 200px; overflow-x: auto; }
  .rwh-complete-overview { grid-template-columns: minmax(300px,7fr) minmax(250px,5fr); }
  .rwh-complete-kpis { grid-column: 1 / -1; grid-row: 2; }
  .rwh-complete-span-5,.rwh-complete-span-4 { grid-column: span 6; }
  .rwh-complete-span-3 { grid-column: span 12; }
  .rwh-complete-bullets { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
  .rwh-delta-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .rwh-delta-strip article:nth-child(4) { padding-left: 0; border-left: 0; }
  .rwh-maturity { overflow-x: auto; }
}
@media (max-width: 760px) {
  .rwh-view-nav { position: static; display: flex; overflow-x: auto; }
  .rwh-view-tab { min-width: 170px; border-top: 0; }
  .rwh-glance,.rwh-bullets,.rwh-limitations { grid-template-columns: 1fr; }
  .rwh-glance { gap: 18px; }
  .rwh-treemap { flex-direction: column; }
  .rwh-treemap > a,.rwh-treemap > span { min-height: 110px; flex-basis: auto; }
  .rwh-complete-overview { grid-template-columns: 1fr; padding-top: 34px; }
  .rwh-complete-kpis { grid-column: auto; grid-row: auto; }
  .rwh-complete-span-5,.rwh-complete-span-4,.rwh-complete-span-3 { grid-column: span 12; }
  .rwh-complete-bullets { grid-template-columns: 1fr; }
  .rwh-complete-grid-preview { padding-right: 14px; padding-left: 14px; }
  .rwh-complete-actions { align-items: flex-end; flex-direction: column; gap: 8px; }
  .rwh-delta-strip { grid-template-columns: 1fr 1fr; }
  .rwh-delta-strip article:nth-child(odd) { padding-left: 0; border-left: 0; }
  .rwh-index-legend li { grid-template-columns: 7px minmax(0,1fr) 42px; }
  .rwh-index-legend small { display: none; }
  .rwh-diverging { overflow-x: auto; }
  .rwh-diverging li { min-width: 620px; }
}
