* { box-sizing: border-box; }

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #f4f4f2;
  color: #222;
}

@media (prefers-color-scheme: dark) {
  body { background: #1c1c1e; color: #eee; }
  .tabela, .aba, .topo { background: #2a2a2d; }
  input, select, button { background: #333; color: #eee; border-color: #555; }
  th { background: #3a3a3d; }
  tr:nth-child(even) td { background: #262628; }
}

.topo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.topo h1 { margin: 0; font-size: 1.3rem; }

.seletor-casa { display: flex; gap: 1rem; flex-wrap: wrap; }

.abas {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid #ddd;
}

.aba-botao {
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
  white-space: nowrap;
}

.aba-botao.ativa { border-bottom: 2px solid #2a7a4f; font-weight: bold; }

main { padding: 1rem; max-width: 900px; margin: 0 auto; }

.aba { display: none; }
.aba.ativa { display: block; }

.tabela {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  overflow-x: auto;
  display: block;
}

.tabela thead, .tabela tbody { display: table; width: 100%; table-layout: fixed; }

.tabela th, .tabela td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #e3e3e3;
}

.form-linha {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input, select, button {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}

button {
  cursor: pointer;
  background: #2a7a4f;
  color: #fff;
  border: none;
}

button:hover { background: #1f5c3b; }

.lista-simples { list-style: none; padding: 0; font-size: 0.9rem; color: #555; }

.mensagem {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.mensagem.visivel { opacity: 1; }

.receita-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem;
  margin-bottom: 0.6rem;
}

.ingrediente-linha { display: flex; gap: 0.5rem; margin-bottom: 0.3rem; }

.cardapio-dia { margin-bottom: 0.6rem; }
.cardapio-dia h4 { margin: 0.2rem 0; }
.cardapio-item-linha { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; }
