/* Paleta branco e preto, responsivo, estilo app moderno */

/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  word-wrap: break-word; /* Evita texto estourar a tela */
}

html,
body {
  min-height: 100vh;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: #fff;
  color: #111;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Paleta */
:root {
  --black: #111;
  --white: #fff;
  --gray-light: #f5f5f5;
  --gray: #e0e0e0;
  --gray-dark: #888;
  --accent: #111;
  --accent-light: #222;
}

/* Containers principais */
.container {
  max-width: 430px;
  margin: 0 auto;
  padding: 1.2rem 1rem 1rem 1rem;
  position: relative;
}

.card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 2px 12px #0001;
  padding: 1.2rem 1rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--gray);
}

h1,
h2,
h3 {
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.7rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.1rem;
  color: var(--accent-light);
}

label {
  font-size: 1rem;
  color: var(--accent-light);
  margin-bottom: 0.3rem;
  display: block;
}

/* Inputs e botões */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
select {
  width: 90%;
  padding: 1rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--gray);
  border-radius: 14px;
  font-size: 1.1rem;
  background: var(--gray-light);
  color: var(--black);
  transition: box-shadow 0.2s, border 0.2s;
}

input[type="file"] {
  margin-bottom: 1rem;
}

input:focus,
select:focus {
  outline: none;
  border: 1.5px solid var(--accent);
  background: #fff;
}

button {
  width: 100%;
  padding: 1rem;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px #0002;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
}

button:hover,
button:focus {
  background: var(--accent-light);
  transform: translateY(-2px) scale(1.03);
}

a {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

a:hover {
  color: var(--gray-dark);
}

/* Topo usuário */
.topo-inicio {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#fotoUsuarioInicio {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px #0002;
  background: var(--gray-light);
}

#msgOlaInicio {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--black);
}

/* Estilos para a nova seção de previsão do tempo */
.card-previsao {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin-top: 20px;
  color: #333;
}

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

.previsao-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.toggle-button {
  background-color: var(--black);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.previsao-lista {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
}

.previsao-item {
  flex: 0 0 80px; /* Ajusta o tamanho dos cards de previsão */
  text-align: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 0.9rem;
}

.previsao-item img {
  width: 40px;
  height: 40px;
}

.previsao-item p {
  margin: 5px 0 0;
}

#weather-status {
  text-align: center;
  margin-top: 10px;
}

/* Filtro de data */
.filtro-data {
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  justify-content: flex-start;
}

.filtro-data label {
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--accent-light);
}

/* Cards de resumo rápido */
.resumos-rapidos {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}
.card-resumo {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 8px #0001;
  padding: 1rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  flex: 1;
  border: 1px solid var(--gray);
}
.icone-resumo {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 0.2rem;
}
.resumo-titulo {
  font-size: 0.95rem;
  color: var(--gray-dark);
}
.resumo-valor {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--black);
}

/* Gráficos circulares */
.graficos-circulares {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.grafico-circular {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 4px 24px #0001;
  padding: 1.2rem 1rem 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90vw;
  max-width: 340px;
  min-width: 180px;
  border: 1px solid var(--gray);
}

.grafico-label {
  font-size: 1.1rem;
  color: var(--gray-dark);
  margin-top: 0.7rem;
  text-align: center;
  font-weight: 500;
}

.valor-grafico {
  margin-top: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

/* Ferramentas rápidas */
.ferramentas-rapidas {
  display: flex;
  gap: 0.7rem;
  margin: 1.2rem 0 1.2rem 0;
  flex-wrap: wrap;
}
.ferramentas-rapidas button {
  flex: 1;
  min-width: 120px;
  background: var(--black);
  color: var(--white);
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  box-shadow: 0 2px 8px #0001;
  margin-bottom: 0.5rem;
}

/* Indicadores */
.indicadores {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.indicador {
  background: var(--gray-light);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  color: var(--accent-light);
}
.indicador .material-icons {
  color: var(--accent);
  font-size: 1.5rem;
}

/* Meta mensagem */
.meta-mensagem {
  font-size: 0.98rem;
  color: var(--accent);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Destaque topo */
.destaque-topo {
  background: var(--gray-light);
  border-radius: 18px;
  padding: 1rem 0.7rem;
  margin-bottom: 1.2rem;
}

/* --- ESTILOS PARA A NOVA LISTA DE GANHOS --- */

/* Container da lista */
ul#listaGanhos {
  list-style: none; /* Remove os pontos da lista */
  padding: 0;
  margin: 1.5rem 0;
}

/* Estilo de cada item da lista (o card) */
.ganho-item {
  background-color: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--gray);
}

/* Efeito ao passar o mouse */
.ganho-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

/* Informações de Ganho (Data e Valor) */
.ganho-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Permite que ocupe o espaço disponível */
}

.ganho-data {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.2rem;
}

.ganho-valor {
  font-size: 1.3rem;
  font-weight: 600;
  color: #13b15a;
}

/* Estilo do menu de ações */
.ganho-acoes {
  position: relative;
}

/* Botão de menu (os 3 pontinhos) */
.btn-menu-ganho {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1; /* Ajuste para centralizar verticalmente */
}

/* Container das opções de menu (Editar/Excluir) */
.menu-ganho-opcoes {
  position: absolute;
  top: 100%; /* Posiciona abaixo do botão */
  right: 0;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  min-width: 120px;
  overflow: hidden; /* Garante que as bordas arredondadas funcionem */
  display: none; /* Inicia oculto */
  border: 1px solid var(--gray);
}

/* Estilo dos links de ação (Editar/Excluir) */
.menu-ganho-opcoes a {
  display: block;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

/* Efeito ao passar o mouse nas opções */
.menu-ganho-opcoes a:hover {
  background-color: #f5f5f5;
}

/* Cores específicas para as ações */
.menu-ganho-opcoes a.btn-excluir {
  color: #e63946; /* Vermelho para a ação de excluir */
}

/* --- FIM DOS NOVOS ESTILOS --- */

/* Compartilhar WhatsApp */
.compartilhar-whatsapp {
  margin-top: 1.5rem;
  background: var(--gray-light);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 1px 4px #0001;
  border: 1px solid var(--gray);
}

.compartilhar-whatsapp label {
  font-size: 1rem;
  color: var(--accent-light);
  margin-right: 1.2rem;
}

.compartilhar-whatsapp button {
  background: var(--black);
  margin-top: 0.7rem;
}

/* Perfil */
.perfil-topo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.2rem;
}

#fotoUsuarioPerfil {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--black);
  background: var(--gray-light);
  box-shadow: 0 2px 8px #0001;
}

.perfil-dados {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: var(--black);
}

.perfil-dados strong {
  color: var(--accent-light);
}

#formAlterarCadastro input {
  margin-bottom: 0.7rem;
}

#btnSair {
  background: #d32f2f;
  margin-top: 1.2rem;
}

#btnSair:hover {
  background: #b71c1c;
}

.foto-perfil-container {
  text-align: center;
  margin-bottom: 1rem;
}

.opcoes-avatar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.avatar-opcao {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border 0.2s ease;
}

.avatar-opcao.selecionado {
  border-color: #2196f3;
}

.foto-perfil {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: block;
  margin: 0 auto 0.5rem;
}

#bottomBar {
  display: none;
}
/* Barra inferior de navegação */
.bottom-bar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: var(--white);
  /*border-top: 1.5px solid var(--gray);*/
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.2rem 0;
  z-index: 100;
  /*box-shadow: 0 -2px 12px #0001;*/
  height: 70px;
}

.bottom-bar button {
  background: none;
  border: none;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent-light);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem 0.7rem;
  transition: color 0.2s;
}

.bottom-bar button:focus,
.bottom-bar button:hover {
  color: var(--black);
}

.bottom-bar .material-icons {
  font-size: 2.3rem;
}

.bottom-bar .label {
  font-size: 0.95rem;
  margin-top: 0.1rem;
  font-weight: 500;
}

.usuario-logado {
  margin-left: 1rem;
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: bold;
  align-self: center;
  white-space: nowrap;
}

/* Login/Cadastro */
.login-container {
  max-width: 370px;
  margin: 40px auto;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 2px 12px #0001;
  padding: 2rem 1.2rem;
  text-align: center;
  border: 1px solid var(--gray);
}

.login-container input {
  width: 100%;
  padding: 1rem;
  margin: 0.7rem 0;
  border-radius: 14px;
  border: 1px solid var(--gray);
  font-size: 1.1rem;
  background: var(--gray-light);
  box-shadow: 0 1px 4px #0001;
  color: var(--black);
}

.login-container button {
  width: 100%;
  padding: 1rem;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 1rem;
}

.login-container .link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.login-container .link:hover {
  color: var(--gray-dark);
}

/* Barra de progresso da meta */
.progresso-meta {
  width: 100%;
  height: 10px;
  background-color: #eee;
  border-radius: 5px;
  margin-top: 10px;
  overflow: hidden;
}

.progresso-barra {
  height: 100%;
  background-color: #4caf50;
  transition: width 0.3s ease;
}

/* Estilo quando a meta é atingida */
.progresso-barra.meta-completa {
  background-color: #1ee66c;
}

footer {
  text-align: center;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Botão de apoio */
.btn-apoio {
  display: inline-block;
  background-color: white;
  color: black;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 1rem;
  transition: background-color 0.3s;
  max-width: 90%;
  box-sizing: border-box;
}

.btn-apoio:hover {
  background-color: #000;
  color: #fff;
}

/* Texto e ícone GitHub */
footer p {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
}

footer a i {
  font-size: 1.5rem;
  color: #000;
  margin-top: 0.3rem;
  transition: color 0.3s;
}

footer a i:hover {
  color: #ffffff;
}

/* Responsividade extra para telas muito pequenas */
@media (max-width: 480px) {
  .btn-apoio {
    font-size: 0.9rem;
    padding: 10px 16px;
  }

  footer p {
    font-size: 0.8rem;
  }

  footer a i {
    font-size: 1.3rem;
  }
}

/* --- Ajustes de Responsividade --- */

/* Tablets */
@media (max-width: 900px) {
  .resumos-rapidos {
    flex-wrap: wrap;
    justify-content: center;
  }
  .ferramentas-rapidas {
    justify-content: center;
  }
}

/* Smartphones médios */
@media (max-width: 600px) {
  .container,
  .login-container {
    max-width: 90%;
    padding: 1rem 0.5rem;
    margin-bottom: 80px;
  }

  .graficos-circulares {
    gap: 1rem;
  }

  .grafico-circular {
    width: 100%;
    max-width: 320px;
  }

  .resumos-rapidos,
  .ferramentas-rapidas {
    flex-direction: column;
    align-items: stretch;
  }

  .bottom-bar {
    height: 64px;
    font-size: 0.95rem;
  }
}

/* Smartphones muito pequenos */
@media (max-width: 400px) {
  .container,
  .login-container {
    padding: 0.7rem 0.3rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .grafico-circular {
    padding: 0.5rem;
    min-width: auto;
  }

  .bottom-bar .material-icons {
    font-size: 1.5rem;
  }

  .bottom-bar .label {
    font-size: 0.75rem;
  }

  button {
    font-size: 1rem;
    padding: 0.8rem;
  }
}
