* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f6f5;
  color: #1c2321;
  line-height: 1.4;
}

.cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: #21493f;
  color: #fff;
}

.cabecalho .marca {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.cabecalho nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.cabecalho nav a {
  color: #cfe8de;
}

.conteudo {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

.mensagens {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.mensagens li {
  background: #fdecea;
  border: 1px solid #f3b8b0;
  color: #7a2e24;
  padding: 0.6rem 0.8rem;
  border-radius: 0.4rem;
  margin-bottom: 0.5rem;
}

.formulario {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #fff;
  padding: 1.25rem;
  border-radius: 0.6rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.formulario label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.formulario input {
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #c7d0cc;
  border-radius: 0.4rem;
}

.formulario button {
  margin-top: 1rem;
  padding: 0.7rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.4rem;
  background: #21493f;
  color: #fff;
  cursor: pointer;
}

.formulario button:hover {
  background: #163329;
}

.dica {
  font-size: 0.8rem;
  color: #5b655f;
  margin: 0.1rem 0 0.4rem;
}

.lista-pessoas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cartao-pessoa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  background: #fff;
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cartao-pessoa .nome {
  font-weight: 600;
}

.nivel {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #e3ece8;
  color: #21493f;
  text-align: center;
}

.nivel-cuidar {
  background: #21493f;
  color: #fff;
}

.vazio {
  color: #5b655f;
}

.botao {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 0.4rem;
  background: #21493f;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.lista-documentos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cartao-documento {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cartao-documento .linha-documento {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
}

.cartao-documento .tipo {
  font-weight: 600;
}

.cartao-documento .enviado-por {
  margin-left: auto;
  font-size: 0.8rem;
  color: #5b655f;
}

.cartao-documento .remover {
  display: block;
  padding: 0 1rem 0.75rem;
  font-size: 0.8rem;
  color: #7a2e24;
  text-decoration: none;
}

.cartao-documento .remover:hover {
  text-decoration: underline;
}

.lista-lancamentos {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cartao-lancamento {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cartao-lancamento .linha-lancamento {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
}

.cartao-lancamento .total {
  margin-left: auto;
  font-size: 0.8rem;
  color: #5b655f;
}

.tabela-rolavel {
  overflow-x: auto;
  margin: 0.5rem 0 1rem;
}

.tabela-exames,
.tabela-resultados {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tabela-exames th,
.tabela-exames td,
.tabela-resultados th,
.tabela-resultados td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #e3ece8;
  text-align: left;
  font-size: 0.9rem;
}

.tabela-exames select,
.tabela-exames input {
  width: 100%;
  padding: 0.35rem;
  font-size: 0.9rem;
  border: 1px solid #c7d0cc;
  border-radius: 0.3rem;
}

.linha-com-erro td {
  background: #fdecea;
}

.linha-erro-marca td {
  color: #7a2e24;
  font-size: 0.8rem;
  font-style: italic;
  border-bottom: 1px solid #e3ece8;
}

.linha-fora-da-faixa td {
  background: #fdecea;
}

.marca-fora-da-faixa {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #7a2e24;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

@media (max-width: 420px) {
  .conteudo {
    padding: 1rem 0.75rem 2.5rem;
  }
}
