/* =============================================================================
   Checklisten — Active-Cards + Items + Template-Editor
   ============================================================================= */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}

.checklist-card {
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.checklist-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.checklist-card__sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

.checklist-card__progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.checklist-card__progress-bar {
  height: 100%;
  background: var(--mod-checklist);
  transition: width 200ms ease;
}
.checklist-card__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Item-Row */
.task-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.task-row:last-child {
  border-bottom: none;
}
.task-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 100ms ease, border-color 100ms ease;
  padding: 0;
}
.task-checkbox:hover {
  border-color: var(--mod-checklist);
}
.task-checkbox[data-done="true"] {
  background: var(--mod-checklist);
  border-color: var(--mod-checklist);
}
.task-checkbox[data-done="true"]::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.task-row__text {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}
.task-row[data-done="true"] .task-row__text {
  color: var(--text-dim);
  text-decoration: line-through;
}
.task-row__due {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.task-row__due--overdue {
  color: var(--mod-alert);
  font-weight: 500;
}
.task-row__remove {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 100ms ease, color 100ms ease;
}
.task-row:hover .task-row__remove {
  opacity: 1;
}
.task-row__remove:hover {
  color: var(--mod-alert);
}

/* Add-Item-Inline */
.task-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.task-add input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.task-add input::placeholder {
  color: var(--text-dim);
}
.task-add__date {
  width: 130px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 4px;
  font-family: inherit;
}

/* Template-Card */
.template-card {
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 100ms ease;
}
.template-card:hover {
  border-color: rgba(124, 58, 237, 0.40);
}
.template-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.template-card__count {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.template-card__desc {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
