* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #1e1e1e;
  color: #eee;
  padding: 16px;
  padding-bottom: 80px;
}

h1 {
  font-size: 22px;
  margin: 0 0 16px;
}

a { color: #6ab0ff; }

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  background: #2d7ef7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: #3a3a3a;
}

.btn.danger {
  background: #b3261e;
}

.card {
  display: block;
  background: #2a2a2a;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-name {
  font-size: 17px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.card-meta {
  font-size: 13px;
  color: #aaa;
  margin-top: 4px;
}

.card-move {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.card-move button {
  background: #3a3a3a;
  color: #eee;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
}

.card-move button:disabled {
  opacity: 0.3;
  cursor: default;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill.overdue { background: #4a1414; color: #ff8f7c; }
.pill.due_soon { background: #4a3d14; color: #ffd97c; }
.pill.not_due { background: #14401f; color: #86e39a; }

.tree-node { margin: 6px 0; }

.tree-branch {
  font-weight: 600;
  color: #cfcfcf;
}

.tree-progress {
  font-weight: 400;
  font-size: 13px;
  color: #999;
  margin-left: 6px;
}

.tree-leaf label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.tree-leaf input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.item-actions {
  font-size: 12px;
  margin-left: 8px;
}

.item-actions a { margin-left: 8px; }

form label {
  display: block;
  margin: 14px 0 6px;
  font-size: 14px;
  color: #ccc;
}

form input, form select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #2a2a2a;
  color: #eee;
  font-size: 16px;
}

.actions-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.empty-state {
  color: #999;
  text-align: center;
  margin-top: 40px;
}
