/* Reset e tipografia básica */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f4f4f9;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  background: #fff;
  max-width: 480px;
  width: 100%;
  margin: 32px 0;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo {
  width: 40px;
  height: 40px;
}

h1 {
  font-size: 2rem;
  color: #333;
}

.form-group {
  margin-bottom: 12px;
}

label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
  color: #222;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 8px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: #3498db;
  outline: none;
}

button {
  padding: 10px 18px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

button:hover,
button:focus {
  background: #217dbb;
}

.search-section {
  margin: 18px 0 10px 0;
}

#busca {
  width: 100%;
  padding: 8px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 1rem;
}

.mensagem-vazia {
  color: #888;
  text-align: center;
  margin: 24px 0;
  font-size: 1.1rem;
}

#lista-tarefas {
  list-style: none;
  padding: 0;
}

.tarefa {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 14px;
  transition: background 0.2s;
}

.tarefa.concluida {
  background: #e0ffe0;
  text-decoration: line-through;
  color: #888;
}

.tarefa .info {
  flex: 1;
}

.tarefa .titulo {
  font-weight: bold;
  font-size: 1.1rem;
}

.tarefa .descricao {
  font-size: 0.98rem;
  color: #555;
  margin-top: 2px;
}

.tarefa .meta {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

.tarefa .prioridade-baixa {
  color: #2ecc40;
  font-weight: bold;
}

.tarefa .prioridade-média {
  color: #f1c40f;
  font-weight: bold;
}

.tarefa .prioridade-alta {
  color: #e74c3c;
  font-weight: bold;
}

.tarefa .acoes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 12px;
}

.tarefa button {
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.tarefa button:hover {
  background: #d6eaff;
  color: #217dbb;
}

.tarefa .btn-concluir {
  background: #2ecc40;
  color: #fff;
  border: none;
}

.tarefa .btn-concluir:hover {
  background: #27ae60;
}

.tarefa .btn-editar {
  background: #f1c40f;
  color: #fff;
  border: none;
}

.tarefa .btn-editar:hover {
  background: #f39c12;
}

.tarefa .btn-excluir {
  background: #e74c3c;
  color: #fff;
  border: none;
}

.tarefa .btn-excluir:hover {
  background: #c0392b;
}

/* Modal de edição */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Qualquer elemento com atributo hidden deve sumir da tela */
[hidden] {
  display: none !important;
}

.modal-conteudo {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  min-width: 320px;
  max-width: 95vw;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

@media (max-width: 600px) {
  .container {
    padding: 10px;
    max-width: 100vw;
  }
  .modal-conteudo {
    min-width: 90vw;
    padding: 12px;
  }
}