/**
 * Cadastros → Bancos — lista de posição (hero reusa cadastros-hero / Pessoas).
 */

.bancos-posicao__total-title {
  margin: 0.15rem 0 0.45rem !important;
  font-size: clamp(2.05rem, 3.6vw, 2.75rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.045em !important;
  line-height: 1.05 !important;
  font-variant-numeric: tabular-nums;
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.12);
}

.bancos-posicao__total-caption {
  margin: 0 0 1.2rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(248, 250, 252, 0.82);
}

/* Cards abaixo ficam secundários em relação ao total */
.cadastros-hero[data-bancos-posicao-hero] .card__value {
  font-size: 1.2rem;
  font-weight: 700;
}

.bancos-posicao__section-head {
  padding: 1rem 1.1rem 0;
}

.bancos-posicao__section-head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--color-text, #172033);
}

.bancos-posicao__section .master-toolbar {
  border-bottom: 0;
  background: transparent;
  padding: 0.7rem 1.1rem 0.55rem;
}

.bancos-posicao__table-wrap {
  padding: 0 0.35rem;
}

.bancos-posicao__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.bancos-posicao__table thead th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted, #64748b);
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #eef2f7;
  white-space: nowrap;
}

.bancos-posicao__table thead th.num {
  text-align: right;
}

.bancos-posicao__table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.bancos-posicao__table tbody tr:last-child td {
  border-bottom: 0;
}

.bancos-posicao__row.row--inactive {
  opacity: 0.62;
}

.bancos-posicao__bank {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bancos-posicao__avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.bancos-posicao__name {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text, #172033);
  line-height: 1.2;
}

.bancos-posicao__sub {
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: var(--color-muted, #64748b);
}

.bancos-posicao__col-saldo {
  text-align: right;
  white-space: nowrap;
}

.bancos-posicao__saldo {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--color-text, #172033);
}

.bancos-posicao__pct-wrap {
  display: grid;
  grid-template-columns: 3.4rem minmax(4rem, 7rem);
  gap: 0.55rem;
  align-items: center;
}

.bancos-posicao__pct {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--color-text, #172033);
}

.bancos-posicao__bar-track {
  height: 6px;
  border-radius: 999px;
  background: #e8edf4;
  overflow: hidden;
}

.bancos-posicao__bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 0;
}

.bancos-posicao__col-actions {
  text-align: right;
  white-space: nowrap;
}

.bancos-posicao__link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0 0.15rem;
  padding: 0.28rem 0.4rem;
  border: 0;
  background: transparent;
  color: var(--color-muted, #64748b);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}

.bancos-posicao__link-btn:hover {
  color: #2563eb;
  background: #eff6ff;
}

.bancos-posicao__act-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.bancos-posicao__menu {
  position: relative;
  display: inline-block;
  margin-left: 0.15rem;
  vertical-align: middle;
}

.bancos-posicao__more {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted, #64748b);
  cursor: pointer;
}

.bancos-posicao__more:hover,
.bancos-posicao__more[aria-expanded='true'] {
  background: #f1f5f9;
  color: var(--color-text, #172033);
}

.bancos-posicao__menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 9.5rem;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.bancos-posicao__menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.65rem;
  border-radius: 7px;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  color: var(--color-text, #172033);
}

.bancos-posicao__menu-item:hover {
  background: #f8fafc;
}

.bancos-posicao__menu-item--danger {
  color: #b91c1c;
}

.bancos-posicao__footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 0.35rem 1rem 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.bancos-posicao__footnote-text {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 16rem;
}

.bancos-posicao__footnote-text p {
  margin: 0;
  font-size: 0.82rem;
  color: #1e3a8a;
  line-height: 1.4;
}

.bancos-posicao__info-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #2563eb;
}

.bancos-posicao__footnote .btn--ghost {
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  background: #fff;
}

@media (max-width: 900px) {
  .bancos-posicao__link-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

@media (max-width: 640px) {
  .bancos-posicao__pct-wrap {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .bancos-posicao__table thead th:nth-child(3),
  .bancos-posicao__table tbody td:nth-child(3) {
    display: none;
  }
}
