* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px 12px;
  font-family: Arial, sans-serif;
  background: #f4f4f5;
  color: #1f2937;
}

.app {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 18px;
}

h1 {
  margin: 0 0 14px;
  font-size: 24px;
}

.novo-item {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.novo-item input {
  flex: 1;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.novo-item input:focus,
.campo:focus {
  outline: none;
  border-color: #2563eb;
}

.novo-item button {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

.lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.item-linha {
  display: grid;
  grid-template-columns: 1fr 110px 130px 42px 42px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.item-pendente {
  background: #fef2f2;
  border-color: #fecaca;
}

.item-completo {
  background: #f0fdf4;
  border-color: #86efac;
}

.item-nome {
  font-weight: 600;
  word-break: break-word;
}

.campo {
  width: 100%;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.acao {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  height: 34px;
}

.totais {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .app {
    padding: 14px;
  }

  .novo-item {
    flex-direction: column;
  }

  .novo-item button {
    width: 100%;
  }

  .item-linha {
    grid-template-columns: 1fr;
  }

  .totais {
    flex-direction: column;
    gap: 4px;
  }
}
