/* Orçamento — abas Lançamento / Acompanhamento (Fase 3) */
.orc-tabbtn {
  background: none; border: none; cursor: pointer;
  padding: 9px 16px; font-size: 13.5px; font-weight: 500;
  color: var(--text3); border-bottom: 2px solid transparent;
  margin-bottom: -2px; font-family: inherit;
}
.orc-tabbtn:hover { color: var(--text1); }
.orc-tabbtn.active { color: var(--primary, #1a7f4e); border-bottom-color: var(--primary, #1a7f4e); font-weight: 700; }

.acp-chip {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; background: var(--bg2, #f2f2f2); border: 1px solid var(--border);
  margin: 1px 2px; white-space: nowrap;
}
.acp-chip.vinculo { background: #E8F5EC; border-color: #BFE3CB; color: #1F7A45; }
.acp-chip .x { cursor: pointer; margin-left: 4px; color: #B33; font-weight: 700; }
.acp-estouro { color: #B33232; font-weight: 600; }   /* gastou mais que o orçado */
.acp-economia { color: #1F7A45; font-weight: 600; }  /* sobrou orçamento */
.acp-sec-title { font-weight: 700; font-size: 13px; margin: 14px 0 6px; }

/* ── Toast global (componente criado com o módulo Orçamento; uso geral) ── */
#toast-box { position: fixed; bottom: 22px; right: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px; border-radius: 9px; font-size: 13.5px; cursor: pointer;
  max-width: 380px; box-shadow: 0 6px 22px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(8px); transition: all .25s ease;
  background: #2b2b2b; color: #fff;
}
.toast--in { opacity: 1; transform: none; }
.toast--success { background: #1F7A45; }
.toast--error { background: #B33232; }

/* ── Orçamento em tela cheia (desktop) ── */
.main-content.orc-full { max-width: none; }

/* ── Confirmação inline (substitui confirm nativo) ── */
.orc-conf-msg { font-size: 13.5px; margin: 6px 0 14px; }

/* ── Lista de janelas: status vencida ── */
.orc-jan-vencida { color: #B8860B; font-weight: 700; }

/* ── Botões da faixa do acompanhamento ── */
.acp-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ── Acompanhamento mensal no MOBILE: tabela vira cartões por conta ── */
@media (max-width: 768px) {
  #orc-acomp table { min-width: 0 !important; }
  #orc-acomp thead { display: none; }
  #orc-acomp tbody tr, #orc-acomp tfoot tr {
    display: block; border: 1px solid var(--border); border-radius: 10px;
    margin-bottom: 10px; padding: 8px 12px; background: var(--bg1, #fff);
  }
  #orc-acomp tfoot tr { border-width: 2px; }
  #orc-acomp tbody td, #orc-acomp tfoot td {
    display: flex; justify-content: space-between; align-items: center;
    border: none !important; padding: 3px 0 !important;
  }
  #orc-acomp td[data-l]::before {
    content: attr(data-l); font-size: 11px; color: var(--text3); margin-right: 10px; font-weight: 400;
  }
  #orc-acomp td.acp-conta { font-weight: 700; font-size: 13.5px; padding-bottom: 6px !important; }
  #orc-acomp td.acp-acao { justify-content: flex-end; padding-top: 6px !important; }
  #orc-acomp td:empty { display: none; }
}
#acp-det-corpo { overflow-x: auto; }
#acp-det-corpo table { min-width: 560px; }

/* ── Modal drill-down da conta: quase tela cheia no DESKTOP ──
   O form de "encaminhar requisição" (select de usuário + botão) estourava a
   largura fixa de 880px e a altura de 65vh do corpo (ambas inline no index.html),
   cortando o conteúdo. Aqui alargamos só no desktop (o !important vence os inline);
   no mobile (≤640px) nada muda. */
@media (min-width: 641px) {
  #acp-modal-det .modal { max-width: 96vw !important; width: 96vw; }
  #acp-det-corpo { max-height: 82vh !important; }
  #acp-det-corpo table { min-width: 0; }   /* num modal largo a tabela cabe sem scroll lateral */
}
