.task-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.task-modal-content {
  background: var(--bg-0);
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.task-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.task-modal-body {
  padding: 24px;
}

.task-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Step Content */
.step-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Project Selection */
.project-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-select,
.subproject-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-1);
  color: var(--text);
}

/* New Project Form */
.new-project-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 12px;
}

/* Color Picker */
.color-picker {
  margin-top: 12px;
}

.color-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.color-preset {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color-preset:hover {
  transform: scale(1.1);
}

.color-preset.selected {
  border-color: var(--text);
}

.color-input {
  width: 100%;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Task Form */
.task-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Task Title */
.task-title {
  font-size: 16px;
  min-height: 80px;
  resize: vertical;
}

/* Task Description */
.task-description {
  min-height: 100px;
  resize: vertical;
}

/* Tags Input */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-1);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag .remove {
  cursor: pointer;
  opacity: 0.7;
}

.tag .remove:hover {
  opacity: 1;
}

.tag-input {
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
  flex: 1;
  min-width: 100px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .task-modal-content {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .form-row {
    flex-direction: column;
  }
}
