/* Dropdown menu genérico — usado no 3-pontos do lançamento */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-pop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .45rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  min-width: 220px;
  padding: .3rem;
  z-index: 20;
}

.dropdown.open .dropdown-pop { display: block }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .55rem;
  border-radius: .3rem;
  font-size: .72rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.dropdown-item:hover { background: var(--bg-2) }
.dropdown-item.danger { color: #dc2626 }
.dropdown-item.danger:hover { background: #fee2e2 }
.dropdown-item.disabled { color: var(--text-dim); cursor: not-allowed }
.dropdown-item.disabled:hover { background: transparent }

.dropdown-sep { height: 1px; background: var(--border); margin: .2rem 0 }

.dropdown-sub {
  padding: .25rem .55rem;
  font-size: .55rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
}

/* ===== Menu PADRÃO do sistema (components/menu.js) — usar em todo lugar ===== */
.menu {
  position: fixed; z-index: 9000; min-width: 168px; max-width: 88vw; max-height: 72vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: .55rem;
  box-shadow: 0 14px 34px rgba(15,23,42,.22); padding: .25rem;
}
.menu-item {
  display: flex; align-items: center; gap: .35rem; width: 100%; text-align: left;
  padding: .5rem .55rem; font-size: .82rem; font-weight: 600; color: var(--text);
  background: transparent; border: none; border-radius: .4rem; cursor: pointer; white-space: nowrap;
}
.menu-item:hover { background: var(--bg-2); }
.menu-item.danger { color: #dc2626; }
.menu-item.disabled { opacity: .5; cursor: default; }
.menu-item.active { color: #4f46e5; }
.menu-check { width: .85rem; flex-shrink: 0; display: inline-flex; justify-content: center; font-size: .72rem; color: #4f46e5; }
.menu-ico { display: inline-flex; }
.menu-lbl { overflow: hidden; text-overflow: ellipsis; }
.menu-sep { height: 1px; background: var(--border); margin: .25rem .3rem; }
.menu-header { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mut); font-weight: 700; padding: .35rem .55rem .15rem; }

/* Gatilho estilo chip (chipSelect) — mostra o chip ativo + ▾. Escondido no desktop;
   o mobile mostra ele e esconde a fileira de chips (ver responsive.css). */
.subnav-chipdrop { display: none; }
.chip-drop {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .6rem; border: 1px solid var(--border); border-radius: .55rem;
  background: var(--surface); font-size: .84rem; font-weight: 600; color: var(--text); cursor: pointer;
}
.chip-drop:hover { background: var(--bg-2); }
.chip-drop .acct-tab-icon { width: 1.4rem; height: 1.4rem; font-size: .58rem; }
.chip-drop-car { color: var(--text-dim); font-size: .72rem; margin-left: .1rem; }
.menu .acct-tab-icon { width: 1.3rem; height: 1.3rem; font-size: .55rem; flex-shrink: 0; }

/* chip-drop detalhado: nome na 1ª linha, saldo (menor) na 2ª. main cresce → seta vai pro fim */
.chip-drop-main { display: inline-flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1 1 auto; align-items: flex-start; }
.chip-drop-lbl { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.chip-drop-sub { font-size: .74rem; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.chip-drop-car { margin-left: auto; }
.menu-item .menu-lbl { display: flex; flex-direction: column; line-height: 1.2; }
.menu-sub { font-size: .68rem; font-weight: 500; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.menu-item { align-items: flex-start; }
.menu-item .menu-check, .menu-item .menu-ico { margin-top: .05rem; }

/* total (soma) no próprio botão do chip-drop */
.chip-drop-total { margin-left: auto; display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.18; padding-left: .5rem; }
.chip-drop-total-lbl { font-size: .55rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-mut); font-weight: 700; }
.chip-drop-total-val { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
