.nav-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: width 0.22s ease, padding 0.22s ease;
  overflow-x: hidden;
}
.nav-sidebar.collapsed {
  width: 118px !important;
  padding: 0.85rem 0.65rem;
}
.nav-sidebar.expanded {
  width: 248px !important;
  padding: 1.15rem 1rem;
}
.nav-brand-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  min-width: 0;
}
.nav-sidebar.collapsed .nav-brand-row {
  flex-direction: row;
  align-items: flex-start;
}
.nav-sidebar.expanded .nav-brand-row {
  margin-bottom: 0.85rem;
}
.nav-toggle {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid #2a3a4f;
  border-radius: 9px;
  background: linear-gradient(180deg, #172030 0%, #121a24 100%);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.nav-toggle:hover {
  color: #f8fafc;
  border-color: #3d5168;
  background: #1a2636;
}
.nav-brand-title {
  margin: 0 !important;
  font-size: 0.88rem !important;
  line-height: 1.15;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
}
.nav-sidebar.expanded .nav-brand-title {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.28rem;
  font-size: 1.08rem !important;
  line-height: 1.2;
}
.nav-brand-line {
  display: block;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.nav-sidebar.expanded .nav-brand-line {
  display: inline;
}
.nav-sidebar .nav-menu {
  display: none;
  padding-top: 0.15rem;
  border-top: 1px solid #1e2a3a;
  margin-top: 0.1rem;
}
.nav-sidebar.expanded .nav-menu {
  display: block;
}
.nav-sidebar .nav-menu a {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.32;
  hyphens: none;
  font-size: 0.9rem;
  padding: 0.5rem 0.65rem;
}
.nav-sidebar .nav-menu a.active {
  border-left: 2px solid var(--accent, #22c55e);
  padding-left: calc(0.65rem - 2px);
}
.bal-pl-total { font-weight: 700; }
.bal-label-sub { padding-left: 0.85rem !important; font-size: 0.82rem; color: #8fa3bf; }
.tx-liq-cell { font-size: 0.82rem; white-space: nowrap; }
.tx-liq-pendente time { color: #fbbf24; }
.tx-liq-ok time { color: #86efac; }
.tx-liq-tag {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.62rem;
  color: #fbbf24;
  font-weight: 600;
  text-transform: uppercase;
}
.app-indicador-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: #94a3b8;
  border-left: 2px solid #334155;
  padding-left: 0.55rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.tag { display: inline-block; padding: 0.2rem 0.45rem; border-radius: 4px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.tag-compra { background: #14532d; color: #86efac; }
.tag-venda { background: #7f1d1d; color: #fca5a5; }
.tag-lucro { background: #14532d; color: #4ade80; border: 1px solid #22c55e; }
.tag-neutro { background: #1e2a3a; color: #94a3b8; }
.tag-ifr-alto { background: #1e3a5f; color: #93c5fd; border: 1px solid #2563eb; }
.tag-reciclar,
.tag-timeout { background: #422006; color: #fde68a; border: 1px solid #b45309; }
.col-hold.hold-warn, .col-dias.dias-warn { color: #fdba74; }
.col-hold.hold-timeout, .col-dias.dias-timeout { color: #fca5a5; font-weight: 700; }
.sinal-col { text-align: center; }
.sinal-cell { font-size: 0.82rem; color: #8fa3bf; white-space: nowrap; }
.toolbar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.papel-col { white-space: nowrap; }
.prov-radar {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  background: #1e3a5f;
  color: #fbbf24;
  font-size: 0.58rem;
  font-weight: 700;
  vertical-align: middle;
  cursor: help;
  line-height: 1.2;
}
.prov-radar.prov-proximo { background: #422006; color: #fdba74; }
.prov-radar.prov-urgente,
.prov-radar.prov-cal-alert { background: #7c2d12; color: #fef08a; animation: prov-pulse 1.5s ease-in-out infinite; }
#cot-view-agenda .agenda-prov-head { flex-shrink: 0; margin-bottom: 0.35rem; }
#cot-view-agenda .agenda-prov-head-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.agenda-prov-title-wrap { display: flex; align-items: center; gap: 0.35rem; }
.agenda-prov-title-wrap h3 { margin: 0; }
#cot-view-agenda .agenda-prov-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.agenda-mod-toggle { display: inline-flex; border: 1px solid #334155; border-radius: 6px; overflow: hidden; }
.agenda-mod-btn {
  padding: 0.35rem 0.65rem; font-size: 0.72rem; background: #1e293b; color: #94a3b8; border: none; cursor: pointer;
}
.agenda-mod-btn:hover { background: #273449; color: #e2e8f0; }
.agenda-mod-btn.active { background: #14532d; color: #bbf7d0; font-weight: 600; }
.agenda-prov-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: #0f172a; color: #94a3b8; font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  border-bottom: 1px solid #334155;
}
#cot-view-agenda h3 { font-size: 0.9rem; margin: 0; color: #e2e8f0; font-weight: 600; }
#cot-view-agenda .agenda-prov-meta { margin: 0.15rem 0 0; font-size: 0.78rem; }
.agenda-prov-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-top: 0.55rem;
}
.agenda-prov-busca {
  min-width: 10rem;
  flex: 1 1 10rem;
  max-width: 16rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.82rem;
}
.agenda-prov-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
}
.agenda-prov-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.agenda-prov-table th.sortable:hover { color: #e8eef7; }
.agenda-prov-table th.sort-active { color: #e2e8f0; }
.agenda-prov-table .sort-arrow { margin-left: 0.2rem; font-size: 0.58rem; opacity: 0.85; }
.dre-row-proventos .dre-cel-click { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
#cot-view-agenda .cot-scroll-wrap { flex: 1; min-height: 0; overflow: auto; }
.agenda-prov-table tr.agenda-prov-urgente td { background: rgba(124, 45, 18, 0.18); }
.agenda-prov-table .num { text-align: right; white-space: nowrap; }
.agenda-cart-badge { margin-left: 0.25rem; font-size: 0.62rem; vertical-align: middle; }
@keyframes prov-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
.cot-resumo-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.cot-cockpit-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.cot-kpi-compact .card {
  padding: 0.28rem 0.5rem;
  min-height: 0;
}
.cot-kpi-compact .label {
  font-size: 0.62rem;
  line-height: 1.15;
  margin-bottom: 0.04rem;
  color: #7a94b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cot-kpi-compact .value {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}
.cot-kpi-compact .cot-pl-pct { font-size: 0.68rem; }
.card-kpi-click {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.card-kpi-click:hover,
.card-kpi-click:focus-visible {
  border-color: #3b82f6;
  outline: none;
  background: #152030;
}
.modal-quarentena-box { width: min(420px, 96vw); }
.modal-quarentena-body { padding: 0.65rem 1rem 1rem; }
.modal-quarentena-hint { margin: 0 0 0.5rem; font-size: 0.78rem; }
.modal-quarentena-table-wrap { max-height: 50vh; overflow: auto; }
#cot-view-destaques .destaques-toolbar { margin-top: 0; }
@media (max-width: 1100px) {
  .cot-resumo-cards { grid-template-columns: repeat(3, 1fr); }
  .cot-cockpit-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .cot-resumo-cards { grid-template-columns: repeat(2, 1fr); }
  .cot-cockpit-cards { grid-template-columns: 1fr; }
}
.cot-cockpit-cards .card {
  border-color: #243044;
  background: linear-gradient(180deg, #141c28 0%, #101820 100%);
}
.cot-kpi-compact .value.positive { color: #4ade80; }
.cot-kpi-compact .value.negative { color: #f87171; }
.cot-kpi-compact .value.cock-warn { color: #fbbf24; }
.inv-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}
.inv-page-head h2 { margin: 0 0 0.2rem; }
.inv-page-head .msg { margin: 0; }
.inv-perfil-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(180deg, #121a24 0%, #0f1520 100%);
  border: 1px solid #1e2a3a;
  border-radius: 10px;
}
.inv-perfil-bar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  min-width: 0;
}
.inv-perfil-bar label { font-size: 0.82rem; color: #8fa3bf; margin-right: 0.1rem; white-space: nowrap; }
.inv-perfil-bar select {
  min-width: 160px;
  max-width: 220px;
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #1e2a3a;
  background: #0f1520;
  color: #e8eef7;
}
.inv-perfil-bar .inv-perfil-del { color: #f87171; border-color: #3f1f1f; }
.inv-perfil-bar .inv-save-inline {
  min-width: 8.5rem;
  flex-shrink: 0;
  padding: 0.48rem 0.85rem;
  font-size: 0.82rem;
}
.inv-perfil-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
}
.cotacao-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-bottom: 0.35rem;
  min-height: 1.85rem;
}
.cotacao-head-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}
.cotacao-head-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  margin-left: auto;
}
.cotacao-head-actions button,
.cot-export-csv {
  padding: 0.38rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
.cot-export-csv {
  text-decoration: none;
  color: inherit;
  background: #1e2a3a;
  border-radius: 8px;
  border: none;
  font-weight: 600;
}
.cotacao-head-actions .cot-atualizado-em { font-size: 0.68rem; margin-left: 0.1rem; }
.cotacao-head-actions .cot-help-wrap { margin-left: 0; }
.cot-atualizado-em {
  font-size: 0.68rem;
  color: #64748b;
  white-space: nowrap;
}
.cot-help-wrap {
  position: relative;
}
.cot-help-btn {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1px solid #334155;
  background: #141c28;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: help;
  line-height: 1;
  padding: 0;
}
.cot-help-btn:hover,
.cot-help-wrap:focus-within .cot-help-btn {
  color: #e2e8f0;
  border-color: #475569;
  background: #1e2a3a;
}
.cot-help-pop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 40;
  width: 17rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f1520;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.68rem;
  line-height: 1.45;
  color: #94a3b8;
  text-align: left;
}
.cot-help-pop p { margin: 0 0 0.35rem; }
.cot-help-pop p:last-child { margin-bottom: 0; }
.cot-help-pop strong { color: #cbd5e1; font-weight: 600; }
.cot-help-wrap:hover .cot-help-pop,
.cot-help-wrap:focus-within .cot-help-pop { display: block; }
.cot-setor-expo { margin-bottom: 0.55rem; }
.cot-setor-bars {
  display: flex;
  height: 1.1rem;
  border-radius: 6px;
  overflow: hidden;
  background: #0f1520;
  border: 1px solid #1e2a3a;
}
.cot-setor-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: #e2e8f0;
  background: #1e3a5f;
  min-width: 2px;
}
.cot-setor-bar-warn {
  background: #dc2626;
  animation: cot-setor-pulse 1.8s ease-in-out infinite;
}
@keyframes cot-setor-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.cot-setor-leg-warn { color: #f87171; font-weight: 600; }
.cot-setor-legs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: #8fa3bf;
}
.cot-setor-leg { white-space: nowrap; }
.cotacao-table .col-setor {
  width: 5%;
  font-size: 0.82rem;
  color: #94a3b8;
}
.cotacao-table .tag-warn { background: #422006; color: #fdba74; border: 1px solid #7c2d12; }
.rr-neutro { color: #64748b; font-weight: 500; }
.rr-stop-curto { color: #38bdf8; font-weight: 600; }
.cot-resumo-cards .value.positive { color: #4ade80; }
.cot-resumo-cards .value.negative { color: #f87171; }
.cot-pl-pct { font-size: 0.85rem; font-weight: 500; margin-left: 0.25rem; }
.cot-count { color: #8fa3bf; font-size: 0.85rem; font-weight: 500; }
.cot-subtabs { display: flex; gap: 0.35rem; margin-bottom: 0.5rem; border-bottom: 1px solid #1e2a3a; padding-bottom: 0.35rem; flex-shrink: 0; }
.cot-subtab {
  padding: 0.45rem 0.85rem; border: none; border-radius: 6px 6px 0 0;
  background: transparent; color: #8fa3bf; cursor: pointer; font-size: 0.85rem; font-weight: 600;
}
.cot-subtab:hover { color: #e8eef7; background: #141c28; }
.cot-subtab.active { color: #86efac; background: #14532d33; border-bottom: 2px solid #22c55e; }
.cot-subview { display: none; }
.cot-subview.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#cot-view-planilha .cot-resumo-cards,
#cot-view-planilha .cotacao-head { flex-shrink: 0; }
#cot-view-planilha .cotacao-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
#cot-view-mercado .im-ranking-grid { flex: 1; min-height: 0; }
#cot-view-destaques .destaques-toolbar,
#cot-view-destaques .destaques-grafico-wrap,
#cot-view-destaques .destaques-caixa-meta { flex-shrink: 0; }
#cot-view-destaques .cot-scroll-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.sug-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 0.75rem; }
@media (max-width: 700px) { .sug-cards { grid-template-columns: repeat(2, 1fr); } }
#cot-view-destaques h3,
#cot-view-mercado h3,
#cot-view-setores h3 { font-size: 0.9rem; margin: 0; color: #e2e8f0; font-weight: 600; }
#cot-view-setores .cot-setores-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.cot-setores-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr);
  gap: 1rem;
  align-items: stretch;
}
.cot-setores-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}
.cot-setores-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem;
  flex-shrink: 0;
}
.cot-setores-carteira-meta,
.cot-setores-mercado-meta {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
}
.cot-setores-carteira .cot-setores-table-wrap {
  flex: 1;
  min-height: 0;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
}
.cot-setores-table th,
.cot-setores-table td {
  font-size: 0.82rem;
  padding: 0.5rem 0.55rem;
}
.cot-setores-table tbody tr:nth-child(even) td { background: #0c121c; }
.cot-setores-table .setor-nome-cell { min-width: 5.5rem; white-space: nowrap; }
.cot-setores-table .setor-pct-cell { min-width: 6rem; width: 38%; }
.setor-pct-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.setor-pct-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.setor-pct-bar {
  display: block;
  height: 0.28rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  max-width: 100%;
}
.cot-setores-merc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}
.cot-setores-merc-grid .compact-table { width: 100%; }
.cot-setores-merc-grid .panel-table-wrap {
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: auto;
  max-height: min(52vh, 28rem);
}
@media (max-width: 900px) {
  .cot-setores-layout { grid-template-columns: 1fr; }
  .cot-setores-merc-grid { grid-template-columns: 1fr; }
}
.im-sub { font-size: 0.72rem; font-weight: 500; color: #64748b; }
.im-ranking-altas-label { color: #4ade80; font-weight: 600; }
.im-ranking-baixas-label { color: #f87171; font-weight: 600; }
.im-ranking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.im-ranking-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.im-ranking-col h3 { margin-bottom: 0.5rem; flex-shrink: 0; }
.im-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.im-table-wrap::-webkit-scrollbar { width: 6px; }
.im-table-wrap::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
.im-table-wrap::-webkit-scrollbar-track { background: transparent; }
.im-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.im-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #141c28;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #334155;
  text-align: left;
}
.im-table thead th:nth-child(n+2) { text-align: right; }
.im-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #1e2a3a;
  vertical-align: middle;
}
.im-table tbody tr:last-child td { border-bottom: none; }
.im-table tbody tr:hover td { background: #141c28; }
.im-ativo b { color: #60a5fa; font-weight: 600; }
.im-setor {
  display: block;
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 400;
  margin-top: 0.1rem;
}
.im-preco { font-variant-numeric: tabular-nums; color: #e8eef7; }
.im-var { font-variant-numeric: tabular-nums; font-weight: 600; }
.im-empty { text-align: center; color: #64748b; padding: 1.5rem !important; }
.setor-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #60a5fa;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.setor-link:hover { color: #93c5fd; text-decoration-color: #93c5fd; }
.setor-link.var-neg { color: #f87171; }
.setor-link.var-neg:hover { color: #fca5a5; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay[hidden] { display: none; }
body.modal-open { overflow: hidden; }
.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: min(480px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 1rem; color: #e8eef7; }
.modal-close {
  background: none;
  border: none;
  color: #8fa3bf;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}
.modal-close:hover { color: #e8eef7; }
.modal-body { overflow: auto; padding: 0; }
.modal-dialog-overlay { z-index: 1100; }
.modal-dialog-box {
  width: min(400px, 100%);
  border: 1px solid #334155;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.modal-dialog-box.modal-dialog--success { border-color: #166534; }
.modal-dialog-box.modal-dialog--error { border-color: #991b1b; }
.modal-dialog-box.modal-dialog--confirm { border-color: #475569; }
.modal-dialog-box .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid var(--border);
}
.app-dialog-head-inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.app-dialog-icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}
.modal-dialog--success .app-dialog-icon { background: #14532d; color: #4ade80; }
.modal-dialog--error .app-dialog-icon { background: #450a0a; color: #f87171; }
.modal-dialog--confirm .app-dialog-icon { background: #1e293b; color: #94a3b8; }
.modal-dialog--info .app-dialog-icon { background: #1e3a5f; color: #60a5fa; }
.app-dialog-body { padding: 1rem 1rem 0.85rem; }
.app-dialog-message {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
}
.app-dialog-field {
  display: block;
  margin-top: 0.75rem;
}
.app-dialog-field[hidden] { display: none !important; }
.app-dialog-field input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f1520;
  color: #f1f5f9;
  font-size: 0.9rem;
}
.app-dialog-field input:focus {
  outline: none;
  border-color: #22c55e;
}
.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
}
#app-dialog-cancel[hidden] { display: none !important; }
.app-dialog-actions button { min-width: 5.5rem; }
.modal-setor-box {
  width: min(620px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
}
.modal-setor-head-row {
  align-items: flex-start;
  gap: 0.75rem;
}
.modal-setor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
  flex: 1;
}
.modal-setor-head h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.modal-setor-badge {
  display: inline-block;
  width: fit-content;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ms-badge-carteira {
  background: #14532d44;
  color: #86efac;
  border: 1px solid #166534;
}
.ms-badge-mercado {
  background: #1e3a5f44;
  color: #93c5fd;
  border: 1px solid #1d4ed8;
}
.modal-setor-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: #0f1520;
  border-bottom: 1px solid #1e2a3a;
}
.modal-setor-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.modal-setor-kpi-wide { grid-column: 1 / -1; }
.modal-setor-kpi-lbl {
  font-size: 0.62rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal-setor-kpi-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8eef7;
  font-variant-numeric: tabular-nums;
}
.modal-setor-body {
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.modal-setor-table-wrap {
  max-height: min(52vh, 420px);
  overflow: auto;
}
@media (max-width: 520px) {
  .modal-setor-kpis { grid-template-columns: repeat(2, 1fr); }
}
.ms-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ms-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #141c28;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #334155;
  text-align: left;
}
.ms-table thead th.num { text-align: right; }
.ms-table tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #1e2a3a;
  vertical-align: middle;
  font-size: 0.82rem;
}
.ms-table tbody tr:last-child td { border-bottom: none; }
.ms-table tbody tr:hover td { background: #141c28; }
.ms-table tfoot td {
  padding: 0.65rem 1rem;
  border-top: 2px solid #334155;
  background: #0f1520;
  font-size: 0.82rem;
}
.ms-table tfoot td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ms-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ms-table .ms-papel { width: 28%; }
.ms-table .ms-setor { width: 18%; }
.ms-table .ms-val { width: 26%; }
.ms-table .ms-preco { width: 24%; }
.ms-table .ms-var { width: 20%; }
.ms-ranking-table .ms-papel { width: 26%; }
.ms-ranking-table .ms-setor { width: 20%; }
.ms-ranking-table .ms-preco { width: 26%; }
.ms-ranking-table .ms-var { width: 28%; }
.ms-papel b { color: #60a5fa; font-weight: 600; font-size: 0.88rem; }
.ms-setor {
  color: #94a3b8;
  font-size: 0.75rem;
  white-space: nowrap;
}
.ms-val { color: #cbd5e1; font-weight: 500; }
.ms-preco { color: #e8eef7; font-weight: 600; }
.ms-var { font-weight: 600; }
.ms-empty {
  text-align: center;
  color: #64748b;
  padding: 2rem 1rem !important;
}
@media (max-width: 768px) {
  .im-ranking-grid { grid-template-columns: 1fr; }
}
.sug-row-destaque td { background: #14532d22; }
.sug-row-bloq td { opacity: 0.82; }
.sug-destaque-table .tag { margin: 0 0.1rem 0.1rem 0; }
.sug-destaque-table .tag-lucro { animation: prov-pulse 2s ease-in-out infinite; }
.sug-legenda {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem;
  font-size: 0.68rem; color: #64748b; margin-bottom: 0.5rem;
}
.sug-legenda .tag { font-size: 0.62rem; }
.sug-indices-legenda,
.cot-indices-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.68rem;
  color: #64748b;
  margin-bottom: 0.55rem;
  line-height: 1.35;
}
.sug-indices-legenda strong,
.cot-indices-legenda strong { color: #94a3b8; font-weight: 600; }
.destaques-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.dest-help-wrap { margin-left: auto; }
.destaques-view-btns {
  display: inline-flex;
  gap: 0.25rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.2rem;
}
.dest-view-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
}
.dest-view-btn:hover { color: #e2e8f0; }
.dest-view-btn.active { background: #14532d; color: #86efac; }
.destaques-grafico-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  margin-bottom: 0.65rem;
  overflow: visible;
}
.destaques-grafico-meta {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: #8fa3bf;
  text-align: center;
}
.destaques-grafico {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  margin: 0 auto;
}
.destaques-caixa-meta {
  margin: 0 0 0.55rem;
  font-size: 0.76rem;
  color: #94a3b8;
}
.destaques-caixa-meta b.var-pos { color: #4ade80; }
.sug-qtd b { color: #86efac; font-variant-numeric: tabular-nums; }
.sug-qtd-zero { color: #64748b; }
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.68rem;
  color: #64748b;
  margin: 0.65rem 0 0;
  padding: 0 0.25rem;
  line-height: 1.4;
}
.dg-leg-item { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.dg-zona-compra {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  background: #14532d88;
  border: 1px solid #22c55e88;
  border-radius: 2px;
  flex-shrink: 0;
}
.dg-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.dg-dot-ok { background: #4ade80; }
.dg-dot-warn { background: #f87171; }
.dg-point circle { cursor: pointer; transition: stroke-width 0.12s; }
.dg-point:hover circle { stroke: #e2e8f0; stroke-width: 2.5; }
#investidor form h3 { font-size: 0.85rem; margin: 0 0 0.45rem; color: #8fa3bf; font-weight: 600; }
#investidor form h3:first-of-type { margin-top: 0; }
.panel-investidor.active {
  padding-bottom: 0;
  align-items: flex-start;
  overflow: hidden;
}
.panel-investidor h2 { margin: 0 0 0.25rem; font-size: 1.15rem; flex-shrink: 0; }
.panel-investidor > .msg,
.panel-investidor .inv-page-head .msg {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  flex-shrink: 0;
  max-width: 52rem;
  color: #94a3b8;
  line-height: 1.45;
}
.panel-investidor .inv-form {
  max-width: 100%;
  width: 100%;
  display: block;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.inv-shell {
  display: flex;
  flex-direction: column;
  background: #0a1018;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  max-width: 100%;
  height: 100%;
  min-height: 0;
}
.inv-grid-wrap {
  overflow: auto;
  padding: 0.75rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.inv-grid {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  align-items: stretch;
}
.inv-grid-main {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.inv-card-wide {
  width: 100%;
}
@media (max-width: 1024px) {
  .inv-grid-main { grid-template-columns: 1fr; }
}
.inv-card-gestao .inv-gestao-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  align-items: start;
}
@media (max-width: 900px) {
  .inv-card-gestao .inv-gestao-inner { grid-template-columns: 1fr; }
}
.inv-gestao-block {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  background: rgba(15, 21, 32, 0.55);
  border: 1px solid #1a2433;
  border-radius: 8px;
}
.inv-check-grid {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.inv-hint-accent { color: #c9a227; }
.inv-subtitle {
  font-size: 0.68rem;
  color: #7dd3fc;
  margin: 0 0 0.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.inv-card-gestao .inv-check {
  margin-top: 0;
  font-size: 0.74rem;
  line-height: 1.4;
  white-space: normal;
  align-items: flex-start;
}
.inv-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.inv-card-alvo { border-top: 2px solid #3d9a6a; }
.inv-card-gatilho { border-top: 2px solid #4a8fb8; }
.inv-card-tempo { border-top: 2px solid #b8923a; }
.inv-card-gestao { border-top: 2px solid #8b7cb8; }
.inv-card-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.85;
}
.inv-card-alvo .inv-card-dot { color: #3d9a6a; }
.inv-card-gatilho .inv-card-dot { color: #4a8fb8; }
.inv-card-tempo .inv-card-dot { color: #b8923a; }
.inv-card-gestao .inv-card-dot { color: #8b7cb8; }
.inv-card > .inv-fields-row { flex: 1; }
.inv-rr-hint {
  margin: 0.35rem 0 0;
  font-size: 0.66rem;
  line-height: 1.35;
  color: #94a3b8;
}
.inv-rr-hint.inv-rr-ok { color: #86efac; }
.inv-rr-hint.inv-rr-warn { color: #fca5a5; }
.inv-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.inv-fields-row.inv-fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inv-grid-main .inv-fields-compact {
  gap: 0.3rem 0.35rem;
}
.inv-grid-main .inv-fields-compact .inv-field {
  margin-bottom: 0;
  min-width: 0;
}
.inv-grid-main .inv-fields-compact .inv-field label {
  white-space: nowrap;
  font-size: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.14rem;
}
.inv-grid-main .inv-fields-compact .inv-field input {
  padding: 0.38rem 0.42rem;
  font-size: 0.8rem;
}
.inv-grid-main .inv-card h3 {
  white-space: nowrap;
  font-size: 0.74rem;
  margin-bottom: 0.45rem;
}
@media (max-width: 720px) {
  .inv-fields-row,
  .inv-fields-row.inv-fields-3 { grid-template-columns: 1fr; }
  .inv-grid-main .inv-fields-compact .inv-field label { white-space: normal; }
}
.inv-card h3 {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: #f1f5f9;
  margin: 0 0 0.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.inv-hint {
  font-size: 0.68rem;
  color: #64748b;
  margin: 0.2rem 0 0;
  line-height: 1.35;
}
.inv-field { margin-bottom: 0.5rem; }
.inv-field:last-child { margin-bottom: 0; }
.panel-investidor .inv-field label {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}
.panel-investidor .inv-check { white-space: normal; }
.panel-investidor .check-row {
  flex-wrap: wrap;
  gap: 0.4rem;
  color: #cbd5e1;
}
.panel-investidor .check-row input {
  flex-shrink: 0;
  margin-top: 0.12rem;
}
.inv-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  margin-left: 0.15rem;
  border-radius: 50%;
  background: #334155;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 600;
  cursor: help;
  vertical-align: middle;
}
.ir-table th,
.ir-table td { font-size: 0.78rem; }
.ir-table th.num,
.ir-table td.num { white-space: nowrap; }
.inv-field input,
.inv-field textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0a1018;
  border: 1px solid #243044;
  border-radius: 7px;
  color: #e8eef7;
  padding: 0.45rem 0.55rem;
  font-size: 0.84rem;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.inv-field input:hover {
  border-color: #334155;
}
.inv-field input:focus,
.inv-field textarea:focus {
  outline: none;
  border-color: #22c55e;
}
.inv-check { margin-top: 0.25rem; font-size: 0.68rem; }
.inv-save-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  margin-top: 0;
  border-top: 1px solid #1e293b;
  background: #0c1220;
  flex-shrink: 0;
}
.inv-save {
  padding: 0.45rem 1.15rem;
  background: #22c55e;
  color: #052e16;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  width: auto;
  min-width: 10rem;
  max-width: 100%;
  transition: background 0.12s;
}
.inv-save:hover { background: #4ade80; }
#cotacao .cotacao-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.cotacao-table {
  table-layout: fixed;
  width: 100%;
  margin: 0;
  border-radius: 0;
}
.cotacao-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.cotacao-table th.sortable:hover { color: #e8eef7; }
.cotacao-table th.sort-active { color: #86efac; }
.cotacao-table .sort-arrow { font-size: 0.55rem; margin-left: 0.1rem; opacity: 0.85; }
#cotacao form textarea {
  min-height: 4.5rem;
  resize: vertical;
  font-family: inherit;
}
.cotacao-table th,
.cotacao-table td {
  white-space: nowrap;
  font-size: 0.875rem;
  padding: 0.48rem 0.45rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cotacao-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #141c28;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #334155;
  box-shadow: 0 1px 0 #334155;
}
.cotacao-table th {
  font-size: 0.76rem;
  padding: 0.52rem 0.45rem;
  letter-spacing: 0.02em;
}
.cotacao-table td.cot-stack { white-space: normal; text-align: right; }
.cot-stack { line-height: 1.25; text-align: right; }
.cot-stack .cot-main { display: block; font-weight: 600; font-size: 0.875rem; }
.cot-stack .cot-sub { display: block; font-size: 0.72rem; color: #64748b; margin-top: 0.08rem; font-weight: 500; }
.cot-stack .cot-main.positive { color: #22c55e; }
.cot-stack .cot-main.negative { color: #f87171; }
.cot-stack .cot-sub.positive { color: #4ade80; }
.cot-stack .cot-sub.negative { color: #fca5a5; }
.cot-stack .cot-yoc { color: #4ade80; }
.panel-prov h2 { margin: 0; }
.prov-head { margin-bottom: 0.65rem; }
.prov-sync-btn { font-size: 0.78rem; white-space: nowrap; }
.prov-subtabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid #1e2a3a;
  padding-bottom: 0.35rem;
}
.prov-subtab {
  padding: 0.45rem 0.85rem;
  border: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #8fa3bf;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.prov-subtab.active { background: #1e293b; color: #e2e8f0; }
.prov-view[hidden] { display: none !important; }
.prov-resumo-hidden { display: none !important; }
.prov-resumo-cards {
  margin-bottom: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
}
.prov-resumo-cards .card {
  padding: 0.55rem 0.65rem;
}
.prov-resumo-cards .card .label {
  font-size: 0.68rem;
  line-height: 1.25;
}
.prov-resumo-cards .card .value { font-variant-numeric: tabular-nums; font-size: 0.98rem; font-weight: 600; }
.prov-form-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}
.prov-form-block h3 { margin: 0 0 0.65rem; font-size: 0.9rem; color: #cbd5e1; font-weight: 600; }
.prov-form-grid {
  display: grid;
  grid-template-columns:
    minmax(5.5rem, 0.85fr)
    minmax(6.5rem, 0.85fr)
    minmax(7.5rem, 0.95fr)
    minmax(9rem, 1fr)
    minmax(9rem, 1fr)
    auto;
  gap: 0.55rem 0.65rem;
  align-items: end;
}
.prov-form-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  flex-wrap: nowrap;
}
.prov-form-actions button {
  height: 2.35rem;
  margin: 0;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
}
.prov-btn-lancar { min-width: 5.5rem; }
.prov-sync-btn { min-width: 7.5rem; }
.prov-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.prov-field-lbl {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
}
.prov-form input,
.prov-form select {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f1520;
  color: #e2e8f0;
  font-size: 0.85rem;
}
.prov-form input[type="date"] {
  min-width: 0;
  color-scheme: dark;
}
@media (max-width: 1100px) {
  .prov-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .prov-form-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 0.25rem;
  }
}
@media (max-width: 700px) {
  .prov-form-grid { grid-template-columns: 1fr 1fr; }
  .prov-field-valor { grid-column: 1 / -1; }
  .prov-form-actions { grid-column: 1 / -1; }
}
.prov-hint { margin: 0.45rem 0 0; font-size: 0.72rem; }
.prov-hint-click { cursor: pointer; color: #86efac; }
.prov-hint-click:hover { text-decoration: underline; }
.prov-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
  align-items: flex-end;
}
.prov-filtros label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: #94a3b8;
}
.prov-filtros select,
.prov-filtros input {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f1520;
  color: #e2e8f0;
  min-width: 10rem;
}
.prov-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.prov-dia-header td {
  background: #0f172a;
  border-top: 1px solid #1e2a3a;
  padding-top: 0.55rem;
  font-size: 0.8rem;
}
.prov-grp-meta { color: #64748b; font-size: 0.72rem; font-weight: 400; }
.prov-grp-total { font-weight: 600; }
.prov-tipo { font-size: 0.62rem; }
.prov-ano-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.prov-ano-hint { margin: 0; font-size: 0.72rem; }
.ir-hint { margin: 0 0 0.75rem; font-size: 0.75rem; }
#tbl-ir td.num, #tbl-ir th.num { text-align: right; font-variant-numeric: tabular-nums; }
#tbl-ir tfoot tr td { border-top: 2px solid #334155; background: #0f172a; }
.prov-st { font-size: 0.62rem; white-space: nowrap; }
.prov-liq { border-bottom: 1px dotted #64748b; cursor: help; }
#tbl-prov td.num { text-align: right; }
.prov-field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: #334155;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 700;
  cursor: help;
}
.prov-hist-block {
  margin-top: 0.85rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.prov-hist-block h3 { margin: 0 0 0.45rem; font-size: 0.88rem; color: #8fa3bf; }
.prov-th-rec, .prov-th-chk { width: 4.5rem; text-align: center; }
.prov-rec-btn {
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  line-height: 1.2;
}
.prov-dy-row td { color: #94a3b8; font-size: 0.78rem; }
.prov-dy-row .num b { color: #4ade80; }
.prov-row-previsto td { color: #94a3b8; font-style: italic; }
.prov-cel-previsto { color: #94a3b8 !important; font-style: italic; }
.prov-cel-previsto b { color: #cbd5e1 !important; font-weight: 600; }
.prov-ano-chart-wrap {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
}
.prov-ano-chart-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: #8fa3bf;
}
.prov-ano-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 5.5rem;
  padding-top: 0.25rem;
}
.prov-bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  height: 100%;
  justify-content: flex-end;
}
.prov-bar {
  width: 100%;
  max-width: 2.2rem;
  min-height: 2px;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  border-radius: 3px 3px 0 0;
  transition: height 0.2s ease;
}
.prov-bar-lbl {
  font-size: 0.58rem;
  color: #64748b;
  white-space: nowrap;
}
.prov-bar-val {
  font-size: 0.58rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.modal-prov-sync-box { max-width: 42rem; width: min(96vw, 42rem); }
.prov-sync-table-wrap { max-height: 16rem; overflow: auto; }
.prov-sync-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid #1e293b;
}
.prov-sync-intro { margin: 0 0 0.5rem; font-size: 0.75rem; }
#tbl-prov-lanc tbody tr.prov-row-recebido { opacity: 0.72; }
.cotacao-table td.num,
.cotacao-table th.num,
.cotacao-table td.alvo-stop-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cotacao-table .col-qtd { width: 4%; }
.cotacao-table .col-pm { width: 5.5%; }
.cotacao-table th.col-pm,
.cotacao-table td.col-pm-solo {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #e2e8f0;
}
.cotacao-table tr.row-acao-stop td {
  background: rgba(127, 29, 29, 0.14);
}
.cotacao-table tr.row-acao-compra td {
  background: rgba(21, 128, 61, 0.12);
}
.cotacao-table tr.row-acao-realizar td {
  background: rgba(22, 101, 52, 0.10);
}
.cotacao-table tr.row-acao-stop:hover td,
.cotacao-table tr.row-acao-compra:hover td,
.cotacao-table tr.row-acao-realizar:hover td {
  filter: brightness(1.06);
}
.cotacao-table .col-val { width: 8%; }
.cotacao-table .col-resultado { width: 7.5%; }
.cotacao-table .col-pl-veredito { padding-right: 0.55rem; }
.cotacao-table th.col-pl-veredito,
.cotacao-table td.col-pl-veredito { border-left: 1px solid #1e2a3a; }
.cotacao-table .tag { padding: 0.15rem 0.4rem; font-size: 0.72rem; white-space: nowrap; }
.cotacao-table .col-papel { width: 6%; }
.cotacao-table .papel-col b { font-size: 0.9rem; }
.cotacao-table .col-ult { width: 5%; }
.cotacao-table .col-var { width: 5.75%; min-width: 3.85rem; }
.cotacao-table .col-spark {
  width: 6.5%;
  padding: 0.2rem 0.25rem;
  text-align: center;
  overflow: visible;
}
.cotacao-table th.col-fx-matriz,
.cotacao-table td.col-fx-matriz {
  width: 6.5%;
  text-align: center;
  letter-spacing: 0.02em;
  overflow: visible;
  text-overflow: clip;
  font-size: 0.85rem;
}
.fx-matriz { font-variant-numeric: tabular-nums; color: #cbd5e1; font-weight: 600; font-size: 0.85rem; }
.sparkline { display: block; margin: 0 auto; vertical-align: middle; max-width: 100%; height: auto; }
.sparkline polyline { fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sparkline.spark-up polyline { stroke: #4ade80; }
.sparkline.spark-down polyline { stroke: #f87171; }
.spark-empty { color: #64748b; font-size: 0.7rem; }
.sug-destaque-table .col-spark { width: 4.5rem; min-width: 4.5rem; }
.sug-destaque-table .fx-matriz-cell { font-size: 0.72rem; white-space: nowrap; }
.cotacao-table .col-min-dia,
.cotacao-table .col-max-dia { width: 5%; }
.cotacao-table th.col-vol-dia,
.cotacao-table td.col-vol-dia {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  text-align: center;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
}
.cotacao-table th.col-pct,
.cotacao-table td.col-pct {
  width: 2.6rem;
  min-width: 2.6rem;
  max-width: 2.6rem;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  text-align: center;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
}
.cotacao-table td.col-pct .cot-txt,
.cotacao-table td.col-vol-dia {
  display: inline-block;
  max-width: none;
}
.cotacao-table th.col-rr,
.cotacao-table td.col-rr {
  width: 4.5%;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  text-align: right;
}
.cotacao-table .col-ifr { width: 3.5%; text-align: center; }
.cotacao-table .col-st { width: 8%; }
.cotacao-table .col-dias {
  width: 3.5%;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  text-align: center;
}
.cotacao-table th.col-dias,
.cotacao-table td.col-dias {
  text-overflow: clip;
}
.cotacao-table .rr-stop-hit { color: #fca5a5; font-weight: 600; }
.cotacao-table .nowrap { white-space: nowrap; display: inline-block; }
.periodo-btns { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.periodo-btn {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #1e2a3a;
  background: #0f1520;
  color: #8fa3bf;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}
.periodo-btn:hover { color: #e8eef7; border-color: #334155; }
.periodo-btn.active { background: #14532d; color: #86efac; border-color: #22c55e; }
.var-pos { color: #22c55e; }
.var-neg { color: #f87171; }
.var-warn { color: #fbbf24; }
.cot-txt { font-weight: 600; font-variant-numeric: tabular-nums; }
.txt-verde { color: #4ade80; }
.txt-verde-claro { color: #86efac; }
.txt-amarelo { color: #fde047; }
.txt-laranja { color: #fdba74; }
.txt-vermelho { color: #f87171; }
.txt-neutro { color: #94a3b8; }
.cotacao-table .col-div-right { border-right: 2px solid #334155; }
.col-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: 0.15rem;
  border-radius: 50%;
  border: 1px solid #64748b;
  color: #94a3b8;
  font-size: 0.55rem;
  font-weight: 700;
  font-style: normal;
  text-decoration: none;
  cursor: help;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: auto;
}
.col-info:hover { border-color: #94a3b8; color: #cbd5e1; background: rgba(100, 116, 139, 0.15); }
.cotacao-table th.sortable { position: relative; }
.alvo-stop-cell { line-height: 1.15; }
.alvo-stop-cell .alvo-preco { display: block; font-weight: 600; }
.alvo-stop-cell .alvo-dist { display: block; font-size: 0.72rem; margin-top: 0.06rem; }
.alvo-stop-cell .alvo-dist-pct { font-weight: 600; }
.cotacao-table .col-alvo { width: 6%; }
.cotacao-table td.alvo-stop-cell {
  white-space: normal;
  line-height: 1.2;
  font-size: 0.85rem;
  overflow: visible;
  text-overflow: clip;
}
.alvo-stop-cell .alvo-dist { font-size: 0.72rem; }
.cotacao-table .sinal-col { width: 8%; text-align: center; }
.compact-table th, .compact-table td { padding: 0.45rem 0.55rem; font-size: 0.78rem; white-space: nowrap; }
.dest-cards { margin-bottom: 1rem; }
.pm-ref { font-size: 0.58rem; color: #64748b; }
h3 { font-size: 1rem; color: #8fa3bf; margin: 0 0 0.75rem; }
label { color: #8fa3bf; font-size: 0.85rem; }
.mercado-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  max-width: 420px;
}
.mercado-card .label { color: #8fa3bf; font-size: 0.8rem; margin-bottom: 0.5rem; }
.mercado-linha { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.mercado-card .value { font-size: 1.4rem; font-weight: 600; }
.mercado-card .muted { color: #8fa3bf; font-size: 0.9rem; }
.tag-mercado {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-mercado.caindo { background: #7f1d1d; color: #fca5a5; }
.tag-mercado.subindo { background: #14532d; color: #86efac; }
.tag-mercado.neutro { background: #1e2a3a; color: #8fa3bf; }
.check-row { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.check-row input { width: auto; margin: 0; }
.panel-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}
#transacoes h2,
#transacoes .tx-subtabs,
#transacoes .tx-toolbar,
#transacoes .import-notas-head,
#transacoes #notas-resumo { flex-shrink: 0; }
.panel-tx.active {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.tx-subtabs {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid #1e2a3a;
  padding-bottom: 0.35rem;
}
.tx-subtab {
  padding: 0.35rem 0.85rem;
  border: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #8fa3bf;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.tx-subtab:hover { color: #e8eef7; background: #141c28; }
.tx-subtab.active { color: #86efac; background: #14532d33; border-bottom: 2px solid #22c55e; }
.panel-tx .tx-view.active {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-tx .tx-view.active > .panel-table-wrap {
  flex: 1;
  min-height: 0;
}
.panel-tx .import-notas-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.panel-tx .import-notas-panel .panel-table-wrap { flex: 1; min-height: 0; }
.panel-prov.active { overflow: hidden; }
.panel-prov .prov-head,
.panel-prov .prov-subtabs,
.panel-prov .prov-resumo-cards { flex-shrink: 0; }
.panel-prov .prov-view.active {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.import-hint { margin-bottom: 0.75rem; font-size: 0.78rem; }
#import-msg.err { color: var(--danger, #ef4444); }
#import-msg.ok { color: var(--accent, #22c55e); }
.nota-informar { color: var(--accent, #22c55e); font-style: italic; cursor: pointer; }
.nota-informar:hover { text-decoration: underline; }
.nota-aguardando { color: #64748b; font-style: italic; cursor: default; }
.nota-cell { min-width: 5rem; }
.tx-toolbar { flex-wrap: nowrap; align-items: center; gap: 0.45rem; margin-bottom: 0.35rem; }
.tx-toolbar input[type="search"] { min-width: 160px; flex: 1; max-width: 200px; }
.tx-date-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
}
.tx-date-inline input[type="date"] {
  margin: 0;
  min-width: 9.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f1520;
  color: #f1f5f9;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color-scheme: dark;
}
.tx-date-inline input[type="date"]:focus {
  outline: none;
  border-color: #22c55e;
}
.tx-date-inline input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: invert(0.9) brightness(1.1);
}
#ir h2,
#ir .ir-subtitulo,
#ir .ir-grid-note,
#ir .gestao-dre-ano-head { flex-shrink: 0; }
#ir.panel.active {
  gap: 0.3rem;
  overflow: hidden;
}
#ir h2 {
  margin: 0;
  font-size: 1.1rem;
}
#ir .gestao-dre-ano-head { margin-bottom: 0; }
#ir .ir-subtitulo {
  margin: 0.25rem 0 0.1rem;
  font-size: 0.84rem;
}
#ir .ir-grid-note {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  line-height: 1.25;
}
#ir .ir-table-wrap {
  flex: none;
  min-height: auto;
  overflow: visible;
}
#ir .ir-table th,
#ir .ir-table td {
  padding: 0.38rem 0.4rem;
  font-size: 0.68rem;
  line-height: 1.35;
}
#ir .ir-table thead th {
  padding: 0.42rem 0.4rem;
  font-size: 0.65rem;
}
#ir .ir-table td:last-child {
  min-width: 4.75rem;
  white-space: nowrap;
}
#ir .ir-table .tag {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  line-height: 1.15;
}
#ir .ir-mercado-row td {
  font-size: 0.65rem;
  padding: 0.3rem 0.4rem;
}
#ir .ir-col-exp { width: 1.35rem; padding: 0.28rem 0.25rem !important; }
#ir-daytrade-wrap { margin-top: 0.65rem; }
#ir-daytrade-wrap .ir-subtitulo { margin-top: 0; }
.import-notas-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.import-notas-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.modal-import-box { width: min(640px, 100%); }
.modal-import-body {
  padding: 1rem;
  overflow: visible;
  max-height: min(85vh, 720px);
  overflow-y: auto;
}
.modal-import-body .import-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #94a3b8;
}
.modal-import-body .dropzone {
  padding: 2.25rem 1.25rem;
  margin-bottom: 0.65rem;
}
.modal-import-body #import-msg {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.78rem;
}
.import-preview { margin-top: 0.5rem; }
.import-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #cbd5e1;
}
.import-preview-meta span { white-space: nowrap; }
.import-preview-taxas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 0.78rem;
}
.import-preview-taxas div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.import-preview-taxas label { color: #64748b; font-size: 0.7rem; }
.import-preview-taxas strong { font-variant-numeric: tabular-nums; color: #e2e8f0; }
.import-preview-table-wrap {
  max-height: 220px;
  overflow: auto;
  margin-bottom: 0.85rem;
  border: 1px solid #334155;
  border-radius: 6px;
}
.import-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.import-preview-actions button.secondary {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
}
.inv-card-ident { margin-bottom: 0.85rem; }
.inv-card-ident .inv-hint { margin: 0 0 0.65rem; font-size: 0.78rem; color: #94a3b8; }

/* Minha Conta (dados do investidor) */
.panel-dados-inv.active {
  overflow: hidden;
  align-items: flex-start;
}
.panel-dados-inv h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.panel-dados-inv > .msg { margin: 0 0 0.75rem; font-size: 0.75rem; max-width: 36rem; color: #94a3b8; }
.dados-inv-form { max-width: 28rem; width: 100%; }
.dados-inv-shell {
  background: #0a1018;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.dados-inv-card { border: none; border-radius: 0; background: transparent; height: auto; }
.dados-inv-card .inv-hint { margin: 0 0 0.75rem; font-size: 0.78rem; color: #94a3b8; line-height: 1.45; }
.dados-inv-fields { display: flex; flex-direction: column; gap: 0.65rem; }
.dados-inv-fields select {
  width: 100%;
  box-sizing: border-box;
  background: #0f1520;
  border: 1px solid #1e2a3a;
  border-radius: 6px;
  color: #e8eef7;
  padding: 0.38rem 0.5rem;
  font-size: 0.8rem;
}
.import-notas-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
#tbl-notas td.num, #tbl-notas th.num { text-align: right; font-variant-numeric: tabular-nums; }
#tbl-notas tbody tr { cursor: pointer; }
#tbl-notas tbody tr:hover td { background: #1e293b; }
#transacoes .msg { margin-top: 0; }
.tx-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.tx-table th,
.tx-table td { white-space: nowrap; padding: 0.45rem 0.55rem; }
.tx-table th {
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #334155;
  text-align: left;
}
.tx-table th.num { text-align: right; }
.tx-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tx-col-exp { width: 2rem; padding-left: 0.35rem !important; }
.tx-table th:nth-child(2),
.tx-table td.tx-dia-data-cell { width: 9rem; }
.tx-table th:nth-child(3),
.tx-table td.tx-dia-ops { width: 22%; }
.tx-table th:nth-child(4) { width: 18%; }
.tx-table th:nth-child(5) { width: 20%; }
.tx-table th:nth-child(6) { width: 14%; }
.tx-dia-header td {
  background: #0f172a;
  border-top: 1px solid #334155;
  cursor: pointer;
  vertical-align: middle;
}
.tx-dia-header:hover td { background: #1e293b; }
.tx-dia-data {
  font-weight: 600;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
}
.tx-dia-toggle {
  border: none;
  background: transparent;
  color: #86efac;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  line-height: 1;
}
.tx-dia-ops {
  color: #94a3b8;
  font-size: 0.78rem;
}
.tx-dia-ops b { color: #60a5fa; font-weight: 700; }
.tx-dia-ops-sep { margin: 0 0.2rem; color: #475569; }
.tx-dia-vol { font-weight: 700; font-size: 0.82rem; }
.tx-dia-vol .var-pos,
.tx-dia-detail-vol .var-pos { color: #4ade80; font-weight: 700; }
.tx-dia-vol .var-neg,
.tx-dia-detail-vol .var-neg { color: #f87171; font-weight: 700; }
.tx-flow-neutro { color: #64748b; }
.tx-vol-sep { color: #475569; font-weight: 400; }
.tx-dia-detail-vol { white-space: nowrap; }
.tx-dia-taxas { font-size: 0.8rem; }
.tx-dia-dash { color: #475569; }
.tx-dia-detail td {
  font-size: 0.78rem;
  color: #cbd5e1;
  border-bottom: 1px solid #1a2433;
  background: #0a0f18;
}
.tx-dia-detail .tx-dia-ops { padding-left: 0.75rem; border-left: 3px solid #334155; }
.tx-dia-header[data-open="1"] td { background: #141c28; border-bottom-color: #1e293b; }
.tx-lado-c { color: #4ade80; font-weight: 600; }
.tx-lado-v { color: #f87171; font-weight: 600; }
.panel-gestao.active { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; flex: 1; min-height: 0; overflow: hidden; }
.panel-gestao.active > h2,
.panel-gestao .gestao-toolbar,
.panel-gestao .gestao-subtabs { flex-shrink: 0; }
.panel-gestao.active .gestao-panel.active {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.panel-gestao.active #gestao-panel-caixa.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#gestao-caixa-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#gestao-caixa-wrap .gestao-dre-ano-head,
#gestao-caixa-wrap #caixa-grid-note {
  flex-shrink: 0;
}
#gestao-caixa-wrap .caixa-grid-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin-top: 0.25rem;
  padding-right: 0.85rem;
  box-sizing: border-box;
}
.gestao-toolbar label { font-size: 0.8rem; color: #8fa3bf; }
.gestao-subtabs {
  display: flex; gap: 0.35rem;
  border-bottom: 1px solid #1e2a3a; padding-bottom: 0.35rem;
}
.gestao-subtab {
  padding: 0.35rem 0.85rem; border: none; border-radius: 6px 6px 0 0;
  background: transparent; color: #8fa3bf; font-size: 0.85rem; font-weight: 500; cursor: pointer;
}
.gestao-subtab:hover { color: #e8eef7; background: #141c28; }
.gestao-subtab.active { color: #86efac; background: #14532d33; border-bottom: 2px solid #22c55e; }
.gestao-panel { display: none; width: 100%; max-width: none; min-width: 0; }
.gestao-panel.active { display: block; }
#gestao-caixa-wrap,
#gestao-dre-wrap { width: 100%; min-width: 0; }
#gestao-panel-dre h3 { font-size: 0.9rem; margin: 0 0 0.35rem; color: #8fa3bf; font-weight: 600; }
.dre-table { width: 100%; font-size: 0.82rem; }
.dre-table td { padding: 0.25rem 0.4rem; border-bottom: 1px solid #1e2a3a; }
.dre-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dre-table tr.dre-head td { font-weight: 600; color: #6b8ab0; background: #0f1620; border-bottom: none; padding-top: 0.5rem; }
.dre-table tr.dre-note td { font-size: 0.75rem; color: #6b8ab0; font-style: italic; border-bottom: none; padding-top: 0.35rem; }
.dre-table tr.dre-total td, .dre-table td.dre-total { font-weight: 700; border-top: 1px solid #2a3f5f; }
.dre-table tr.dre-check td { font-weight: 700; border-top: 2px solid #22c55e; color: #86efac; }
.dre-table tr.dre-check-fail td { border-top-color: #f87171; color: #fca5a5; }
.balanco-split { table-layout: fixed; width: 100%; }
.balanco-split td:nth-child(1) { width: 20%; }
.balanco-split td:nth-child(2) {
  width: 36%;
  border-right: 2px solid #2a3f5f;
}
.balanco-split td:nth-child(3) { width: 18%; }
.balanco-split td:nth-child(4) { width: 26%; }
.balanco-split tr.bal-head td {
  font-weight: 700;
  color: #c8d6e8;
  background: #0f1620;
  border-bottom: 1px solid #2a3f5f;
  padding: 0.45rem 0.5rem;
}
.balanco-split .bal-head-title { color: #6b8ab0; font-weight: 600; }
.balanco-split .bal-head-total { font-weight: 700; }
.balanco-split .bal-label { color: #94a3b8; }
.balanco-split td.num { white-space: nowrap; }
.balanco-split .bal-label-sub {
  padding-left: 1.15rem;
  font-size: 0.68rem;
  color: #64748b;
  font-style: italic;
}
.balanco-split .bal-empty { background: transparent; border-bottom: 1px solid #1e2a3a; }
.conta-toolbar .toolbar-sep { width: 1px; height: 1.5rem; background: #2a3f5f; margin: 0 0.25rem; }
.gestao-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.65rem; }
.gestao-comp-toolbar,
.gestao-dre-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.gestao-periodo-btns { margin-right: 0.25rem; }
.gestao-fluxo-btn {
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
  cursor: pointer;
  background: #0f1520;
  color: #e2e8f0;
}
.gestao-fluxo-aporte { border-color: #22c55e; color: #86efac; }
.gestao-fluxo-retirada { border-color: #f87171; color: #fca5a5; }
.gestao-fluxo-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0;
  min-width: 0;
}
.gestao-fluxo-block-head {
  margin-bottom: 0.85rem;
}
.gestao-fluxo-block-head h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: #e2e8f0;
  font-weight: 600;
}
.gestao-fluxo-hint {
  margin: 0;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
}
.gestao-fluxo-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gestao-fluxo-tipo-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  margin-bottom: 0;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0a1018;
}
.gestao-fluxo-tipo-btn {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.gestao-fluxo-tipo-btn:hover { color: #e2e8f0; }
.gestao-fluxo-form[data-fluxo-mode="APORTE"] .gestao-fluxo-tipo-btn[data-fluxo-tipo="APORTE"].active {
  background: #14532d;
  color: #86efac;
  border-color: #22c55e;
}
.gestao-fluxo-form[data-fluxo-mode="RETIRADA"] .gestao-fluxo-tipo-btn[data-fluxo-tipo="RETIRADA"].active {
  background: #450a0a;
  color: #fca5a5;
  border-color: #ef4444;
}
.gestao-fluxo-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0;
}
@media (max-width: 520px) {
  .gestao-fluxo-fields { grid-template-columns: 1fr; }
}
.gestao-fluxo-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: #94a3b8;
  min-width: 0;
}
.gestao-fluxo-field-obs { grid-column: 1 / -1; }
.fluxo-th-acao { width: 5.5rem; }
.fluxo-td-acao { text-align: right; padding-right: 0.35rem !important; }
.fluxo-del-btn {
  padding: 0.25rem 0.45rem !important;
  font-size: 0.68rem !important;
  font-weight: 600;
  color: #fca5a5 !important;
  background: #1e2a3a !important;
  border: 1px solid #7f1d1d !important;
}
.fluxo-del-btn:hover { background: #450a0a !important; color: #fecaca !important; }
.fluxo-tag-futuro { font-size: 0.62rem; margin-left: 0.25rem; vertical-align: middle; }
.gestao-fluxo-fields input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f1520;
  color: #e2e8f0;
  font-size: 0.88rem;
}
.gestao-fluxo-fields input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px #14532d66;
}
.gestao-fluxo-form[data-fluxo-mode="RETIRADA"] .gestao-fluxo-fields input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px #450a0a99;
}
.gestao-fluxo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding-top: 0;
}
@media (max-width: 520px) {
  .gestao-fluxo-actions { grid-template-columns: 1fr; }
}
.gestao-fluxo-actions button {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.gestao-fluxo-form[data-fluxo-mode="RETIRADA"] #fluxo-salvar {
  background: #dc2626;
  color: #fff;
}
.gestao-fluxo-form[data-fluxo-mode="RETIRADA"] #fluxo-salvar:hover {
  background: #ef4444;
}
.comp-cards { margin-bottom: 0.65rem; }
.comp-cards .value { font-size: 1.05rem; font-weight: 600; }
.comp-meta { margin: 0 0 0.5rem; font-size: 0.72rem; color: #8fa3bf; }
.comp-demo-wrap { width: 100%; overflow-x: hidden; }
.comp-demo-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.78rem;
}
.comp-demo-table th,
.comp-demo-table td { padding: 0.45rem 0.5rem; }
.comp-demo-table th.num,
.comp-demo-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.comp-demo-table th.comp-th-carteira { color: #e2e8f0; }
.comp-demo-table th.comp-th-cdb { color: #86efac; }
.comp-demo-table th.comp-th-poup { color: #93c5fd; }
.comp-demo-table td.comp-demo-lbl { color: #94a3b8; width: 28%; }
.comp-demo-table tr.comp-demo-dest td { border-top: 2px solid #334155; background: #0f1520; font-weight: 600; }
.comp-demo-table .comp-cel-dash { color: #475569; }
.comp-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .comp-cards { grid-template-columns: repeat(2, 1fr); } }
.gestao-fluxo-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.85rem;
  gap: 0.65rem;
}
.gestao-fluxo-kpis .card { padding: 0.75rem 0.9rem; }
.gestao-fluxo-kpis .card .value { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.gestao-fluxo-kpi-aporte .value { color: #86efac; }
.gestao-fluxo-kpi-saldo .value { color: #86efac; }
.gestao-fluxo-kpi-saldo { border-color: #334155; }
.gestao-fluxo-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}
@media (max-width: 900px) {
  .gestao-fluxo-layout {
    grid-template-columns: 1fr;
  }
}
.gestao-fluxo-hist {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  min-height: 280px;
  min-width: 0;
}
.gestao-mov-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.78rem;
}
.gestao-mov-table th,
.gestao-mov-table td {
  padding: 0.45rem 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gestao-mov-table th.num,
.gestao-mov-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gestao-mov-table th:nth-child(1),
.gestao-mov-table td:nth-child(1) { width: 26%; }
.gestao-mov-table th:nth-child(2),
.gestao-mov-table td:nth-child(2) { width: 22%; }
.gestao-mov-table th:nth-child(3),
.gestao-mov-table td:nth-child(3) { width: 28%; }
.gestao-mov-table th:nth-child(4),
.gestao-mov-table td:nth-child(4) { width: 24%; white-space: nowrap; }
.gestao-mov-table td.fluxo-td-acao { overflow: visible; text-overflow: clip; }
.gestao-fluxo-hist .gestao-fluxo-table-wrap {
  max-height: min(420px, 55vh);
  overflow: auto;
}
@media (max-width: 900px) {
  .gestao-fluxo-hist { min-height: 220px; }
}
.gestao-hist-panel {
  padding: 0;
}
.gestao-hist-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.65rem;
}
.gestao-hist-head h3 { margin: 0; font-size: 0.95rem; color: #e2e8f0; font-weight: 600; }
.gestao-hist-resumo { margin: 0; font-size: 0.78rem; }
.gestao-fluxo-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
}
.gestao-fluxo-hist #tbl-movimentos td.im-empty { text-align: center; color: #64748b; padding: 1.25rem 0.5rem; }
.gestao-dre-sub { margin-top: 1rem; }
.gestao-dre-ano-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.gestao-dre-ano-head h3 { margin: 0; }
.gestao-ano-select {
  background: #0f1520;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
}
.dre-grid-wrap { overflow-x: auto; margin-top: 0.35rem; width: 100%; -webkit-overflow-scrolling: touch; }
.dre-grid-table {
  width: 100%;
  min-width: 52rem;
  table-layout: fixed;
  font-size: 0.78rem;
}
.dre-grid-table th,
.dre-grid-table td { padding: 0.3rem 0.25rem; }
.dre-grid-table th.num,
.dre-grid-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dre-grid-table th:first-child,
.dre-grid-table td.dre-row-label {
  width: 9%;
  min-width: 6.75rem;
  text-align: left;
  white-space: normal;
  line-height: 1.25;
}
.dre-grid-table th.num:not(.dre-col-total) {
  width: 6.5%;
  min-width: 2.15rem;
  white-space: nowrap;
  overflow: visible;
}
.dre-grid-table th.dre-col-total,
.dre-grid-table tr td:last-child {
  border-left: 2px solid #334155;
  font-weight: 600;
}
.dre-grid-table .dre-cel-vazio { color: #475569; }
.dre-grid-table .dre-cel-bold b { font-weight: 600; }
.dre-grid-table td.var-neg,
.dre-grid-table td.var-neg b { color: #f87171; }
.dre-grid-table td.var-pos,
.dre-grid-table td.var-pos b { color: #22c55e; }
.dre-grid-note { margin-top: 0.5rem; font-size: 0.85rem; color: #8fa3bf; }
.modal-dre-vendas-box { width: min(560px, 100%); }
.modal-dre-vendas-body { padding: 0.65rem 1rem 1rem; }
.modal-caixa-lanc-box { max-width: 52rem; width: min(96vw, 52rem); }
.modal-caixa-lanc-body { padding: 0.65rem 1rem 1rem; }
.caixa-lanc-det-wrap { max-height: 55vh; overflow: auto; }
.modal-caixa-lanc-body .caixa-lanc-count { margin: 0 0 0.45rem; font-size: 0.72rem; }
.dre-vendas-det-wrap { max-height: 55vh; overflow: auto; }
.dre-vendas-det-table th,
.dre-vendas-det-table td { font-size: 0.82rem; padding: 0.38rem 0.5rem; }
.ir-grid-note { margin: -0.35rem 0 0.55rem; font-size: 0.72rem; color: #64748b; }
.ir-table td.ir-cel-click {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #475569;
  text-underline-offset: 2px;
}
.ir-table td.ir-cel-click:hover { background: #1a2636; }
.ir-col-exp { width: 1.6rem; padding: 0.2rem 0.35rem !important; text-align: center; }
.ir-mes-toggle {
  border: none; background: transparent; color: #94a3b8; cursor: pointer;
  font-size: 0.65rem; padding: 0.1rem 0.25rem; line-height: 1;
}
.ir-mes-toggle:hover { color: #e2e8f0; }
.ir-mercado-row td { background: #0c1220; font-size: 0.72rem; }
.ir-mercado-label { color: #94a3b8; padding-left: 0.35rem !important; max-width: 11rem; white-space: normal; line-height: 1.2; }
.ir-subtitulo { margin: 1rem 0 0.35rem; font-size: 0.92rem; font-weight: 600; color: #cbd5e1; }
#ir .gestao-caixa-head-actions { margin-left: auto; }
.dre-grid-table td.dre-cel-click {
  cursor: pointer;
  text-decoration: underline dotted #475569;
  text-underline-offset: 2px;
}
.dre-grid-table td.dre-cel-click:hover { background: #1a2636; color: #e2e8f0; }
.dre-row-vendas .dre-row-label { color: #94a3b8; }
.gestao-caixa-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.gestao-export-btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.caixa-grid-wrap {
  width: 100%;
}
.caixa-grid-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.68rem;
  border-collapse: separate;
  border-spacing: 0;
}
.caixa-grid-table th,
.caixa-grid-table td {
  padding: 0.28rem 0.32rem;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.caixa-grid-table th.caixa-col-conta,
.caixa-grid-table td.caixa-row-label {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 6.5rem;
  max-width: 7.5rem;
  text-align: left;
  background: #0f1520;
  box-shadow: 2px 0 0 #1e293b;
}
.caixa-grid-table thead th.caixa-col-conta { z-index: 3; }
.caixa-grid-table th.num,
.caixa-grid-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.caixa-grid-table th.caixa-col-total,
.caixa-grid-table td.caixa-col-total {
  border-left: 2px solid #334155;
  font-weight: 600;
  min-width: 0;
  padding-right: 0.55rem;
}
.caixa-grid-table tr.caixa-sec-hdr td {
  background: #141c28;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  padding-top: 0.35rem;
  padding-bottom: 0.2rem;
}
#caixa-grid-note {
  margin: 0.25rem 0 0;
  font-size: 0.65rem;
}
.caixa-grid-table tr.caixa-sec-hdr.caixa-sec-entrada td { color: #4ade80; }
.caixa-grid-table tr.caixa-sec-hdr.caixa-sec-saida td { color: #f87171; }
.caixa-grid-table tr.caixa-sec-hdr.caixa-sec-total td { color: #94a3b8; }
.caixa-grid-table tr.caixa-sec-total td.caixa-row-label { font-weight: 600; }
.caixa-grid-table tr.caixa-linha-total-entrada td.caixa-row-label { color: #86efac; font-weight: 600; }
.caixa-grid-table tr.caixa-linha-total-saida td.caixa-row-label { color: #fca5a5; font-weight: 600; }
.caixa-grid-table .caixa-cel-vazio { color: #475569; }
.caixa-grid-table .caixa-cel-bold { font-weight: 600; }
.caixa-grid-table td.var-neg,
.caixa-grid-table td.var-neg b { color: #f87171; }
.caixa-grid-table td.var-pos,
.caixa-grid-table td.var-pos b { color: #22c55e; }
.caixa-grid-table td.caixa-cel-click {
  cursor: pointer;
  text-decoration: underline dotted #475569;
  text-underline-offset: 2px;
}
.caixa-grid-table td.caixa-cel-click:hover { background: #1a2636; color: #e2e8f0; }
.caixa-grid-table tr.caixa-row-spacer td {
  height: 0.2rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.gestao-caixa-lanc-wrap { margin-top: 1.1rem; }
.gestao-caixa-lanc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.45rem;
}
.gestao-caixa-lanc-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
}
.caixa-lanc-count { margin: 0; font-size: 0.72rem; }
.caixa-lanc-table { font-size: 0.8rem; }
.caixa-lanc-table .caixa-lanc-col-valor { min-width: 6.5rem; white-space: nowrap; }
.caixa-lanc-table .caixa-tipo {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
}
.caixa-lanc-table .caixa-tipo-aporte { background: #14532d; color: #86efac; }
.caixa-lanc-table .caixa-tipo-venda { background: #14532d; color: #bbf7d0; }
.caixa-lanc-table .caixa-tipo-div,
.caixa-lanc-table .caixa-tipo-jcp { background: #1e3a5f; color: #93c5fd; }
.caixa-lanc-table .caixa-tipo-compra,
.caixa-lanc-table .caixa-tipo-retirada,
.caixa-lanc-table .caixa-tipo-taxas { background: #450a0a; color: #fca5a5; }

.app-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  animation: app-loading-slide 1s linear infinite;
  pointer-events: none;
}
@keyframes app-loading-slide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.panel-error {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #7f1d1d;
  background: #450a0a;
  color: #fecaca;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.panel-error-retry {
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  margin-left: auto;
}
.panel-loading {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
