﻿body {
  background: #f5f6fa;
  padding: var(--espaco-topo, 220px) 10px 96px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.meses-recolhido {
  --espaco-topo: 86px;
}

.card {
  border-radius: 18px;
}

.list-group-item {
  border-radius: 12px;
  transition: 0.2s;
}

.list-group-item:hover {
  transform: translateY(-2px);
  background: #f1f3f5;
}

.acoes-compra {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 6px;
}

.acoes-compra .btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.controles-compra {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  max-width: 100%;
}

.controles-compra > small {
  flex-basis: 100%;
}

.controle-compra-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1d4f91;
  font-size: 0.78rem;
  line-height: 1.2;
}

.controle-compra-chip strong {
  white-space: nowrap;
}

.controle-rateio-resumo {
  display: grid;
  gap: 4px;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f5f8ff;
  color: #334155;
  font-size: 0.9rem;
}

.controle-rateio-lista {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.controle-rateio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.controle-rateio-item small {
  display: block;
  color: #64748b;
}

.parcelamento-detalhado-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.parcelamento-detalhado-item > div:first-child {
  min-width: 0;
}

.parcelamento-detalhado-item strong {
  overflow-wrap: anywhere;
}

.parcelamento-condicao-ativo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
}

.parcelamento-condicao-badge {
  display: inline-flex;
  width: fit-content;
  margin: 4px 0 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.parcelamento-detalhado-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef5ff;
  color: #153e75;
  font-weight: 700;
}

.parcelamento-detalhado-total span {
  color: #64748b;
  font-weight: 600;
}

.parcelamento-detalhado-total strong,
.parcelamento-detalhado-total strong span {
  color: #0f766e;
  font-weight: 800;
}

/* 🔥 NOVO - HEADER APP */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #0d6efd;
  color: white;
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  z-index: 999;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.app-header-main {
  width: min(100%, 980px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

button {
  padding: 14px;
  font-size: 16px;
}

input,
select {
  padding: 12px;
  font-size: 16px;
}

.app-total {
  text-align: center;
  line-height: 1.1;
  min-width: 145px;
  background: rgba(255, 255, 255, 0.18);
  padding: 7px 12px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.app-total small {
  display: block;
  opacity: 0.85;
  font-size: 12px;
  margin-bottom: 2px;
}

.app-total strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
}

.app-totais-cartoes {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.app-total-card {
  min-width: 96px;
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 9px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  line-height: 1.1;
}

.app-total-card small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0.9;
  font-size: 11px;
  margin-bottom: 3px;
}

.app-total-card img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.app-total-card strong {
  display: block;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.home-total-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.inicio-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(300px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

body.app-view-inicio .painel-esquerda {
  display: none;
}

body.app-view-inicio .painel-direita {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}

body.app-view-inicio .container {
  max-width: 1180px;
}

.inicio-dashboard > .card {
  min-width: 0;
}

.resumo-cartoes-card,
.historico-dia-card {
  height: calc(100% - 1rem);
}

.resumo-cartoes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.resumo-cartoes-header .btn-atualizar-pagina {
  flex-shrink: 0;
}

.home-total-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border-radius: 16px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #0b5ed7, #0dcaf0);
  box-shadow: 0 12px 28px rgba(13, 110, 253, 0.18);
}

.home-total-card::after {
  content: "";
  position: absolute;
  inset: -80% auto -80% -40%;
  width: 45%;
  transform: rotate(22deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );
  animation: brilhoCartao 3.8s ease-in-out infinite;
}

.home-total-card.itau {
  padding: 10px;
  color: #172033;
  background: #ffffff;
  border: 1px solid rgba(255, 122, 0, 0.22);
  box-shadow: 0 12px 28px rgba(255, 122, 0, 0.14);
}

.home-total-card.carrefour {
  padding: 10px;
  color: #172033;
  background: #ffffff;
  border: 1px solid rgba(0, 87, 168, 0.2);
  box-shadow: 0 12px 28px rgba(0, 87, 168, 0.12);
}

.home-total-card.itau::before,
.home-total-card.carrefour::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: auto;
  left: -45%;
  width: 38%;
  height: 94px;
  z-index: 3;
  transform: skewX(-22deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  animation: brilhoCartaoImagem 3.8s ease-in-out infinite;
  pointer-events: none;
}

.home-card-bg {
  position: relative !important;
  display: block;
  width: 100% !important;
  height: 94px !important;
  object-fit: contain !important;
  background: transparent;
  border-radius: 12px;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.16)) !important;
  z-index: 1 !important;
}

.home-card-content {
  position: relative;
  z-index: 2;
  min-height: auto;
  padding: 10px 2px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.home-total-card small {
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0.9;
  font-weight: 700;
}

.home-total-card small img {
  width: 58px;
  height: 36px;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: normal;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.24));
  position: relative;
  z-index: 1;
}

.home-total-card strong {
  display: block;
  margin-top: 18px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.home-card-content strong {
  margin-top: 4px;
  color: #172033;
}

.inicio-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.btn-sair-inicio {
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 700;
}

.historico-dia-card {
  background:
    linear-gradient(180deg, rgba(13, 110, 253, 0.05), transparent 44%), #fff;
}

.historico-dia-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.historico-dia-header h6 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  color: #172033;
}

.historico-dia-header small {
  color: #64748b;
  font-weight: 600;
}

.historico-dia-total {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0b5ed7;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.historico-dia-lista {
  display: grid;
  gap: 8px;
  max-height: 314px;
  overflow: auto;
  padding-right: 3px;
}

.historico-dia-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e7eef8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.historico-dia-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f1f5ff;
}

.historico-dia-info {
  min-width: 0;
}

.historico-dia-info strong,
.historico-dia-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.historico-dia-info strong {
  color: #172033;
  font-size: 0.9rem;
}

.historico-dia-info small {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.historico-dia-valor {
  color: #0f8a4b;
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.historico-dia-vazio {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
  text-align: center;
  font-weight: 700;
}

@keyframes brilhoCartao {
  0%,
  42% {
    transform: translateX(0) rotate(22deg);
  }
  72%,
  100% {
    transform: translateX(420%) rotate(22deg);
  }
}

@keyframes brilhoCartaoImagem {
  0%,
  42% {
    transform: translateX(0) skewX(-22deg);
  }
  72%,
  100% {
    transform: translateX(420%) skewX(-22deg);
  }
}

.app-mes-atual {
  min-width: 140px;
  line-height: 1.1;
}

.app-mes-atual small {
  display: block;
  opacity: 0.82;
  font-size: 12px;
  margin-top: 3px;
}

.app-mes-atual strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.app-config {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-toggle-valores {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.btn-atualizar-pagina {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu-card.d-none {
  display: none !important;
}

.bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1200;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: #6c757d;
  min-height: 56px;
  padding: 7px 3px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav i {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav button.ativo {
  color: #0d6efd;
  background: #e7f1ff;
}

.section-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  color: inherit;
}

.section-toggle h6 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #212529;
}

.section-content {
  margin-top: 12px;
}

.section-content.oculto {
  display: none;
}

.opcoes-bloco {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.opcoes-bloco + .opcoes-bloco {
  margin-top: 12px;
}

.opcoes-bloco-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 2px;
}

.opcoes-bloco-header strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #172033;
  font-weight: 800;
}

.opcoes-bloco-header small {
  display: block;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

.pluggy-sync-resultado {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 0.86rem;
}

.pluggy-sync-resultado strong {
  color: #172033;
}

.pluggy-sync-metricas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.pluggy-sync-metrica {
  padding: 7px 8px;
  border-radius: 10px;
  background: #eef5ff;
  color: #1d4f91;
  font-weight: 800;
}

.pluggy-sync-metrica span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.grupo-data {
  background: #e7f1ff;
  color: #0d6efd;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  margin: 14px 0 6px;
  font-size: 14px;
}

.grupo-parcelado-mes {
  background: #e9ecef;
  color: #495057;
}

.grupo-parcelado-andamento {
  background: #d1e7dd;
  color: #146c43;
}

.grupo-parcelado-ultima {
  background: #fff3cd;
  color: #997404;
}

.grupo-parcelado-clicavel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.grupo-parcelado-clicavel:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.grupo-parcelado-clicavel small {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.75;
}

.grupo-parcelado-ativo {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.ranking-categoria {
  height: 8px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.ranking-categoria-barra {
  height: 100%;
  background: #0d6efd;
  border-radius: 999px;
}

.orcamento-card {
  border: 1px solid #e5edf7;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.orcamento-card.orcamento-ok {
  border-left: 4px solid #198754;
}

.orcamento-card.orcamento-alerta {
  border-left: 4px solid #ffc107;
}

.orcamento-card.orcamento-perigo {
  border-left: 4px solid #dc3545;
}

.orcamento-grafico {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border: 1px solid #e5edf7;
}

.orcamento-grafico-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.orcamento-grafico-topo strong {
  color: #172033;
  font-size: 18px;
}

.orcamento-grafico-barras {
  height: 62px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 7px;
  padding: 4px 2px;
}

.orcamento-grafico-barras span {
  display: block;
  border-radius: 999px 999px 6px 6px;
  background: #e2e8f0;
  transition: 0.2s;
}

.orcamento-grafico.orcamento-ok .orcamento-grafico-barras span.ativo,
.orcamento-grafico.orcamento-ok .orcamento-grafico-linha span,
.orcamento-semana.orcamento-ok .orcamento-semana-barra span {
  background: linear-gradient(180deg, #22c55e, #198754);
}

.orcamento-grafico.orcamento-alerta .orcamento-grafico-barras span.ativo,
.orcamento-grafico.orcamento-alerta .orcamento-grafico-linha span,
.orcamento-semana.orcamento-alerta .orcamento-semana-barra span {
  background: linear-gradient(180deg, #ffd666, #ffc107);
}

.orcamento-grafico.orcamento-perigo .orcamento-grafico-barras span.ativo,
.orcamento-grafico.orcamento-perigo .orcamento-grafico-linha span,
.orcamento-semana.orcamento-perigo .orcamento-semana-barra span {
  background: linear-gradient(180deg, #ff6b6b, #dc3545);
}

.orcamento-grafico-linha,
.orcamento-semana-barra {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 10px;
}

.orcamento-grafico-linha span,
.orcamento-semana-barra span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.orcamento-semanas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.orcamento-semana {
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e5edf7;
  font-size: 12px;
}

.orcamento-semana small {
  color: #64748b;
}

.filtro-ativo {
  background: #fff3cd;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.filtro-cartao {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.filtro-cartao button {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.filtro-cartao img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.categoria-clicavel {
  cursor: pointer;
}

.modal-app {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.modal-app.d-none {
  display: none;
}

.bg-orange {
  background-color: #fd7e14 !important;
}

.modal-app-caixa {
  width: min(100%, 360px);
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.bloco-esquerda {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.form-compras-card {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin-bottom: 14px;
}

.historico-meses-card {
  width: min(100%, 720px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  color: white;
  overflow: hidden;
}

.historico-meses-card.p-3 {
  padding: 10px 12px !important;
}

.meses-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.45fr);
  gap: 8px;
  margin-bottom: 10px;
}

.historico-meses-card h6 {
  color: white;
  font-weight: 800;
  font-size: 18px;
  margin: 0;
}

.historico-meses-topo {
  width: min(100%, 720px);
  border-radius: 16px;
}

.historico-meses-header {
  width: 100%;
  border: 0;
  background: transparent;
  color: white;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 8px;
}

.historico-meses-compacto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
  font-size: 13px;
  white-space: nowrap;
}

.historico-meses-compacto strong {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 800;
}

.historico-meses-mini-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.historico-meses-mini-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.historico-meses-conteudo {
  margin-top: 8px;
  transition:
    max-height 0.2s ease,
    opacity 0.2s ease,
    margin-top 0.2s ease;
  max-height: 160px;
  opacity: 1;
}

.historico-meses-conteudo.oculto {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
}

.historico-meses-card .form-select {
  background-color: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.2);
}

.historico-meses {
  display: grid;
  grid-template-columns: 36px repeat(3, minmax(0, 1fr)) 36px;
  align-items: end;
  gap: 6px;
}

.historico-navegacao {
  width: 36px;
  height: 54px;
  border: 0;
  background: #eef5ff;
  color: #0d6efd;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 12px;
  align-self: stretch;
}

.historico-navegacao:hover {
  background: #dcecff;
}

.historico-mes {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 2px 12px;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  text-align: center;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
}

.historico-mes:hover {
  color: white;
}

.historico-mes.ativo {
  color: white;
  font-weight: 800;
  border-bottom-color: white;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
}

.historico-valor {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
}

.historico-mes.ativo .historico-valor {
  color: white;
}

/* =========================
   LOGIN
========================= */

.auth-gate {
  z-index: 10000;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.18), transparent 42%),
    #0f172a;
  backdrop-filter: blur(8px);
}

.login-card {
  width: min(100%, 420px);
  padding: 34px 32px 30px;
  border-radius: 24px !important;
  background: #ffffff;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.28),
    0 4px 16px rgba(15, 23, 42, 0.12);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  display: block;
  width: 160px !important;
  max-width: none !important;
  height: auto;
  margin: 0 auto 18px;
}

.login-title {
  margin: 0;
  color: #172033;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.login-description {
  margin: 10px auto 0;
  color: #64748b;
  font-size: 0.93rem;
  line-height: 1.5;
}

.login-disclaimer {
  max-width: 330px;
  margin: 7px auto 0;
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.45;
}

.login-form-group {
  margin-bottom: 17px;
}

.login-form-group label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
}

.login-form-group .form-control {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fafc;
  color: #172033;
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.login-form-group .form-control:hover {
  border-color: #c3cfdd;
}

.login-form-group .form-control:focus {
  border-color: #2563eb;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.login-button {
  width: 100%;
  min-height: 50px;
  margin-top: 5px;
  padding: 10px 18px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  color: #ffffff;
  background: linear-gradient(135deg, #1677ff, #185adb);

  font-size: 0.98rem;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 10px 22px rgba(24, 90, 219, 0.22);

  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.login-button:hover {
  filter: brightness(1.04);
  box-shadow: 0 13px 28px rgba(24, 90, 219, 0.28);
}

.login-button:active {
  transform: translateY(1px);
}

.login-password-wrap {
  position: relative;
}

.login-password-wrap .form-control {
  padding-right: 48px;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);

  width: 34px;
  height: 34px;
  padding: 0 !important;

  border: 0;
  border-radius: 9px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  color: #64748b;

  font-size: 1.1rem !important;
  cursor: pointer;
}

.login-password-toggle:hover {
  background: #eef4ff;
  color: #2563eb;
}

.login-password-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

#authGateErro {
  margin-top: 14px;
}

/* Impede a página atrás do login de rolar */
body:has(#authGate:not(.d-none)) {
  overflow: hidden;
}

/* Celulares */
@media (max-width: 576px) {
  .auth-gate {
    padding: 16px 12px !important;
  }

  .login-card {
    width: 100%;
    max-width: 420px;
    padding: 24px 22px 22px;
  }

  .login-header {
    margin-bottom: 20px;
  }

  .login-logo {
    width: 112px !important;
    max-width: 112px !important;
    margin-bottom: 12px;
  }

  .login-form-group {
    margin-bottom: 13px;
  }
}

/* Celulares muito pequenos */
@media (max-width: 360px) {
  .login-card {
    padding: 24px 18px 21px;
  }

  .login-logo {
    width: 98px !important;
    max-width: 98px !important;
  }

  .login-title {
    font-size: 1.16rem;
  }
}

/* Centralização segura do login */
.auth-gate {
  align-items: flex-start !important;
  padding: 24px 16px !important;
  overflow-y: auto;
  box-sizing: border-box;
}

.login-card {
  flex: 0 0 auto;
  margin: auto;
}

/* Telas com pouca altura, como a da imagem */
@media (max-height: 700px) and (min-width: 577px) {
  .auth-gate {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .login-card {
    padding: 22px 32px 20px;
  }

  .login-header {
    margin-bottom: 18px;
  }

  .login-logo {
    margin-bottom: 10px;
  }

  .login-description {
    margin-top: 6px;
  }

  .login-disclaimer {
    margin-top: 4px;
  }

  .login-form-group {
    margin-bottom: 12px;
  }

  .login-form-group .form-control {
    min-height: 44px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .login-button {
    min-height: 46px;
  }
}

/* =========================
   RESPONSIVIDADE DO APP
   CELULAR
========================= */
@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }

  body.meses-recolhido {
    --espaco-topo: 92px;
  }

  .inicio-dashboard {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .inicio-dashboard > .card {
    width: 100%;
    min-width: 0;
  }

  .home-total-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  .resumo-cartoes-card,
  .historico-dia-card {
    height: auto;
  }

  .resumo-cartoes-header {
    align-items: flex-start;
  }

  .historico-dia-header {
    align-items: flex-start;
  }

  .historico-dia-lista {
    max-height: 260px;
  }

  .home-total-card {
    width: 100%;
    min-height: 96px;
  }

  .home-total-card strong {
    margin-top: 12px;
    font-size: 22px;
  }

  .inicio-dashboard,
  .home-total-grid {
    overflow: visible;
  }

  .orcamento-semanas {
    grid-template-columns: 1fr;
  }
}
