﻿:root {
  --bg: #eceef1;
  --bg-soft: #f3f5f7;
  --surface: #f9fafc;
  --surface-strong: #e4e8ed;
  --surface-muted: #dfe4e9;
  --card-border: #dbe3ea;
  --card-border-strong: #cfd8e2;
  --text: #08263f;
  --text-soft: #334351;
  --text-muted: #6a7683;
  --primary: #063f57;
  --primary-strong: #032d42;
  --accent: #61ee99;
  --good: #0b7b38;
  --warn: #bf1e1e;
  --shadow: 0 12px 28px rgb(3 32 50 / 12%);
  --focus-ring: 0 0 0 3px rgb(6 63 87 / 25%);
}

:root[data-theme="amoled"] {
  --bg: #000000;
  --bg-soft: #050505;
  --surface: #000000;
  --surface-strong: #0d0d0d;
  --surface-muted: #141414;
  --card-border: #1f1f1f;
  --card-border-strong: #2b2b2b;
  --text: #e7edf3;
  --text-soft: #bcc9d5;
  --text-muted: #8b9aa8;
  --primary: #0b5d80;
  --primary-strong: #083f58;
  --accent: #5de89d;
  --good: #5de89d;
  --warn: #ff7d72;
  --shadow: 0 18px 36px rgb(0 0 0 / 45%);
  --focus-ring: 0 0 0 3px rgb(93 232 157 / 28%);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top right, #f7f8fb 0%, var(--bg) 56%);
  color: var(--text);
  font-family: "Outfit", "Urbanist", sans-serif;
}

html[data-theme="amoled"],
html[data-theme="amoled"] body {
  background: #000;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 550, "GRAD" 0, "opsz" 24;
}

.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

.auth-view {
  min-height: 100dvh;
  padding: 1rem;
  display: grid;
  place-items: center;
}

.auth-card {
  width: 100%;
  background: color-mix(in srgb, var(--surface) 94%, white 6%);
  border: 1px solid var(--card-border);
  border-radius: 2.25rem;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: grid;
  gap: 0.95rem;
}

.auth-logo {
  margin: 0 auto;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #065a79);
}

.auth-logo .material-symbols-outlined {
  font-size: 1.55rem;
}

.auth-marca {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-card h1 {
  font-size: 1.75rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.auth-texto {
  text-align: center;
  color: var(--text-soft);
}

.abas-auth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.aba-auth {
  border: 0;
  border-radius: 0.9rem;
  min-height: 2.7rem;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-weight: 700;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.aba-auth.ativa {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #055777);
}

.formulario {
  display: grid;
  gap: 0.72rem;
}

.auth-card .formulario:not(.ativo) {
  display: none;
}

.selector-cadastro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.selector-cadastro__item {
  border: 1px solid #d7dde4;
  border-radius: 0.9rem;
  background: var(--bg-soft);
  padding: 0.55rem;
  color: var(--text-soft);
  font-weight: 600;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.selector-cadastro__item.ativo {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef6fa;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.92rem;
  background: var(--surface-muted);
  color: var(--text);
  min-height: 2.95rem;
  padding: 0.76rem 0.85rem;
  text-transform: none;
  letter-spacing: normal;
}

input::placeholder,
textarea::placeholder {
  color: #808a95;
}

:root[data-theme="amoled"] input::placeholder,
:root[data-theme="amoled"] textarea::placeholder {
  color: #72808d;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 30%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 14%, white);
}

textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.botao {
  border: 0;
  border-radius: 1rem;
  min-height: 3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease, background-color 0.14s ease;
}

.botao-primario {
  color: #fff;
  background: linear-gradient(140deg, var(--primary), #06597a);
  box-shadow: 0 10px 20px rgb(6 75 103 / 25%);
}

.botao-secundario {
  color: var(--primary);
  background: var(--surface-strong);
}

.botao:disabled,
.botao[disabled],
.menu__item:disabled,
.atalho-card:disabled,
.tipo-chip:disabled,
.chip-categoria-transacao:disabled,
.segmentado button:disabled,
.icone-botao:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.auth-rodape {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: #808992;
  font-size: 0.82rem;
}

.auth-status {
  min-height: 1.2rem;
  color: var(--warn);
  font-size: 0.88rem;
}

.app-view {
  min-height: 100dvh;
  padding-bottom: calc(7rem + env(safe-area-inset-bottom));
}

.topo-app {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem 0.75rem;
  background: rgb(236 238 241 / 90%);
  backdrop-filter: blur(15px);
}

.topo-identidade {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.topo-identidade > div {
  min-width: 0;
}

.avatar {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #153347, #065575);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.73rem;
}

.topo-marca {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--text-soft);
}

#titulo-view {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.topo-acoes {
  display: flex;
  gap: 0.4rem;
}

.icone-botao {
  border: 0;
  border-radius: 0.92rem;
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  background: var(--surface-strong);
  color: var(--primary);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.icone-botao .material-symbols-outlined {
  font-size: 1.2rem;
}

#btn-tema[aria-pressed="true"] {
  color: var(--accent);
}

.conteudo-mobile {
  padding: 0.45rem 1rem 0;
  display: grid;
  gap: 0.9rem;
}

.view {
  display: none;
}

.view.ativo {
  display: grid;
  gap: 0.9rem;
  animation: entrar 0.2s ease;
}

.hero-cofre {
  border-radius: 2rem;
  border: 1px solid rgb(255 255 255 / 10%);
  padding: 1.1rem;
  color: #fff;
  background: linear-gradient(145deg, #05394f, #066586 72%);
  box-shadow: 0 18px 34px rgb(5 74 103 / 30%);
  display: grid;
  gap: 0.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hero-cofre__titulo {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  opacity: 0.82;
}

.hero-cofre h3 {
  font-size: clamp(2.1rem, 9vw, 2.6rem);
  letter-spacing: -0.03em;
}

.hero-cofre > p:last-of-type {
  color: rgb(235 248 255 / 90%);
}

.hero-cofre__badge {
  margin-top: 0.2rem;
  width: fit-content;
  border-radius: 0.88rem;
  background: rgb(255 255 255 / 15%);
  border: 1px solid rgb(255 255 255 / 10%);
  padding: 0.48rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.hero-cofre__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-cofre__badges .hero-cofre__badge {
  margin-top: 0;
}

.hero-cofre__badge--shared {
  background: rgb(255 255 255 / 20%);
}

.hero-cofre__badge--individual {
  background: rgb(16 185 129 / 26%);
  border-color: rgb(167 243 208 / 52%);
}

.hero-limites,
.bloco {
  border-radius: 1.8rem;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--surface) 93%, white 7%);
  box-shadow: 0 8px 22px rgb(8 36 54 / 8%);
  padding: 0.95rem;
  display: grid;
  gap: 0.72rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hero-limites h3 {
  font-size: clamp(1.9rem, 8vw, 2.45rem);
  letter-spacing: -0.03em;
}

.hero-limites p {
  color: var(--text-soft);
}

.bloco h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.bloco-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.bloco-topo > * {
  min-width: 0;
}

.chip {
  border-radius: 999px;
  background: #67ec9e;
  color: #086a33;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.link-botao {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--good);
  font-weight: 700;
  font-size: 0.88rem;
  transition: color 0.18s ease, transform 0.18s ease;
}

.texto-suave {
  color: var(--text-soft);
}

.resumo-mensal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.resumo-mensal-grid strong {
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.legenda {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  font-weight: 700;
}

.legenda.positiva {
  color: var(--good);
}

.legenda.negativa {
  color: var(--warn);
}

.barra-progresso {
  width: 100%;
  height: 0.45rem;
  border-radius: 999px;
  background: #d9dee5;
  overflow: hidden;
}

.barra-progresso span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #085878, #57ea98);
  transition: width 0.25s ease;
}

.donut-wrap {
  display: grid;
  place-items: center;
}

.donut {
  width: 10.5rem;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(#d8dce2 0deg 360deg);
  display: grid;
  place-items: center;
  position: relative;
}

.donut::after {
  content: "";
  width: 6.8rem;
  height: 6.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid #e1e5ea;
}

.donut-center {
  position: absolute;
  z-index: 2;
  width: 5.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.56rem;
}

.lista__item {
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  background: var(--bg-soft);
  padding: 0.72rem;
  display: grid;
  gap: 0.35rem;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.lista-transacoes .lista__item {
  border-radius: 1.2rem;
}

.linha {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.linha > * {
  min-width: 0;
}

.linha > strong:first-child,
.linha > span:first-child,
.linha > small:first-child {
  flex: 1 1 11rem;
}

.linha strong,
.linha span,
.linha small {
  overflow-wrap: anywhere;
}

.linha .botao,
.linha .selo {
  flex: 0 0 auto;
}

.acoes-inline {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.linha small {
  color: var(--text-muted);
}

.lista-bancos-pre-cadastrados .lista__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.8rem;
  row-gap: 0.5rem;
}

.linha-banco-pre-cadastrado {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 0.7rem;
}

.icone-banco-pre-cadastrado {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bank-color, #063f57) 20%, white);
  color: var(--bank-color, #063f57);
  border: 1px solid color-mix(in srgb, var(--bank-color, #063f57) 34%, #d8e1ec);
  flex: 0 0 auto;
}

.icone-banco-pre-cadastrado .material-symbols-outlined {
  font-size: 1.2rem;
}

.icone-banco-pre-cadastrado--logo {
  background: #fff;
  border-color: #d8e1ec;
  overflow: hidden;
  padding: 0.18rem;
}

.icone-banco-pre-cadastrado--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.linha-banco-pre-cadastrado > div {
  min-width: 0;
}

.linha-banco-pre-cadastrado strong {
  display: block;
  line-height: 1.2;
}

@media (max-width: 620px) {
  .lista-bancos-pre-cadastrados .lista__item {
    grid-template-columns: 1fr;
  }

  .lista-bancos-pre-cadastrados .lista__item .botao {
    width: 100%;
  }

  .chat-ia-composer {
    grid-template-columns: 1fr;
  }

  .chat-ia-acoes {
    justify-content: flex-end;
  }
}

.valor-positivo {
  color: var(--good);
  font-weight: 700;
}

.valor-negativo {
  color: var(--warn);
  font-weight: 700;
}

.selo {
  border-radius: 999px;
  padding: 0.16rem 0.56rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.selo-seguro {
  background: color-mix(in srgb, var(--accent) 50%, white);
  color: #0a6831;
}

.selo-alerta {
  background: #f4e4b3;
  color: #7d5d14;
}

.selo-estourado {
  background: #ffd8d5;
  color: #8a1f1f;
}

.filtros-transacoes {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
}

.campo-busca,
.campo-mes {
  border-radius: 1rem;
  background: var(--surface-strong);
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.55rem;
}

.campo-busca input,
.campo-mes input {
  border: 0;
  min-height: 2.3rem;
  background: transparent;
  padding: 0;
}

.campo-busca input:focus,
.campo-mes input:focus {
  box-shadow: none;
}

.campo-selecao-inline {
  display: grid;
  gap: 0.25rem;
  min-width: 10.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.74rem;
}

.campo-selecao-inline span {
  color: var(--text-muted);
  font-weight: 700;
}

.seletor-tipo {
  background: var(--surface-strong);
  border-radius: 1.1rem;
  padding: 0.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
}

.tipo-chip {
  border: 0;
  border-radius: 0.85rem;
  min-height: 2.5rem;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.tipo-chip.ativo {
  color: #fff;
  background: linear-gradient(145deg, var(--primary), #055a7a);
}

.preview-valor {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--primary);
  font-weight: 800;
}

.chips-categorias {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.chip-categoria-transacao {
  border: 1px solid #d7dde4;
  border-radius: 0.88rem;
  background: #f4f6f9;
  color: var(--text-soft);
  min-height: 2.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.chip-categoria-transacao.ativo {
  border-color: #0c8440;
  color: #0c8440;
  background: #e8f8ef;
}

.valor-destaque {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.grafico-colunas {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.38rem;
  align-items: end;
  height: 8.8rem;
}

.coluna-grafico {
  border-radius: 0.5rem 0.5rem 0.15rem 0.15rem;
  background: #bdc9d3;
  min-height: 1rem;
  position: relative;
}

.coluna-grafico--positivo {
  background: linear-gradient(180deg, #5ceb99, #09793b);
}

.coluna-grafico--negativa {
  background: linear-gradient(180deg, #ffb0a9, #bf1e1e);
}

.coluna-grafico::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1.2rem;
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.grafico-colunas[data-dense="true"] .coluna-grafico::after {
  font-size: 0.52rem;
  letter-spacing: 0;
}

.chat-ia {
  display: grid;
  gap: 0.65rem;
}

.chat-ia--modal {
  min-height: 14rem;
  max-height: min(54dvh, 26rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.chat-ia-vazio {
  border: 1px dashed #cfd9e4;
  border-radius: 1rem;
  padding: 0.9rem;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--surface) 88%, white 12%);
}

.mensagem-chat-ia {
  max-width: min(100%, 32rem);
  border-radius: 1.15rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #dfe6ee;
  background: var(--surface-strong);
  display: grid;
  gap: 0.35rem;
  justify-self: start;
}

.mensagem-chat-ia strong {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mensagem-chat-ia p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.mensagem-chat-ia--user {
  justify-self: end;
  background: linear-gradient(135deg, #0b5c79, #0a7a56);
  border-color: transparent;
  color: #fff;
}

.mensagem-chat-ia--user strong {
  color: rgb(255 255 255 / 72%);
}

.mensagem-chat-ia--assistant {
  background: color-mix(in srgb, var(--surface) 90%, #edf7fb 10%);
}

.chat-ia-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 1.2rem;
  border: 1px solid #dbe4ec;
  background: color-mix(in srgb, var(--surface) 92%, white 8%);
}

.chat-ia-composer--modal {
  margin-top: auto;
}

.chat-ia-input {
  border: 0;
  background: transparent;
  min-height: 2.8rem;
  padding: 0 0.5rem;
}

.chat-ia-input:focus {
  outline: none;
  box-shadow: none;
}

.chat-ia-acoes {
  display: flex;
  gap: 0.45rem;
}

.botao-enviar-chat-ia {
  background: linear-gradient(135deg, var(--primary), #0c8440);
  color: #fff;
}

.icone-botao.gravando {
  background: linear-gradient(135deg, #bf1e1e, #ff6f6f);
  color: #fff;
  box-shadow: 0 0 0 0 rgb(191 30 30 / 45%);
  animation: pulso-gravacao 1.2s ease infinite;
}

#status-insights-ia,
#status-acao-transacao-ia {
  min-height: 1.1rem;
}

@keyframes pulso-gravacao {
  0% {
    box-shadow: 0 0 0 0 rgb(191 30 30 / 38%);
  }
  70% {
    box-shadow: 0 0 0 12px rgb(191 30 30 / 0%);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(191 30 30 / 0%);
  }
}

@keyframes giro-fab {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.stats-grid strong {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.stats-grid-master {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.master-deploy-log {
  border: 1px solid #d8e1ec;
  border-radius: 0.85rem;
  padding: 0.5rem 0.65rem;
  background: var(--surface-strong);
}

.master-deploy-log summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.master-deploy-log pre {
  margin: 0.55rem 0 0;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.75rem;
  line-height: 1.35;
}

.check-linha {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
}

.check-linha input {
  width: auto;
  min-height: auto;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 2.65rem;
  height: 1.5rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c8cfd8;
  transition: 0.2s;
}

.switch span::before {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  left: 0.2rem;
  top: 0.2rem;
  border-radius: 999px;
  background: #fff;
  transition: 0.2s;
}

.switch input:checked + span {
  background: #65eb9d;
}

.switch input:checked + span::before {
  transform: translateX(1.12rem);
}

.alternancia {
  padding: 0.4rem 0;
}

.atalhos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.atalho-card {
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  background: var(--surface-strong);
  min-height: 4.9rem;
  color: var(--primary);
  display: grid;
  place-items: center;
  gap: 0.16rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  padding: 0.75rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.atalho-card .material-symbols-outlined {
  font-size: 1.42rem;
}

.atalho-card span:last-child {
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.menu-inferior {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(0.55rem + env(safe-area-inset-bottom));
  width: min(425px, calc(100vw - 1rem));
  border-radius: 1.35rem;
  border: 1px solid #d9dfe6;
  background: rgb(238 242 246 / 92%);
  backdrop-filter: blur(14px);
  box-shadow: 0 -6px 20px rgb(3 32 49 / 10%);
  padding: 0.38rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.22rem;
  z-index: 70;
}

.menu__item {
  border: 0;
  border-radius: 0.88rem;
  min-height: 3.35rem;
  background: transparent;
  color: var(--text-soft);
  display: grid;
  place-items: center;
  gap: 0.08rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.2rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.menu__item .material-symbols-outlined {
  font-size: 1.08rem;
}

.menu__item span:last-child {
  line-height: 1.05;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.menu__item.ativo {
  background: linear-gradient(145deg, var(--primary), #055879);
  color: #fff;
}

.fab-stack {
  position: fixed;
  right: max(calc(50vw - 198px), 0.9rem);
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  display: block;
  z-index: 72;
}

.fab {
  position: relative;
  width: 4.08rem;
  height: 4.08rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--primary), #055979);
  color: #fff;
  box-shadow: 0 14px 26px rgb(5 68 94 / 34%);
  display: grid;
  place-items: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.fab * {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.fab::after {
  content: "";
  position: absolute;
  inset: -0.18rem;
  border-radius: 999px;
  border: 0.18rem solid rgb(255 255 255 / 18%);
  border-top-color: rgb(255 255 255 / 96%);
  opacity: 0;
  pointer-events: none;
}

.fab.gravando {
  background: linear-gradient(135deg, #bf1e1e, #ff6f6f);
  color: #fff;
  box-shadow: 0 0 0 0 rgb(191 30 30 / 45%);
  animation: pulso-gravacao 1.2s ease infinite;
}

.fab.pressionando {
  transform: scale(1.02);
}

.fab.pressionando::after {
  opacity: 1;
  animation: giro-fab 0.85s linear infinite;
}

.fab .material-symbols-outlined {
  font-size: 1.92rem;
}

body.acao-voz-bloqueando-selecao,
body.acao-voz-bloqueando-selecao * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translate(-50%, 140%);
  bottom: calc(6.25rem + env(safe-area-inset-bottom));
  z-index: 110;
  border-radius: 0.9rem;
  background: var(--primary);
  color: #fff;
  padding: 0.72rem 0.9rem;
  box-shadow: 0 10px 22px rgb(3 33 50 / 26%);
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.toast.visivel {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.modal-shell {
  position: fixed;
  inset: 0;
  background: rgb(4 25 37 / 48%);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  z-index: 120;
  padding: 1rem;
}

.modal-card {
  width: min(100%, 25rem);
  border-radius: 1.6rem;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--surface) 94%, white 6%);
  box-shadow: 0 22px 46px rgb(3 33 50 / 22%);
  padding: 1.15rem;
  display: grid;
  gap: 0.85rem;
}

.modal-card--grande {
  width: min(100%, 38rem);
}

.modal-card--rolavel {
  max-height: min(90dvh, 48rem);
  overflow: auto;
}

.modal-card--chat {
  width: min(100%, 34rem);
  min-height: min(82dvh, 38rem);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.modal-card h3 {
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.modal-chat-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.modal-chat-topo h3,
.modal-chat-topo p {
  margin: 0;
}

.modal-acoes {
  display: grid;
  gap: 0.6rem;
}

.modal-acoes--linha {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmentado {
  border-radius: 0.9rem;
  background: var(--surface-strong);
  padding: 0.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.2rem;
}

.segmentado button {
  border: 0;
  min-height: 2.05rem;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--text-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.segmentado button.ativo {
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.botao:focus-visible,
.icone-botao:focus-visible,
.menu__item:focus-visible,
.atalho-card:focus-visible,
.tipo-chip:focus-visible,
.chip-categoria-transacao:focus-visible,
.segmentado button:focus-visible,
.aba-auth:focus-visible,
.selector-cadastro__item:focus-visible,
.link-botao:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (hover: none), (pointer: coarse) {
  .botao:active,
  .icone-botao:active,
  .menu__item:active,
  .atalho-card:active,
  .tipo-chip:active,
  .chip-categoria-transacao:active,
  .segmentado button:active,
  .aba-auth:active,
  .selector-cadastro__item:active,
  .fab:active {
    transform: scale(0.98);
    filter: brightness(0.96);
  }

  .link-botao:active {
    transform: translateY(1px);
    color: color-mix(in srgb, var(--good) 80%, black);
  }

  .menu__item.ativo:active,
  .tipo-chip.ativo:active,
  .segmentado button.ativo:active {
    filter: brightness(0.92);
  }
}

@media (hover: hover) {
  .bloco:hover,
  .hero-limites:hover,
  .hero-cofre:hover {
    transform: translateY(-3px);
    border-color: #cfd8e2;
    box-shadow: 0 16px 30px rgb(8 36 54 / 12%);
  }

  .lista__item:hover,
  .atalho-card:hover {
    transform: translateY(-2px);
    border-color: #d0d8e1;
    box-shadow: 0 12px 24px rgb(8 36 54 / 10%);
  }

  .icone-botao:hover,
  .fab:hover,
  .menu__item:hover,
  .tipo-chip:hover,
  .chip-categoria-transacao:hover,
  .segmentado button:hover,
  .link-botao:hover {
    transform: translateY(-1px);
  }
}

.oculto {
  display: none !important;
}

:root[data-theme="amoled"] .auth-card {
  background: #050505;
  border-color: var(--card-border);
  box-shadow: 0 22px 48px rgb(0 0 0 / 52%);
}

:root[data-theme="amoled"] .selector-cadastro__item.ativo {
  background: #07151c;
}

:root[data-theme="amoled"] .topo-app {
  background: rgb(0 0 0 / 92%);
  border-bottom: 1px solid var(--card-border);
}

:root[data-theme="amoled"] .hero-cofre {
  background: linear-gradient(145deg, #02141d, #0a4f6d 72%);
  border-color: rgb(255 255 255 / 12%);
  box-shadow: 0 20px 38px rgb(0 0 0 / 42%);
}

:root[data-theme="amoled"] .hero-limites,
:root[data-theme="amoled"] .bloco,
:root[data-theme="amoled"] .lista__item,
:root[data-theme="amoled"] .donut::after {
  background: #050505;
  border-color: var(--card-border);
  box-shadow: 0 12px 26px rgb(0 0 0 / 34%);
}

:root[data-theme="amoled"] .chip {
  background: #0e2b18;
  color: #8ff2ba;
}

:root[data-theme="amoled"] .selo-alerta {
  background: #30250d;
  color: #ffd978;
}

:root[data-theme="amoled"] .selo-estourado {
  background: #331311;
  color: #ff9c95;
}

:root[data-theme="amoled"] .campo-busca,
:root[data-theme="amoled"] .campo-mes,
:root[data-theme="amoled"] .seletor-tipo,
:root[data-theme="amoled"] .segmentado,
:root[data-theme="amoled"] .switch span,
:root[data-theme="amoled"] .atalho-card,
:root[data-theme="amoled"] .icone-botao,
:root[data-theme="amoled"] .selector-cadastro__item,
:root[data-theme="amoled"] .aba-auth,
:root[data-theme="amoled"] input,
:root[data-theme="amoled"] select,
:root[data-theme="amoled"] textarea {
  background: var(--surface-strong);
}

:root[data-theme="amoled"] input,
:root[data-theme="amoled"] select,
:root[data-theme="amoled"] textarea,
:root[data-theme="amoled"] .switch span,
:root[data-theme="amoled"] .chip-categoria-transacao,
:root[data-theme="amoled"] .selector-cadastro__item {
  border-color: #1d1d1d;
}

:root[data-theme="amoled"] .segmentado button.ativo {
  background: #151515;
  color: var(--text);
}

:root[data-theme="amoled"] .chip-categoria-transacao {
  background: #101010;
  color: var(--text-soft);
}

:root[data-theme="amoled"] .chip-categoria-transacao.ativo {
  background: #0d2416;
  color: #8ff2ba;
  border-color: #245b3d;
}

:root[data-theme="amoled"] .icone-banco-pre-cadastrado--logo {
  background: #0d0d0d;
  border-color: var(--card-border);
}

:root[data-theme="amoled"] .donut {
  background: conic-gradient(#1c1c1c 0deg 360deg);
}

:root[data-theme="amoled"] .menu-inferior {
  background: rgb(0 0 0 / 94%);
  border-color: var(--card-border);
  box-shadow: 0 -8px 26px rgb(0 0 0 / 44%);
}

:root[data-theme="amoled"] .coluna-grafico {
  background: #2a2a2a;
}

:root[data-theme="amoled"] .toast {
  background: #0b5d80;
  color: #f8fbfd;
}

:root[data-theme="amoled"] .modal-card {
  background: #050505;
  border-color: var(--card-border);
  box-shadow: 0 22px 46px rgb(0 0 0 / 48%);
}

@media (min-width: 860px) {
  body {
    padding: 1.1rem 0;
  }

  .app-shell {
    border-radius: 2.2rem;
    overflow: hidden;
    border: 1px solid #d9dfe6;
    box-shadow: 0 24px 48px rgb(5 39 58 / 15%);
  }

  .fab-stack {
    right: calc(50vw - 206px);
  }
}

@keyframes entrar {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
