/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* Layout geral */
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  color: #333;
}

#app {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 2rem;
}

hr {
  border: 0;
  border-top: 1px solid #e2e8f0; 
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* Botões */
button {
  background-color: #667eea;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: #5a67d8;
}

button:active {
  transform: scale(0.97);
}

/* Toggle */
#toggleMode {
  width: 100%;
  margin-bottom: 1.5rem;
  background-color: rgba(102, 126, 234, 0.1);
  color: #5a67d8;
  font-weight: 600;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

#toggleMode:hover {
  background-color: #e2e8f0;
}

/* Formulário */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

legend {
  padding: 0 0.5rem;
  font-weight: 600;
  color: #4a5568;
}

form > button[type="submit"] {
  margin-top: 1.2rem;background: linear-gradient(135deg, #667eea, #5a67d8);
  font-weight: 600;
}

form > button[type="submit"]:hover {
  background: linear-gradient(135deg, #5a67d8, #4c51bf);
}

/* Inputs */
label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  margin-top: 0.8rem;
  color: #555;
}

input,
select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #cbd5e0;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Lista de tarefas */
#tasksList {
  margin-top: 2rem;
  padding: 0;
}

#tasksList li {
  background: #f7fafc;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  white-space: pre-line;
  border-left: 4px solid #667eea;
  line-height: 1.4;
}

/* Responsividade */
@media (max-width: 480px) {
  #app {
    padding: 1.2rem;
  }

  button {
    font-size: 0.9rem;
  }
}