body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: var(--bg-color, #fff);
}
header {
  background: #5b8def;
  color: #fff;
  padding: 1rem;
  text-align: center;
}
nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  background: #f5f5f5;
  padding: 0.5rem;
}
nav button {
  padding: 0.5rem 1rem;
  border: none;
  background: #ddd;
  border-radius: 4px;
  cursor: pointer;
}
nav button.active {
  background: #5b8def;
  color: #fff;
}
main {
  padding: 1rem;
}
.habit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid #eee;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}
.habit-item .controls button {
  margin-left: 0.5rem;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: #fff;
  padding: 1rem;
  border-radius: 4px;
  width: 90%;
  max-width: 400px;
}
.modal-actions {
  margin-top: 1rem;
  text-align: right;
}
