*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #222;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.app {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  width: 100%;
  max-width: 480px;
  padding: 28px 24px;
  align-self: flex-start;
}

.app-header { margin-bottom: 24px; }
.app-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; }

.greeting { font-size: 1rem; color: #666; font-weight: 400; margin-bottom: 10px; }

.badges { display: flex; gap: 10px; margin-top: 8px; }
.badge {
  background: #f0f2f5;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.82rem;
  color: #555;
}
.badge strong { color: #333; }

.add-form { display: flex; gap: 8px; margin-bottom: 16px; }
.add-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.add-input:focus { border-color: #4f8ef7; }

.btn {
  padding: 8px 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: #f5f5f5; }
.btn.active { background: #4f8ef7; border-color: #4f8ef7; color: #fff; }
.btn-primary { background: #4f8ef7; border-color: #4f8ef7; color: #fff; }
.btn-primary:hover { background: #3a7de0; }
.btn-delete { padding: 4px 8px; color: #aaa; border-color: transparent; }
.btn-delete:hover { color: #e74c3c; background: #ffeaea; border-color: transparent; }
.btn-clear { color: #e74c3c; border-color: transparent; }
.btn-clear:hover { background: #ffeaea; }

.filters { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

.todo-list { list-style: none; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0f0f0;
}
.todo-item:last-child { border-bottom: none; }
.todo-item input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.todo-text { flex: 1; font-size: 0.95rem; }
.todo-item.done .todo-text { text-decoration: line-through; color: #aaa; }

.empty { color: #aaa; font-size: 0.9rem; padding: 16px 0; text-align: center; }
