/* ========== Fonte ========== */
@import url('https://fonts.googleapis.com/css2?family=Anek+Latin:wght@400;500;600;700;800&display=swap');

/* ========== Reset / base ========== */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  /* Paleta bordô */
  --bordo: #6e1423;
  --bordo-2: #8b1e30;
  --bordo-3: #4a0d18;
  --bordo-claro: #fbeef0;
  --verde: #2f7d57;
  --vermelho: #c0392b;
  --azul: #3498db;
  --texto: #1a1a1a;
  --texto-2: #6b7280;
  --texto-3: #9ca3af;
  --bg: #f6f7f8;
  --bg-card: #ffffff;
  --borda: #eaecef;
  --borda-2: #d1d5db;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.12);
  --r-card: 14px;
  --r-btn: 10px;
  --r-pill: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

html, body {
  font-family: 'Anek Latin', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--texto);
  background: var(--bg);
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
input, button, select, textarea { font-family: inherit; font-size: 16px; }
button { cursor: pointer; border: none; background: none; }
.oculto { display: none !important; }

/* ========== Login ========== */
.tela-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--bordo) 0%, var(--bordo-2) 100%);
}
.login-card {
  background: var(--bg-card);
  border-radius: var(--r-card);
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-2);
  text-align: center;
}
.login-logo { font-size: 56px; margin-bottom: 8px; }
.login-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-sub { color: var(--texto-2); font-size: 14px; margin-bottom: 20px; }
.login-card input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--borda);
  border-radius: var(--r-btn);
  margin-bottom: 12px;
  outline: none;
  transition: border-color .15s;
}
.login-card input:focus { border-color: var(--bordo); }
.login-erro {
  margin-top: 12px;
  background: #fce8eb;
  color: var(--bordo);
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
}

/* ========== Header ========== */
.topo {
  background: linear-gradient(135deg, var(--bordo) 0%, var(--bordo-2) 100%);
  color: #fff;
  padding-top: var(--safe-top);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(110,20,35,0.3);
}
.topo-conteudo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.topo h1 { font-size: 18px; font-weight: 800; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #fff;
  transition: background .15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.15); }

/* ========== Filtro ========== */
.filtro-wrap { padding: 12px 16px 0; }
.select-filtro {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-btn);
  border: 1.5px solid var(--borda);
  background: var(--bg-card);
  font-weight: 600;
  color: var(--texto);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e1423' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
}

/* ========== Card total ========== */
.card-total {
  margin: 12px 16px;
  background: linear-gradient(135deg, var(--bordo) 0%, var(--bordo-2) 100%);
  border-radius: var(--r-card);
  padding: 18px 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(110,20,35,0.35);
}
.total-label { font-size: 12px; opacity: 0.9; font-weight: 600; letter-spacing: 0.5px; }
.total-valor { font-size: 32px; font-weight: 800; margin-top: 4px; }
.total-qtd { font-size: 13px; opacity: 0.9; margin-top: 2px; }

/* ========== Cards genéricos ========== */
.card {
  margin: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--r-card);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--texto-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.vazio { text-align: center; color: var(--texto-3); padding: 18px 8px; font-size: 14px; }

/* ========== Lista categorias resumo (com barras) ========== */
.cat-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--borda);
}
.cat-row:last-child { border-bottom: none; }
.cat-row-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}
.cat-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.cat-icone { font-size: 18px; }
.cat-nome { font-weight: 600; font-size: 14px; }
.cat-qtd { font-size: 11px; color: var(--texto-3); }
.cat-valores { text-align: right; }
.cat-valor { font-weight: 700; font-size: 14px; }
.cat-pct { font-size: 11px; color: var(--texto-2); }
.cat-barra-bg {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.cat-barra {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}

/* ========== Lista de gastos ========== */
.gasto-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--borda);
  cursor: pointer;
  transition: background .12s;
}
.gasto-item:active { background: var(--bg); }
.gasto-item:last-child { border-bottom: none; }
.gasto-icone-wrap {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.gasto-info { flex: 1; min-width: 0; }
.gasto-cat { font-weight: 600; font-size: 14px; }
.gasto-meta { font-size: 12px; color: var(--texto-2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gasto-valor { font-weight: 700; font-size: 15px; color: var(--verde); }

/* ========== FAB ========== */
.fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + var(--safe-bot));
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bordo) 0%, var(--bordo-2) 100%);
  color: #fff;
  font-size: 30px;
  font-weight: 300;
  box-shadow: 0 6px 16px rgba(110,20,35,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  transition: transform .15s;
}
.fab:active { transform: scale(0.92); }

/* ========== Modais ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
  padding: 0;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp .25s cubic-bezier(.16,1,.3,1);
  padding-bottom: var(--safe-bot);
}
@keyframes slideUp { from { transform: translateY(100%);} to { transform: translateY(0);} }
.modal-pequeno { max-height: 70vh; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--borda);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-header .icon-btn { color: var(--texto-2); width: 32px; height: 32px; font-size: 18px; }
.modal-corpo {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-rodape {
  padding: 14px 20px;
  border-top: 1px solid var(--borda);
  display: flex;
  gap: 10px;
}
.modal-rodape > button { flex: 1; }

/* desktop: centraliza modal */
@media (min-width: 720px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: var(--r-card); max-height: 85vh; }
}

/* desktop: app numa coluna centralizada (em vez de ocupar a tela toda) */
@media (min-width: 720px) {
  .app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 0 1px var(--borda);
  }
  /* FAB acompanha a coluna em vez de colar na borda da tela */
  .fab { right: calc(50% - 280px); }
}

/* ========== Campos ========== */
.campo {
  display: block;
  margin-bottom: 14px;
}
.campo > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.campo > span small { color: var(--texto-3); font-weight: 500; text-transform: none; letter-spacing: 0; }
.campo input, .campo select, .campo textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--borda);
  border-radius: var(--r-btn);
  outline: none;
  background: #fff;
  color: var(--texto);
  transition: border-color .15s;
  font-size: 16px; /* evita zoom no iOS */
  font-family: inherit;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--bordo); }
.campo textarea { resize: none; }
.campo input[type="color"] { height: 48px; padding: 4px; cursor: pointer; }

/* ========== Botões ========== */
.btn-primario {
  background: linear-gradient(135deg, var(--bordo) 0%, var(--bordo-2) 100%);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--r-btn);
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 2px 8px rgba(110,20,35,0.35);
}
.btn-primario:active { transform: scale(0.98); }
.btn-secundario {
  background: var(--bg);
  color: var(--texto);
  padding: 12px 16px;
  border-radius: var(--r-btn);
  font-weight: 600;
  border: 1.5px solid var(--borda);
}
.btn-perigo {
  background: #fff;
  color: var(--vermelho);
  border: 1.5px solid var(--vermelho);
  padding: 14px 18px;
  border-radius: var(--r-btn);
  font-weight: 700;
}
.btn-bloco { width: 100%; margin-top: 8px; }

/* ========== Menu (lista de itens) ========== */
.item-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 12px;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 500;
  color: var(--texto);
  text-align: left;
  transition: background .12s;
}
.item-menu:hover { background: var(--bg); }
.item-menu span { font-size: 20px; }

/* ========== Edit categorias ========== */
.lista-categorias-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.cat-edit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-btn);
  background: var(--bg);
  cursor: pointer;
  transition: background .12s;
}
.cat-edit-item:hover { background: #eef0f3; }
.cat-edit-item .badge-cor {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cat-edit-item .nome { flex: 1; font-weight: 600; font-size: 14px; }
.cat-edit-item .seta { color: var(--texto-3); }

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bot));
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  animation: toastIn .25s ease;
  max-width: 90%;
}
.toast.erro { background: var(--vermelho); }
.toast.sucesso { background: var(--verde); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px);} to { opacity:1; transform: translate(-50%, 0);} }



/* ========== Filtro categoria ativo ========== */
.secao-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.secao-header h2 { margin-bottom: 0; }
.filtro-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bordo-claro);
  color: var(--bordo);
  border: 1px solid var(--bordo);
  padding: 4px 4px 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
}
.filtro-cat-pill button {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bordo);
  color: #fff;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* Categoria clicável (resumo) */
.cat-row { cursor: pointer; transition: background .12s; border-radius: 8px; padding: 10px 6px; }
.cat-row:hover { background: var(--bg); }
.cat-row.ativa { background: var(--bordo-claro); }

/* Badge de parcela */
.badge-parcela {
  display: inline-block;
  background: var(--bordo);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Campo parcelas */
.parcelas-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.parcelas-wrap input {
  width: 80px !important;
  text-align: center;
}
.parcelas-info {
  font-size: 13px;
  color: var(--texto-2);
  font-weight: 500;
}
.parcelas-info b { color: var(--bordo); font-weight: 700; }



/* ========== Toggle recorrente ========== */
.toggle-recorrente {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--borda);
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.toggle-recorrente:has(input:checked) {
  border-color: var(--bordo);
  background: var(--bordo-claro);
}
.toggle-recorrente input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--bordo);
  flex-shrink: 0;
  margin: 0;
}
.toggle-texto { display: flex; flex-direction: column; gap: 2px; }
.toggle-texto strong { font-size: 14px; font-weight: 600; color: var(--texto); }
.toggle-texto small { font-size: 12px; color: var(--texto-2); }

/* Badge recorrente */
.badge-recorrente {
  display: inline-block;
  background: #fff;
  color: var(--bordo);
  border: 1px solid var(--bordo);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}


/* ========== Popup ========== */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  padding: 20px;
  animation: fadeIn .18s ease;
}
.popup {
  background: var(--bg-card);
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  padding: 24px 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-2);
  animation: popIn .25s cubic-bezier(.16,1,.3,1);
}
@keyframes popIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.popup-icone-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.popup-icone {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 700;
  background: var(--bordo-claro);
  color: var(--bordo);
}
.popup-icone.sucesso { background: #e6f5ec; color: var(--verde); }
.popup-icone.erro    { background: #fce8eb; color: var(--vermelho); }
.popup-icone.aviso   { background: #fef5e0; color: #c47e0a; }
.popup-titulo {
  font-size: 17px;
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 6px;
}
.popup-msg {
  font-size: 14px;
  color: var(--texto-2);
  line-height: 1.5;
  margin-bottom: 18px;
  white-space: pre-wrap;
}
.popup-opcoes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.popup-opcao {
  padding: 12px 14px;
  border: 1.5px solid var(--borda);
  border-radius: var(--r-btn);
  background: var(--bg-card);
  color: var(--texto);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.popup-opcao:hover, .popup-opcao:active {
  border-color: var(--bordo);
  background: var(--bordo-claro);
}
.popup-botoes {
  display: flex;
  gap: 10px;
}
.popup-botoes > button { flex: 1; }
.popup-botoes .btn-secundario {
  padding: 12px 14px;
  font-size: 14px;
}
.popup-botoes .btn-primario,
.popup-botoes .btn-perigo {
  padding: 12px 14px;
  font-size: 14px;
}

/* ========== Loader ========== */
.loader-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 400;
  animation: fadeIn .15s ease;
}
.loader-box {
  background: var(--bg-card);
  padding: 22px 28px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-2);
  min-width: 160px;
}
.loader-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--bordo-claro);
  border-top-color: var(--bordo);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-texto {
  font-size: 13px;
  font-weight: 500;
  color: var(--texto-2);
}

.topo-atalhos { display: flex; gap: 2px; }
.topo-atalhos .icon-btn svg { width: 20px; height: 20px; }
.topo h1 { flex: 1; text-align: right; }

/* ===== Filtro com botão de calendário ===== */
.filtro-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.btn-calendario {
  background: var(--bg-card);
  border: 1.5px solid var(--borda);
  border-radius: var(--r-btn);
  padding: 0 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bordo);
  transition: border-color .15s, background .15s;
  flex-shrink: 0;
}
.btn-calendario:hover, .btn-calendario:active {
  border-color: var(--bordo);
  background: var(--bordo-claro);
}
.btn-calendario svg { width: 20px; height: 20px; }
.select-filtro { flex: 1; }

/* ===== Calendário ===== */
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cal-nav .icon-btn {
  color: var(--bordo);
  background: var(--bordo-claro);
  width: 36px; height: 36px;
  font-size: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cal-nav span {
  font-size: 16px;
  font-weight: 700;
  color: var(--texto);
  text-transform: capitalize;
}
.cal-grid-cabecalho {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.cal-grid-cabecalho span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--texto-2);
  text-transform: uppercase;
  padding: 4px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dia {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all .12s;
  border: 1.5px solid transparent;
}
.cal-dia.vazio { cursor: default; opacity: 0.3; }
.cal-dia.hoje { border-color: var(--bordo); color: var(--bordo); }
.cal-dia.tem-tarefa { background: var(--bordo-claro); }
.cal-dia.tem-tarefa::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--bordo);
  position: absolute;
  bottom: 5px;
}
.cal-dia:hover:not(.vazio) { background: var(--bg); }
.cal-dia.selecionado {
  background: var(--bordo);
  color: #fff;
}
.cal-dia.selecionado::after { background: #fff; }
.cal-legenda {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--texto-2);
}
.cal-legenda span { display: flex; align-items: center; gap: 6px; }
.cal-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.cal-dot.tem { background: var(--bordo); }

.filtros-ativos {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== Pago / Pendente ===== */
.badge-pendente {
  display: inline-block;
  background: #fef5e0;
  color: #c47e0a;
  border: 1px solid #e6b352;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}
.gasto-item.pendente .gasto-valor { color: #c47e0a; }
.gasto-item.pendente .gasto-icone-wrap { opacity: 0.55; }

.btn-toggle-pago {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--r-btn);
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid var(--verde);
  background: #e6f5ec;
  color: var(--verde);
  transition: filter .12s;
}
.btn-toggle-pago.pago {
  border-color: #e6b352;
  background: #fef5e0;
  color: #c47e0a;
}
.btn-toggle-pago:active { filter: brightness(0.96); }

.badge-pago {
  display: inline-block;
  background: #e6f5ec;
  color: var(--verde);
  border: 1px solid #9bd9b5;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Quebra pago / pendente no card de total */
.total-breakdown {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.total-bd-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.total-bd-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.3px;
}
.total-bd-valor { font-size: 17px; font-weight: 800; }
.total-bd-valor.pago { color: #7ee2a8; }
.total-bd-valor.pendente { color: #ffce6b; }

/* ===== Filtro de status (segmented) ===== */
.seg-status {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1.5px solid var(--borda);
  border-radius: var(--r-btn);
  padding: 3px;
  margin-bottom: 12px;
}
.seg-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--texto-2);
  background: transparent;
  transition: background .15s, color .15s;
}
.seg-btn.ativo {
  background: var(--bg-card);
  color: var(--bordo);
  box-shadow: var(--shadow);
}

/* ===== Período personalizado ===== */
.intervalo-wrap { padding: 10px 16px 0; }
.intervalo-datas {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.intervalo-datas label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.intervalo-datas label span {
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.intervalo-datas input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--borda);
  border-radius: var(--r-btn);
  background: var(--bg-card);
  color: var(--texto);
  outline: none;
  font-size: 16px;
}
.intervalo-datas input:focus { border-color: var(--bordo); }
.intervalo-wrap .btn-primario { padding: 11px 14px; font-size: 14px; }